gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] do I need separate libfiles for every module?


From: Fischlin Andreas
Subject: Re: [Gm2] do I need separate libfiles for every module?
Date: Fri, 5 Feb 2010 19:11:37 +0100

Dear Gaius,

Sounds excellent. That's all most useful.

Regards,
Andreas



ETH Zurich
Prof. Dr. Andreas Fischlin
Systems Ecology - Institute of Integrative Biology
CHN E 21.1
Universitaetstrasse 16
8092 Zurich
SWITZERLAND

address@hidden
www.sysecol.ethz.ch

+41 44 633-6090 phone
+41 44 633-1136 fax

Make it as simple as possible, but distrust it!


Attachment: Fischlin Andreas.vcf
Description: Text Data


________________________________________________________________________

On 05/Feb/2010, at 16:44 , Gaius Mulley wrote:

Martin KalbfuƟ <address@hidden> writes:

Hi,

I have the following lines:

gm2 -c test.mod -I../def
gm2 test.mod -L../src/.libs -lsk -lSDL

The first line works like I would expect it.
But the second line does not.

gm2 says:

cannot find SKVideo.o or SKVideo.a

This is an imported module.
He cannot find them because there are no such files. SKVideo.o is part
of libsk.a

Why does the linking step need an object file with the same name as the
module?
When I work with C and gcc, it's completely up to me where the code is,
as long as I link it

I would do

gcc -c test.c -I../include
gcc -o test test.o -L../src/.libs -lsk -lSDL

or I could do

gcc -o test test.o SKVideo.o -lSDL

With gm2, only the second variant works. Is there a reason for this?
I find this behaviour more confusing hen helpfull. If he can't find the
referenced functions in the symbol table he tells me anyway with an
undefined reference error.

I asume this behaviour is the reason why the linking step needs the name
of the module file, not the name of the object like gcc.

Thanks,

Hi Martin and John,

now fixed in the latest CVS, thanks for the suggestion.  In the future
gm2 could build its pim, iso, ulm libraries into libpim.a,
libiso.a and libulm.a and link against those.

regards,
Gaius


_______________________________________________
gm2 mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/gm2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]