caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] linking caml files to C
@ 2003-07-01 16:51 Jung Woon Ho
  2003-07-01 18:50 ` Jean-Baptiste Rouquier
  0 siblings, 1 reply; 2+ messages in thread
From: Jung Woon Ho @ 2003-07-01 16:51 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] linking caml files to C
  2003-07-01 16:51 [Caml-list] linking caml files to C Jung Woon Ho
@ 2003-07-01 18:50 ` Jean-Baptiste Rouquier
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Baptiste Rouquier @ 2003-07-01 18:50 UTC (permalink / raw)
  To: Jung Woon Ho, caml-list

Please read the manual. It gives good explanations and a complete example.
You should use the option "-custom".

Jean-Baptiste.



***************************
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 $<
------------------------------------------------------



-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-01 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-01 16:51 [Caml-list] linking caml files to C Jung Woon Ho
2003-07-01 18:50 ` Jean-Baptiste Rouquier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).