Unresolved external symbols in compiling 32 bit application in Windows 64

后端 未结 5 1966
情歌与酒
情歌与酒 2021-02-14 04:00

So I am trying to compile legacy app from 32 bit to 64 bit.. I re-compiled all of the libs it used and made it look into WIN SDK6.0A x64 bit for libs..

I am using:

相关标签:
5条回答
  • 2021-02-14 04:10

    Can you post your compile and link command lines, and any #def's in your code?

    Does this happen if you make a simple project from scratch that only calls one of those methods?

    0 讨论(0)
  • 2021-02-14 04:13

    So I finally figured it out, kinda... It wasnt finding psapi.lib

    In Project->Linker->Additional dependencies instead of just saying psapi.lib I gave full path to it and it worked... not really sure why it failed to find it before but oh well...

    0 讨论(0)
  • 2021-02-14 04:28

    This is very long shot (and I don't really believe this is it) but maybe the headers are not properly guarded with extern "C" for c++ compilation? Are you including system headers or just declaring the functions yourself?

    0 讨论(0)
  • 2021-02-14 04:28

    In my case(migrate from VS2008 to VS2012), issue solved after adding psapi.lib in Linker->input->Additional Dependencies in VS 2012.

    0 讨论(0)
  • 2021-02-14 04:33

    For the record: Same problem, different solution; I had an entry for the directory

    psapi 
    

    added in the list of

    Linker/General/Additional Library Directory 
    

    This resulted in the usage of the old VS2005 platform sdk psapi.lib (it only had x86, no x64 version). After removing the entry the correct lib from the installed WinSDK x64/psapi.lib is used now. So keep an eye out for mixings/ordering of old & new SDKs! Obviously the full path will also work but might be a problem when you use the project on multiple machines.

    0 讨论(0)
提交回复
热议问题