* Re: import libraries for 3rd-party DLLs
@ 1999-03-11 2:14 Rik Hellicar
1999-03-31 19:45 ` Rik Hellicar
0 siblings, 1 reply; 8+ messages in thread
From: Rik Hellicar @ 1999-03-11 2:14 UTC (permalink / raw)
To: cygwin
Thanks to all for your replies. I'm now compiling, and linking and
running, but there're still some funnies.
Parameters I'm passing to functions in the DLL are getting broken on the
way. Function calls which have no parameters work perfectly. Return
values from function calls are fine too.
Any ideas ? I know it works fine if I use Borland's bcc32, but that
particular compiler appears not to have setitimer and other such classics.
Regards,
--
Rick Hellicar
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: import libraries for 3rd-party DLLs
1999-03-11 2:14 import libraries for 3rd-party DLLs Rik Hellicar
@ 1999-03-31 19:45 ` Rik Hellicar
0 siblings, 0 replies; 8+ messages in thread
From: Rik Hellicar @ 1999-03-31 19:45 UTC (permalink / raw)
To: cygwin
Thanks to all for your replies. I'm now compiling, and linking and
running, but there're still some funnies.
Parameters I'm passing to functions in the DLL are getting broken on the
way. Function calls which have no parameters work perfectly. Return
values from function calls are fine too.
Any ideas ? I know it works fine if I use Borland's bcc32, but that
particular compiler appears not to have setitimer and other such classics.
Regards,
--
Rick Hellicar
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* import libraries for 3rd-party DLLs
1999-03-10 9:00 Richard Hellicar (EML)
1999-03-11 0:23 ` Anders Norlander
@ 1999-03-31 19:45 ` Richard Hellicar (EML)
1 sibling, 0 replies; 8+ messages in thread
From: Richard Hellicar (EML) @ 1999-03-31 19:45 UTC (permalink / raw)
To: 'cygwin@sourceware.cygnus.com'
Hello,
I'm trying to create an "import library" to allow me to use gcc with a
third-party DLL.
I tried the .lib files supplied with the DLL, but neither worked (one was
for MS, which
did compile, but complained about entry points when executed, the other for
Borland).
The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a method in
Chapter 4
("Linking against DLLs"). However, if I run nm on *any* dll, not just the
one I'm trying
to use, it tells me "No symbols in xyz.dll"
In February, Gary Vaughan posted another method of producing import
libraries;
you *can* produce a library in this way, but the linker chokes on undefined
references when you use it.
Can of the cygwin gods tell me:
1. Should I expect either the MS or Borland .lib files to be compatible ?
2. Is there a way of converting incompatible lib files ?
3. Why doesn't nm find symbols in *any* DLL (try: for i in
/winnt/system32/*.DLL; do nm $i; done)
4. exactly what *is* supposed to be in a .def file; should the @4,@8 stuff
be in
there or not ? Semi-colons ?
I'm running cygwin B20.1 and gcc version egcs-2.91.57 19980901
Thanks in advance to you all
Rick Hellicar
--
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: import libraries for 3rd-party DLLs
1999-03-10 9:39 Jim.Totten
@ 1999-03-31 19:45 ` Jim.Totten
0 siblings, 0 replies; 8+ messages in thread
From: Jim.Totten @ 1999-03-31 19:45 UTC (permalink / raw)
To: cygwin
I am trying to use a third party msvc++ .lib file as well. I was able
to create export and import files using the method mentioned often on
this list and in the users manual (nm followed by a dlltool) and my gcc
program seems to *link* without an errors - however when I execute the
program a window appears with the following message:
"The application or DLL is not a valid Windows NT image."
I saw in the archives someone else who got this same error message, but
there were no follow-ups to the post. Anybody got some ideas about what
I could be doing wrong?
Thanks,
jt
-----Original Message-----
From: Richard Hellicar (EML)
[SMTP:Rick.Hellicar@eml.ericsson.se]
Sent: Wednesday, March 10, 1999 10:39 AM
To: 'cygwin@sourceware.cygnus.com'
Subject: import libraries for 3rd-party DLLs
Hello,
I'm trying to create an "import library" to allow me to use gcc
with a
third-party DLL.
I tried the .lib files supplied with the DLL, but neither worked
(one was
for MS, which
did compile, but complained about entry points when executed,
the other for
Borland).
The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a
method in
Chapter 4
("Linking against DLLs"). However, if I run nm on *any* dll,
not just the
one I'm trying
to use, it tells me "No symbols in xyz.dll"
In February, Gary Vaughan posted another method of producing
import
libraries;
you *can* produce a library in this way, but the linker chokes
on undefined
references when you use it.
Can of the cygwin gods tell me:
1. Should I expect either the MS or Borland .lib files to be
compatible ?
2. Is there a way of converting incompatible lib files ?
3. Why doesn't nm find symbols in *any* DLL (try: for i in
/winnt/system32/*.DLL; do nm $i; done)
4. exactly what *is* supposed to be in a .def file; should the
@4,@8 stuff
be in
there or not ? Semi-colons ?
I'm running cygwin B20.1 and gcc version egcs-2.91.57 19980901
Thanks in advance to you all
Rick Hellicar
--
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: import libraries for 3rd-party DLLs
1999-03-11 0:23 ` Anders Norlander
@ 1999-03-31 19:45 ` Anders Norlander
0 siblings, 0 replies; 8+ messages in thread
From: Anders Norlander @ 1999-03-31 19:45 UTC (permalink / raw)
To: Richard Hellicar (EML); +Cc: 'cygwin@sourceware.cygnus.com'
Richard Hellicar (EML) wrote:
>
> Hello,
>
>
> I'm trying to create an "import library" to allow me to use gcc with a
> third-party DLL.
> I tried the .lib files supplied with the DLL, but neither worked (one was
> for MS, which
> did compile, but complained about entry points when executed, the other for
> Borland).
>
> The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a method in
> Chapter 4
> ("Linking against DLLs"). However, if I run nm on *any* dll, not just the
> one I'm trying
> to use, it tells me "No symbols in xyz.dll"
The method suggested in the user's guide doesn't work if the
dll is stripped. (Hint: shouldn't this be mentioned in the ug?).
> 1. Should I expect either the MS or Borland .lib files to be compatible ?
Generally, no, and certainly not Borland lib files.
There are, however, patches to make gnu tools more MS compatible.
> 2. Is there a way of converting incompatible lib files ?
Depends on which format it is and if it is an import library
or a regular object library. At least in MSVC 6, I think MS
changed the format for import libraries and possibly other .lib
files as well. This stops the `nm ...' method of creating def
files from MS import libraries from working.
> 3. Why doesn't nm find symbols in *any* DLL (try: for i in
> /winnt/system32/*.DLL; do nm $i; done)
See above
> 4. exactly what *is* supposed to be in a .def file; should the @4,@8 stuff
> be in
> there or not ? Semi-colons ?
The @x are the total size of the parameters passed to a function using
the stdcall (standard win32) calling convention. Those functions are
decorated that way by the compiler.
Semi-colons are comments.
Regards,
Anders
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: import libraries for 3rd-party DLLs
1999-03-10 9:00 Richard Hellicar (EML)
@ 1999-03-11 0:23 ` Anders Norlander
1999-03-31 19:45 ` Anders Norlander
1999-03-31 19:45 ` Richard Hellicar (EML)
1 sibling, 1 reply; 8+ messages in thread
From: Anders Norlander @ 1999-03-11 0:23 UTC (permalink / raw)
To: Richard Hellicar (EML); +Cc: 'cygwin@sourceware.cygnus.com'
Richard Hellicar (EML) wrote:
>
> Hello,
>
>
> I'm trying to create an "import library" to allow me to use gcc with a
> third-party DLL.
> I tried the .lib files supplied with the DLL, but neither worked (one was
> for MS, which
> did compile, but complained about entry points when executed, the other for
> Borland).
>
> The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a method in
> Chapter 4
> ("Linking against DLLs"). However, if I run nm on *any* dll, not just the
> one I'm trying
> to use, it tells me "No symbols in xyz.dll"
The method suggested in the user's guide doesn't work if the
dll is stripped. (Hint: shouldn't this be mentioned in the ug?).
> 1. Should I expect either the MS or Borland .lib files to be compatible ?
Generally, no, and certainly not Borland lib files.
There are, however, patches to make gnu tools more MS compatible.
> 2. Is there a way of converting incompatible lib files ?
Depends on which format it is and if it is an import library
or a regular object library. At least in MSVC 6, I think MS
changed the format for import libraries and possibly other .lib
files as well. This stops the `nm ...' method of creating def
files from MS import libraries from working.
> 3. Why doesn't nm find symbols in *any* DLL (try: for i in
> /winnt/system32/*.DLL; do nm $i; done)
See above
> 4. exactly what *is* supposed to be in a .def file; should the @4,@8 stuff
> be in
> there or not ? Semi-colons ?
The @x are the total size of the parameters passed to a function using
the stdcall (standard win32) calling convention. Those functions are
decorated that way by the compiler.
Semi-colons are comments.
Regards,
Anders
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: import libraries for 3rd-party DLLs
@ 1999-03-10 9:39 Jim.Totten
1999-03-31 19:45 ` Jim.Totten
0 siblings, 1 reply; 8+ messages in thread
From: Jim.Totten @ 1999-03-10 9:39 UTC (permalink / raw)
To: cygwin
I am trying to use a third party msvc++ .lib file as well. I was able
to create export and import files using the method mentioned often on
this list and in the users manual (nm followed by a dlltool) and my gcc
program seems to *link* without an errors - however when I execute the
program a window appears with the following message:
"The application or DLL is not a valid Windows NT image."
I saw in the archives someone else who got this same error message, but
there were no follow-ups to the post. Anybody got some ideas about what
I could be doing wrong?
Thanks,
jt
-----Original Message-----
From: Richard Hellicar (EML)
[SMTP:Rick.Hellicar@eml.ericsson.se]
Sent: Wednesday, March 10, 1999 10:39 AM
To: 'cygwin@sourceware.cygnus.com'
Subject: import libraries for 3rd-party DLLs
Hello,
I'm trying to create an "import library" to allow me to use gcc
with a
third-party DLL.
I tried the .lib files supplied with the DLL, but neither worked
(one was
for MS, which
did compile, but complained about entry points when executed,
the other for
Borland).
The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a
method in
Chapter 4
("Linking against DLLs"). However, if I run nm on *any* dll,
not just the
one I'm trying
to use, it tells me "No symbols in xyz.dll"
In February, Gary Vaughan posted another method of producing
import
libraries;
you *can* produce a library in this way, but the linker chokes
on undefined
references when you use it.
Can of the cygwin gods tell me:
1. Should I expect either the MS or Borland .lib files to be
compatible ?
2. Is there a way of converting incompatible lib files ?
3. Why doesn't nm find symbols in *any* DLL (try: for i in
/winnt/system32/*.DLL; do nm $i; done)
4. exactly what *is* supposed to be in a .def file; should the
@4,@8 stuff
be in
there or not ? Semi-colons ?
I'm running cygwin B20.1 and gcc version egcs-2.91.57 19980901
Thanks in advance to you all
Rick Hellicar
--
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* import libraries for 3rd-party DLLs
@ 1999-03-10 9:00 Richard Hellicar (EML)
1999-03-11 0:23 ` Anders Norlander
1999-03-31 19:45 ` Richard Hellicar (EML)
0 siblings, 2 replies; 8+ messages in thread
From: Richard Hellicar (EML) @ 1999-03-10 9:00 UTC (permalink / raw)
To: 'cygwin@sourceware.cygnus.com'
Hello,
I'm trying to create an "import library" to allow me to use gcc with a
third-party DLL.
I tried the .lib files supplied with the DLL, but neither worked (one was
for MS, which
did compile, but complained about entry points when executed, the other for
Borland).
The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a method in
Chapter 4
("Linking against DLLs"). However, if I run nm on *any* dll, not just the
one I'm trying
to use, it tells me "No symbols in xyz.dll"
In February, Gary Vaughan posted another method of producing import
libraries;
you *can* produce a library in this way, but the linker chokes on undefined
references when you use it.
Can of the cygwin gods tell me:
1. Should I expect either the MS or Borland .lib files to be compatible ?
2. Is there a way of converting incompatible lib files ?
3. Why doesn't nm find symbols in *any* DLL (try: for i in
/winnt/system32/*.DLL; do nm $i; done)
4. exactly what *is* supposed to be in a .def file; should the @4,@8 stuff
be in
there or not ? Semi-colons ?
I'm running cygwin B20.1 and gcc version egcs-2.91.57 19980901
Thanks in advance to you all
Rick Hellicar
--
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1999-03-31 19:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-11 2:14 import libraries for 3rd-party DLLs Rik Hellicar
1999-03-31 19:45 ` Rik Hellicar
-- strict thread matches above, loose matches on Subject: below --
1999-03-10 9:39 Jim.Totten
1999-03-31 19:45 ` Jim.Totten
1999-03-10 9:00 Richard Hellicar (EML)
1999-03-11 0:23 ` Anders Norlander
1999-03-31 19:45 ` Anders Norlander
1999-03-31 19:45 ` Richard Hellicar (EML)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).