Can't set up my shared cygwin lib project [message #119813] |
Tue, 07 September 2004 15:42 |
Eclipse User |
|
|
|
Originally posted by: pgraebel.stud.fh-dortmund.de
Hi,
usally I create my own working shared Cygwin-Lib "MyLib" by calling the
following command line:
---
$ g++ -shared -Wl,--out-implib=libMyLib.dll.a -o cygMyLib.dll ABC.o
DEF.o GHI.o JKL.o -Wl,--export-all-symbols /lib/libNeededLib.dll.a
---
Now I am trying to integrate the making of my lib into an eclipse3.0/CDT
2.0 project.
The first thing I do, is to call the C/C++ Build properties of my
project. Then I enter my build output "cygMyLib.dll" (Active
Configuration/Manage...).
After that I set the shared flag in the "Shared Library Settings"
section. "Shared object name" gets the value "libMyLib.so", "Import
Library name" gets "libMyLib.dll.a".
Finally, I set linker flags (found in Miscellaneous) to
"-Wl,--export-all-symbols /lib/libNeededLib.dll.a".
The problem is, that my managed makefile looks like this:
---
cygMyLib.dll: $(OBJS)
@echo 'Building target: $@'
null null $@ $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building: $@'
---
After building, an error is reported:
---
....
make: null: Command not found
....
---
Shouldn't there be "g++" instead of "null null"? Are my settings wrong
for shared cygwin lib? If only there was a tutorial about such a project...
-Patrick
|
|
|
Re: Can't set up my shared cygwin lib project [message #119852 is a reply to message #119813] |
Tue, 07 September 2004 16:48 |
Sean Evoy Messages: 195 Registered: July 2009 |
Senior Member |
|
|
Hi Patrick,
First-off, you can ignore the shared object setting for a Windows DLL.
It is not relevant for non-Elf binaries.
I am guessing that you started with an executable project and set about
flipping the settings manually. The problem with that approach is that
the executable target doesn't have a linker that understands how to
build something with a DLL extension. You should probably start with a
"Shared Library (Gnu on Windows)" project.
Hope this helps,
Sean
Patrick Gräbel wrote:
> Hi,
>
> usally I create my own working shared Cygwin-Lib "MyLib" by calling the
> following command line:
>
> ---
> $ g++ -shared -Wl,--out-implib=libMyLib.dll.a -o cygMyLib.dll ABC.o
> DEF.o GHI.o JKL.o -Wl,--export-all-symbols /lib/libNeededLib.dll.a
> ---
>
> Now I am trying to integrate the making of my lib into an eclipse3.0/CDT
> 2.0 project.
>
> The first thing I do, is to call the C/C++ Build properties of my
> project. Then I enter my build output "cygMyLib.dll" (Active
> Configuration/Manage...).
>
> After that I set the shared flag in the "Shared Library Settings"
> section. "Shared object name" gets the value "libMyLib.so", "Import
> Library name" gets "libMyLib.dll.a".
>
> Finally, I set linker flags (found in Miscellaneous) to
> "-Wl,--export-all-symbols /lib/libNeededLib.dll.a".
>
> The problem is, that my managed makefile looks like this:
>
> ---
> cygMyLib.dll: $(OBJS)
> @echo 'Building target: $@'
> null null $@ $(OBJS) $(USER_OBJS) $(LIBS)
> @echo 'Finished building: $@'
> ---
>
> After building, an error is reported:
>
> ---
> ...
> make: null: Command not found
> ...
> ---
>
> Shouldn't there be "g++" instead of "null null"? Are my settings wrong
> for shared cygwin lib? If only there was a tutorial about such a project...
>
>
> -Patrick
|
|
|
Powered by
FUDForum. Page generated in 0.02965 seconds