Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] linking caml files to C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jung Woon Ho <unosoft@h...>
Subject: [Caml-list] linking caml files to C
Hi,
Im trying to link caml files to the C files.

I'm using this flags with the caml files.
-----------------------------------------------------
%.$(O):	%.ml
	$(OCAMLC) -c -output-obj -o $<
%.cmi:	%.mli
	$(OCAMLCI) -c -output-obj -o $<
------------------------------------------------------

And these options to link them to my current C-file program.
##########################################################################
CC     = gcc
CFLAGS = -O3 -DHAVE_CONFIG_H
CXX    = g++
CXXFLAGS = -O3 -DHAVE_CONFIG_H
LIBS   = -lm  -lfl -L/usr/local/lib/ocaml -lcamlrun -lunix -ldl -lncurses 
-lm
YACC   = bison -y
FLEX    = flex
##########################################################################

And I'm getting these errors:

/usr/local/lib/ocaml/libcamlrun.a(startup.o)(.text+0x364): In function 
`parse_command_line':
: undefined reference to `names_of_builtin_cprim'
/usr/local/lib/ocaml/libcamlrun.a(startup.o)(.text+0x36c): In function 
`parse_command_line':
: undefined reference to `names_of_builtin_cprim'
/usr/local/lib/ocaml/libcamlrun.a(startup.o)(.text+0x7f6): In function 
`caml_startup_code':
: undefined reference to `builtin_cprim'
/usr/local/lib/ocaml/libcamlrun.a(dynlink.o)(.text+0x13): In function 
`lookup_primitive':
: undefined reference to `names_of_builtin_cprim'
/usr/local/lib/ocaml/libcamlrun.a(dynlink.o)(.text+0x1b): In function 
`lookup_primitive':
: undefined reference to `names_of_builtin_cprim'
/usr/local/lib/ocaml/libcamlrun.a(dynlink.o)(.text+0x35): In function 
`lookup_primitive':
: undefined reference to `builtin_cprim'
/usr/local/lib/ocaml/libcamlrun.a(dynlink.o)(.text+0x3f): In function 
`lookup_primitive':
: undefined reference to `names_of_builtin_cprim'
collect2: ld returned 1 exit status
make: *** [spl] Error 1

Can anybody help me, with this problem?

Thank you, very much.

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners