Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have been trying to build a legacy code in Visual Studio 2008 for x64. When i am building i met with a situation where i have to build a library. It is a library project and in that there is a class as well as a file with some 10 -15 functions. When the library is built in 32 bit version, i.e WIN32 everything is fine. But when it is built in x64, the functions from the class is getting exported where as the function from the file is not getting exported. Can anyone give me a clue on what could be wrong.

Thanks in Advance
AJAI

What I have tried:

i used the dumpbin to confirm the c++ class functions are being exported. In the same i couldn't see any of the functions from the other file being exported.
Posted
Updated 27-Feb-17 6:55am

You must take a deep look in the code of these classes. I guess that there are some guarding macros which activate the win32 export which arent defined in the x64 settings.
For instance WIN32 isnt defined, but some WIN64. It is tricky: take also a look in the project settings of the compiler.

Tip: use Visual Studio 2010 it has better x64 support. I rename the project file with *2010 to have a copy for VS 2010 and the backup for VS 2008.
 
Share this answer
 
The rules are exactly the same whether it is 32 or 64 bit; see Creating and Using a Dynamic Link Library (C++)[^]. Check your project settings to see that you are correctly marking the different functions for export.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900