From: "Jeremy Fincher" <tweedgeezer@hotmail.com>
To: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Building O'Caml projects properly.
Date: Mon, 01 Oct 2001 03:04:32 -0400 [thread overview]
Message-ID: <F217UV4A8CcZycg8ab90000edf8@hotmail.com> (raw)
>If you want to do what I usually do, your project tree should look
>somewhat like this:
>
> ./
> Makefile
> OcamlMakefile
> lib/
> libsrc/
> lib1/...
> lib2/...
> lib3/...
> src/
> Makefile
> src1.ml
> src2.ml
> ...
I have a similar directory structure to that one in my ~/src/ocaml/my
directory. As far as lib/ and libsrc/ go, it's exactly the same. Rather
than having a src/ directory, though, I'm not going to use a toplevel
Makefile and instead have my projects in their own directories at the same
level as lib/ and libsrc/. Of course, I only have one project at the
moment,
so it's not a huge deal, but when I get more it might matter :)
All the lib/* directories compile and install correctly using the following
Makefile:
---------------------------------------------------------------------------
OCAMLMAKEFILE = ../../OcamlMakefile
SOURCES = sformat.ml
RESULT = a.out
LIBDIRS = ../../lib
INCDIRS = ../../lib
LIBINSTALL_FILES = *.mli *.cmi *.cma *.cmo *.cmx *.cmxa *.a *.o
OCAML_LIB_INSTALL = ../../lib
all: byte-code-library native-code-library
-include $(OCAMLMAKEFILE)
---------------------------------------------------------------------------
Everything works correctly *except* that after I make libinstall, it removes
the *.mli files from the directory, which I don't want it to do.
I do get hung up, however, when trying to compile my project, using this
Makefile:
----------------------------------------------------------------------------
OCAMLMAKEFILE = ../OcamlMakefile
SOURCES = calc_parser.mly calc_lexer.mll ircmsg.ml irclib.ml ircutils.ml
logger.ml flusher.ml ircusers.ml factoids.ml help.ml privmsg_callbacks.ml
callbacks.ml irctester.ml
RESULT = ircbot
LIBS = unix pcre
LIBDIRS = ../lib
INCDIRS = ../lib
all: byte-code native-code
-include $(OCAMLMAKEFILE)
----------------------------------------------------------------------------
Everything compiles correctly, but when it gets to the linking stage, it
tells
me this:
gmake[1]: Entering directory `/usr/home/jfincher/src/ocaml/my/ocamlbot'
ocamlc -I ../lib -ccopt -L../lib unix.cma pcre.cma -o ircbot \
calc_parser.cmo calc_lexer.cmo ircmsg.cmo irclib.cmo
ircutils.cmo logger.cmo flusher.cmo ircusers.cmo factoids.cmo help.cmo
privmsg_callbacks.cmo callbacks.cmo irctester.cmo
Error while linking ircmsg.cmo: Reference to undefined global `Py_string'
gmake[1]: *** [ircbot] Error 2
gmake[1]: Leaving directory `/usr/home/jfincher/src/ocaml/my/ocamlbot'
gmake: *** [byte-code] Error 2
And I have no idea what to do about it. All the proper py_string.cm* files
are
in the lib directory as they should be.
Any comments on the above Makefiles, either related to my specific questions
or not, are appreciated.
Jeremy
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2001-10-01 7:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-01 7:04 Jeremy Fincher [this message]
2001-10-01 8:07 ` Markus Mottl
-- strict thread matches above, loose matches on Subject: below --
2001-10-01 14:02 Jeremy Fincher
2001-10-01 11:46 Jeremy Fincher
2001-10-01 12:57 ` Markus Mottl
2001-10-01 13:08 ` Hideo Bannai
2001-10-01 13:47 ` Markus Mottl
2001-10-01 15:17 ` Julian Assange
2001-09-29 20:31 Jeremy Fincher
2001-09-29 21:48 ` Julian Assange
2001-09-29 22:08 ` Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F217UV4A8CcZycg8ab90000edf8@hotmail.com \
--to=tweedgeezer@hotmail.com \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox