0

I've a project composed from two parts:

  • static library(lib) + header with utils
  • main application(executable, mfc, opengl)

I've included header file in the main project files, and added library path and dependency to linker, everything worked ok on Visual Studio 2008, but, when I've ported solution to Visual Studio 2010 I received following error:

 error LNK2019: unresolved external symbol "public: void __thiscall XmlTools::XmlProperty::LoadXMLFile(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >)" (?LoadXMLFile@XmlProperty@XmlTools@@QAEXV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) referenced in function "public: bool __thiscall CToolsPanel::ReadWorld(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >,class CSymulatorDoc *)" (?ReadWorld@CToolsPanel@@QAE_NV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PAVCSymulatorDoc@@@Z)

Reference to library, and correct path are still there. I've tried to find solution here, or in google, but I can't find similar situation. Which changes between these two Visual Studio version could break something? Or I'm doing something wrong, and newer version of VS is simply more restrictive about that?

SathOkh
  • 826
  • 2
  • 12
  • 24
  • Use dumpbin.exe /exports on the .lib file to see what the LoadXMLFile() function really looks like. You can use [undname.exe](http://stackoverflow.com/a/12640642/17034) to demangle the name you find there. – Hans Passant Oct 25 '13 at 21:07
  • I can't see LoadXMLFile in the result: `C .CRT$XCU EF .bss 10C .data B41E4 .debug$S 120 .debug$T 14E2 .drectve1406 .rdata 1F0 .rdata$r 58 .rsrc$01 330 .rsrc$02 C .rtc$IMZ C .rtc$TMZ 80 .sxdata 629D .text 745 .text$x B2 .text$yc 3C .text$yd 738 .xdata$x 4 ATL$__a 4 ATL$__z` – SathOkh Oct 25 '13 at 21:11
  • Argh, dunno how to format result from the tool... Maybe I'm misundertanding something, but should I export it in any special way? I though I should do this only for dll? – SathOkh Oct 25 '13 at 21:13
  • Using /all is next. Redirect to a file so you can open it in an editor to search it. – Hans Passant Oct 25 '13 at 21:14
  • It's on the list: `COMDAT; sym= "public: void __thiscall XmlTools::XmlProperty::LoadXMLFile(class ATL::CStringT > >)" (?LoadXMLFile@XmlProperty@XmlTools@@QAEXV?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z) 16 byte align Execute Read` but your answer give me some hit - in the result I can see _wchar_t_ and, in the original code it's _char_. Now it links well(I see different,runtime problem, but it's different topic :) ), thank you very much – SathOkh Oct 25 '13 at 21:20

0 Answers0