This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: windows and cygwin compiled dll ?
- From: Stefan Hansen <Stefan dot Hansen at gmx dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 28 May 2002 14:42:07 +0200 (MEST)
- Subject: Re: windows and cygwin compiled dll ?
- References: <F65lJB1YaDnN0vo94lS0000d323@hotmail.com>
Hi,
i use the files from the example:
http://cygwin.com/building-reloc-dlls.txt
I created whith the make script (the same example) the DLL.
Then I use (thank to John Vincent)
dlltool -D fooB.dll -l fooB.lib
I got the lib.
Then I copy the main.c, fooB.dll, fooB.lib and the cygwin1.dll in the MSVC
Projectdir.
compiling whith MSVC returns:
--------------------Konfiguration: relocDLLTest - Win32
Debug--------------------
Kompilierung läuft...
main.c
C:\user\Hansen\DLL\relocDLLTest\main.c(8) : warning C4013: 'doit'
undefiniert; Annahme: extern mit Rueckgabetyp int
C:\user\Hansen\DLL\relocDLLTest\main.c(9) : warning C4013: 'doittoo'
undefiniert; Annahme: extern mit Rueckgabetyp int
Linker-Vorgang läuft...
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _doittoo
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _doit
Debug/relocDLLTest.exe : fatal error LNK1120: 2 unaufgeloeste externe
Verweise
Fehler beim Ausführen von link.exe.
relocDLLTest.exe - 3 Fehler, 2 Warnung(en)
------------------
so i added to the main file the lines
int doit(int i);
int doittoo(int i);
and compiled again
--------------------Konfiguration: relocDLLTest - Win32
Debug--------------------
Kompilierung läuft...
main.c
Linker-Vorgang läuft...
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _doittoo
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _doit
Debug/relocDLLTest.exe : fatal error LNK1120: 2 unaufgeloeste externe
Verweise
Fehler beim Ausführen von link.exe.
relocDLLTest.exe - 3 Fehler, 0 Warnung(en)
----------
I got again the LNK2001 Error. (the same error I got whithout the lib file.)
have i to use this stupid __decspec(dlleport) ?
hope you could still help
Stefan Hansen
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/