* Reference to undefined global `Camlp4_config'
@ 2009-03-11 13:29 Joel Reymont
2009-03-11 13:33 ` Re : [Caml-list] " Matthieu Wipliez
2009-03-11 14:04 ` Jérémie Dimino
0 siblings, 2 replies; 5+ messages in thread
From: Joel Reymont @ 2009-03-11 13:29 UTC (permalink / raw)
To: O'Caml Mailing List
Any suggestions on how to resolve this?
ocamlfind installs into /usr/local/lib/site-lib and there's a site-lib/
camlp4 directory with META in it.
Thanks, Joel
---
ocamlfind ocamlc -package 'oUnit, extlib, camlp4' -linkpkg -g src/
easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo src/easy_symtab.cmo
src/token.cmo src/static1.cmo src/easy_parser.cmo src/test_tools.cmo
src/parser_test.cmo src/test.cmo -o src/test.byte
File "_none_", line 1, characters 0-1:
Error: Error while linking src/easy_lexer.cmo:
Reference to undefined global `Camlp4_config'
---
http://tinyco.de
--- Mac & iPhone
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re : [Caml-list] Reference to undefined global `Camlp4_config'
2009-03-11 13:29 Reference to undefined global `Camlp4_config' Joel Reymont
@ 2009-03-11 13:33 ` Matthieu Wipliez
2009-03-11 13:55 ` Joel Reymont
2009-03-11 14:04 ` Jérémie Dimino
1 sibling, 1 reply; 5+ messages in thread
From: Matthieu Wipliez @ 2009-03-11 13:33 UTC (permalink / raw)
To: O'Caml Mailing List
I'm not familiar with ocamlfind, but for Camlp4 you need this:
-I +camlp4 camlp4lib.cma
Does this solve the problem?
Cheers,
Matthieu
----- Message d'origine ----
> De : Joel Reymont <joelr1@gmail.com>
> À : O'Caml Mailing List <caml-list@yquem.inria.fr>
> Envoyé le : Mercredi, 11 Mars 2009, 14h29mn 02s
> Objet : [Caml-list] Reference to undefined global `Camlp4_config'
>
> Any suggestions on how to resolve this?
>
> ocamlfind installs into /usr/local/lib/site-lib and there's a site-lib/camlp4
> directory with META in it.
>
> Thanks, Joel
>
> ---
>
> ocamlfind ocamlc -package 'oUnit, extlib, camlp4' -linkpkg -g src/easy_ast.cmo
> src/easy_code.cmo src/easy_lexer.cmo src/easy_symtab.cmo src/token.cmo
> src/static1.cmo src/easy_parser.cmo src/test_tools.cmo src/parser_test.cmo
> src/test.cmo -o src/test.byte
> File "_none_", line 1, characters 0-1:
> Error: Error while linking src/easy_lexer.cmo:
> Reference to undefined global `Camlp4_config'
>
> ---
> http://tinyco.de
> --- Mac & iPhone
>
>
>
>
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re : [Caml-list] Reference to undefined global `Camlp4_config'
2009-03-11 13:33 ` Re : [Caml-list] " Matthieu Wipliez
@ 2009-03-11 13:55 ` Joel Reymont
0 siblings, 0 replies; 5+ messages in thread
From: Joel Reymont @ 2009-03-11 13:55 UTC (permalink / raw)
To: Matthieu Wipliez; +Cc: O'Caml Mailing List
On Mar 11, 2009, at 1:33 PM, Matthieu Wipliez wrote:
>
> I'm not familiar with ocamlfind, but for Camlp4 you need this:
> -I +camlp4 camlp4lib.cma
I was under the impression that ocamlfind -packages takes care of
adding the camlp4 bits.
> Does this solve the problem?
Not really but thanks for trying! The ocamlfind command that
ocamlbuild is using, e.g.
+ ocamlfind ocamlc -verbose -package 'oUnit, extlib, camlp4' -linkpkg -
g src/easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo src/
easy_symtab.cmo src/token.cmo src/static1.cmo src/easy_parser.cmo src/
test_tools.cmo src/parser_test.cmo src/test.cmo -o src/test.byte
Boils down to this
Effective set of compiler predicates:
pkg_unix,pkg_oUnit,pkg_extlib,pkg_camlp4,autolink,byte
+ ocamlc.opt -verbose -g -o src/test.byte -I /usr/local/lib/ocaml/site-
lib/oUnit -ccopt -I/usr/local/lib/ocaml/site-lib/oUnit -I /usr/local/
lib/ocaml/site-lib/extlib -ccopt -I/usr/local/lib/ocaml/site-lib/
extlib -I /usr/local/lib/ocaml/camlp4 -ccopt -I/usr/local/lib/ocaml/
camlp4 -ccopt -L/usr/local/lib/ocaml/site-lib/oUnit -ccopt -L/usr/
local/lib/ocaml/site-lib/extlib -ccopt -L/usr/local/lib/ocaml/camlp4 /
usr/local/lib/ocaml/unix.cma /usr/local/lib/ocaml/site-lib/oUnit/
oUnit.cma /usr/local/lib/ocaml/site-lib/extlib/extLib.cma src/
easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo src/easy_symtab.cmo
src/token.cmo src/static1.cmo src/easy_parser.cmo src/test_tools.cmo
src/parser_test.cmo src/test.cmo
File "_none_", line 1, characters 0-1:
Error: Error while linking src/easy_lexer.cmo:
Reference to undefined global `Camlp4_config'
ocamlc.opt returned with exit code 2
Command exited with code 2.
It's using camlp4 for -I and -L but it's not pulling in the library
for some reason.
Thanks, Joel
---
http://tinyco.de
Mac, C++, OCaml
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Reference to undefined global `Camlp4_config'
2009-03-11 13:29 Reference to undefined global `Camlp4_config' Joel Reymont
2009-03-11 13:33 ` Re : [Caml-list] " Matthieu Wipliez
@ 2009-03-11 14:04 ` Jérémie Dimino
2009-03-11 14:07 ` Joel Reymont
1 sibling, 1 reply; 5+ messages in thread
From: Jérémie Dimino @ 2009-03-11 14:04 UTC (permalink / raw)
To: Joel Reymont; +Cc: O'Caml Mailing List
Joel Reymont wrote:
> ocamlfind ocamlc -package 'oUnit, extlib, *camlp4*' -linkpkg -g src/
> easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo src/easy_symtab.cmo
> src/token.cmo src/static1.cmo src/easy_parser.cmo src/test_tools.cmo
> src/parser_test.cmo src/test.cmo -o src/test.byte
> File "_none_", line 1, characters 0-1:
> Error: Error while linking src/easy_lexer.cmo:
> Reference to undefined global `Camlp4_config'
The "camlp4" package is only useful when using syntax extensions (it
defines the "preprocessor" variable). If you want to use the camlp4
library you must use the "camlp4.lib" package instead.
Jérémie
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Reference to undefined global `Camlp4_config'
2009-03-11 14:04 ` Jérémie Dimino
@ 2009-03-11 14:07 ` Joel Reymont
0 siblings, 0 replies; 5+ messages in thread
From: Joel Reymont @ 2009-03-11 14:07 UTC (permalink / raw)
To: Jérémie Dimino; +Cc: O'Caml Mailing List
On Mar 11, 2009, at 2:04 PM, Jérémie Dimino wrote:
> If you want to use the camlp4 library you must use the "camlp4.lib"
> package instead.
That solves it, thanks!
---
http://tinyco.de
Mac, C++, OCaml
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-11 14:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 13:29 Reference to undefined global `Camlp4_config' Joel Reymont
2009-03-11 13:33 ` Re : [Caml-list] " Matthieu Wipliez
2009-03-11 13:55 ` Joel Reymont
2009-03-11 14:04 ` Jérémie Dimino
2009-03-11 14:07 ` Joel Reymont
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox