Piecewise linking with the MS archiver (lib) doesn't work. Every
invocation of the lib clobbers the old one. The solution is to list
the library as the first "object" (really anywhere should be fine) in
the next lib command. I'm not sure how to patch this. It looks like
the piecewise linking code in ltmain.m4sh doesn't depend on what
linker it's using. Any ideas on how best to patch this?

e.g.

[EMAIL PROTECTED] ~
$ cat test1.c test2.c
#include <stdlib.h>

double add(double x,double y)
{
   return (x+y);
}
#include <stdlib.h>

double sub(double x,double y)
{
   return (x-y);
}

[EMAIL PROTECTED] ~
$ pgcc -c test1.c test2.c
test1.c:
test2.c:

[EMAIL PROTECTED] ~
$ lib /out:libtest.lib test.o
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.


[EMAIL PROTECTED] ~
$ lib /list libtest.lib
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

test.o

[EMAIL PROTECTED] ~
$ lib /out:libtest.lib test2.o
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.


[EMAIL PROTECTED] ~
$ lib /list libtest.lib
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

test2.o

[EMAIL PROTECTED] ~
$ lib /out:libtest.lib libtest.lib test.o
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.


[EMAIL PROTECTED] ~
$ lib /list libtest.lib
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

test.o
test2.o


_______________________________________________
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool

Reply via email to