delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/28/08:42:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 28 May 2002 14:42:07 +0200 (MEST)
From: Stefan Hansen <Stefan DOT Hansen AT gmx DOT net>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
References: <F65lJB1YaDnN0vo94lS0000d323 AT hotmail DOT com>
Subject: Re: windows and cygwin compiled dll ?
X-Priority: 3 (Normal)
X-Authenticated-Sender: #0001137743 AT gmx DOT net
X-Authenticated-IP: [134.28.254.10]
Message-ID: <26878.1022589727@www21.gmx.net>
X-Flags: 0001

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019