delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/07/18/10:06:10

From: btuysser AT qualcomm DOT com (Bijan Tuysserkani)
Subject: Re: msvc dll and gcc
18 Jul 1997 10:06:10 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <3.0.1.32.19970718102359.00988970.cygnus.gnu-win32@smtphost-co.qualcomm.com>
Mime-Version: 1.0
X-Sender: btuysser AT smtphost-co DOT qualcomm DOT com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Original-To: "gnu-win32 AT cygnus DOT com" <gnu-win32 AT cygnus DOT com>
In-Reply-To: <3.0.1.32.19970717174505.009791b0@smtphost-co.qualcomm.com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

At 05:45 PM 7/17/97 -0600, Bijan Tuysserkani wrote:
>dlltool --def foo.def --dllname foo.dll --output-lib foo.a
>
>That worked fine. 
>
>But when I link it with together with footest.c, which calls the 
>dll-function, I get this result :
>
>bash$ gcc footest.c foo.a -o footest.exe
>C:\TEMP\cc0014041.o(.text+0x2e):footest.c: undefined reference to `myhello'
>gcc: Internal compiler error: program ld got fatal signal 1
>
>foo.def : 
>
>LIBRARY foo
>EXPORTS
>myhello AT 0
>

Hi, 
I got everything compiled by omitting the @0 in the .def file. 
This is the same way as in the cygwin.din file. 
But how do you deal with that issue, if you do not build the dll 
file by yourself? In this case, as far as I know, each function gets
exported with a leading underscore before the function name and @n afterwards.

However, if I try to execute footest, I get an application error from
windows NT :

The instruction at "0x0252bac6" referenced memory at "0x100476c0". The memory
could not be "written".

Click on OK ........etc

I just want to print something out , I do not write anything. What do I
have to
do to make that thing run?

Thanks,

	Bijan


                                                          /\
                                                  .  /\  /  \
------------------------------------------------ / \/  \/    \
Bijan Tuysserkani                               /      /      \
Qualcomm Inc.                                                  \
5450 Western Ave.                             
Boulder, CO  80301                        (303) 473-6852 (voice)
btuysser AT qualcomm DOT com                     (303) 473-6665 (fax)

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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