This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Creation of dynamic object
- To: gnu-win32 at cygnus dot com
- Subject: Creation of dynamic object
- From: Jorrit Tyberghein <Jorrit dot Tyberghein at uz dot kuleuven dot ac dot be>
- Date: Thu, 05 Nov 1998 15:22:21 +0100
- Organization: Universitaire Ziekenhuizen Leuven
Hi,
I'm using the new CygWin B20 and try to create a dynamic object (not a DLL)
which I can access from another executable with dlopen and dlsym.
On Unix I would create this (linking stage) with:
g++ -Wl -shared -o dynobj.so obj_file1.o obj_file2.o obj_file3.o ... -l...
But with CygWin B20 I get the following errors:
g++: unrecognized option `-shared'
C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\
..\..\i586-cygwin32\lib/libcygwin.a(libcmain.o)(.text+0x58):libcmain.cc: undefined reference to `WinMain@16'
So first gcc doesn't seem to recognize the -Wl option so that the '-shared' option goes
to the linker. And of course in that case I have the problem that it seems to need WinMain
which is obviously not included in the objects.
How can I fix this? Note that I DON'T want to make a DLL.
Greetings and thanks in advance,
--
==============================================================================
Jorrit.Tyberghein@uz.kuleuven.ac.be, University Hospitals KU Leuven BELGIUM
No-one would have believed, in the final years of the Century of the
Fruitbat, that Discworld affairs were being watched keenly and impatiently
by intelligences greater than Man's, or at least much nastier; that their
affairs were being scrutinised and studied as a man with a three-day
appetite might study the All-You-Can-Gobble-For-A-Dollar menu outside
Harga's House of Ribs...
-- (Terry Pratchett, Moving Pictures)
==============================================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".