Version française
Home     About     Download     Resources     Contact us    
Browse thread
Reference to undefined global `Camlp4_config'
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: Re : [Caml-list] Reference to undefined global `Camlp4_config'

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