开发者

Unresolved external symbol with x64 flag c++ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. 开发者_C百科

I have a VS2008 C++ project which currently I compiled on VS2010. it contains a dll and execution GUI project.

With x64 flag the dll is build without any errors but the GUI has some LNK errors to function that are in the dll. "unresolved external symbol..." (error LNK 2019 and 2001) with Win32 flag there is no LNK errors.

for example I have the error:

unresolved external symbol "public :void _cdecl aaa::bbb(void)*(?bbb@aaa@@QEAAXXZ) referenced in function "public:__cdecl ccc::ccc(class aaa &)" (??0@@QEAA@AEAVaaa@@@Z)

I'm running on x64 OS.

Any help please?


As I understand it your problem is as follows:

Your solution contains a class library project and an application project of somesort that provides the user interface.

Your solution compiles without problem when set for win32 bit environment, but shows linker errors when compiled for x64 bit environment.

It is likely that your class library project output, as referenced by the GUI cannot be found when compiling for the x64 environment.

I would suggest that you try setting your configuration manager to build your class library project as x64 or Win32 to match your GUI project.

Check that your project configuration doesn't build the class library to a directory specific to the environment type and ensure that your GUI project uses a reference to the class library project and not the output DLL.

Also check that your dll actually builds under for the x64 environment.

It may also be worth checking that your class library project doesn't use any old Win32 specific libraries.


If I understand this right you would like to build a GUI executable and need to link this against your custom dll. The described error might occure because of several reasons but this is what comes to mind:

  • mixed builds (32bit/64bit) in the dll and the gui project
  • missing or incorrect link path for the *.lib which gets generated for your dll
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜