[mercury-users] Building shared library containing C++ code

Ondrej Bojar oboj7042 at ss1000.ms.mff.cuni.cz
Mon Mar 24 03:22:42 AEDT 2003


I'm trying to build a library of some Mercury modules using the simple
'mmake depend; mmake libmylib' where mylib.m is a wrapping module that
includes all the modules of the library. Some of the modules use some C
code, and I would naturally like to have the objects from C contained in
the library as well. Therefore, I've added

MLOBJS-mylib=c_object1.o c_object2.o

to the Mmakefile.

If I run 'mmake libmylib.a' (the static version of the library), it gets
created successfully.

If I run plain 'mmake libmylib', I get this error:

gmake: *** No rule to make target `db_cint.pic_o', needed by `libcore.so'.

db_cint.c is one of the extra C source codes. The static version,
db_cint.o, gets compiled via the standard $(CC) $(CFLAGS) -c ... rule.

How should I create db_cint.pic_o? Or should I specify the extra C objects
for the library in a different way, so that *.pic_o are not needed?

What does the .pic_o extension mean? (What's the difference from .o?)

Thanks, Andrew.

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list