-
December 9th, 2012, 10:05 AM
#1
functions were discarded on build of a dll with visual c++ 8.0
Hello,
I want to build a dll library with visual c++ 8.0 and got an "unresolved symbol" linker error message when trying to use the library with an application. So I checked the dll library with dependency walker for the exported functions, the needed functions were missing in the library.
I then dumped the corresponding object file with dumpbin.exe, the function was declared as public, like the other exported functions.
On the next step, I set the verbose switch for link.exe.
The verbose log told me, that the function was discarded on the linker run.
Can someone tell me, what can lead to that behaviour of the visual c++ linker ?
Thanks very much for your help.
-
December 9th, 2012, 10:12 AM
#2
Re: functions were discarded on build of a dll with visual c++ 8.0
Are these functions declared with __declspec(dllexport) ?
-
December 9th, 2012, 11:37 AM
#3
Re: functions were discarded on build of a dll with visual c++ 8.0
Hello Alex,
the functions are declared with "extern int __stdcall (...)".
-
December 9th, 2012, 02:42 PM
#4
Re: functions were discarded on build of a dll with visual c++ 8.0
Hello Alex,
thanks for your help. You have shown me the right way for the problem solution.
The GNU library I want to use in my application exports not with the keyword __declspec(dllexport), its done by a .def file and that causes the linker to discard the functions, that are not defined in the .def file. Now I understand the build of this GNU library.
Greetings
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|