unresolved external symbol _GdipGetDC@8
Posted: Tue Nov 24, 2009 1:16 am
I am using VS2008 C++ Express Edition with .NET 3.5 installed.
I downloaded wxPack from Sourceforge and placed it in "C:\Programming\wxWidgets2.8" (This is v 2.8.9).
I configured VS2008 as follows:
* Changed "Configuration" to "Unicode Debug Multilib WX_PYTHON_0"
* Right-clicked on "mmex" (in the Solution Explorer) and chose Properties
* Expanded "Configuration Properties"
* Expanded "Linker"
* Clicked on "Input"
* Add "libcmtd, msvcrt, msvcprtd" to "Ignore Specific Library"
* Expanded "Configuration Properties"
* Expanded "C/C++"
* Clicked on "General"
* Changed all occurances of ${WXWIN} to the path where wxWidgets is installed (Didn't want to create an environment variable)
* Did the same with "Linker" and "Resources"
* Clicked on "Code Generation"
* Changed "Runtime Library" to "Multi-threaded Debug" (from ""Multi-threaded Debug DLL")
The C++ commandline:
/O2 /I "C:\Programming\wxWidgets2.8\lib\vc_lib\mswu" /I "C:\Programming\wxWidgets2.8\include" /I "..\..\include" /I "..\..\sqlite" /D "WIN32" /D "_UNICODE" /D "__WXMSW__" /D "NDEBUG" /D "NOPCH" /D "WXSQLITE3_HAVE_CODEC" /D "WXSQLITE3_HAVE_METADATA" /D "TIXML_USE_STL" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0710" /D "UNICODE" /FD /EHsc /MTd /Fo"vc-static-u\mmex\\" /Fd"vc-static-u\mmex.pdb" /W4 /nologo /c /TP /errorReport:prompt
The Linker commandline:
/OUT:"vc-static-u\mmex.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Programming\wxWidgets2.8\lib\vc_lib" /MANIFEST /MANIFESTFILE:"vc-static-u\mmex\mmex.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"libcmt" /NODEFAULTLIB:"msvcrt" /NODEFAULTLIB:"msvcprtd" /PDB:"vc-static-u\mmex.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT wxmsw28u_core.lib wxmsw28u_qa.lib wxbase28u_net.lib wxmsw28u_html.lib wxbase28u_xml.lib wxmsw28u_aui.lib wxmsw28u_adv.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib vc-static-u\sqlite3.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
After doing a Rebuild All, I get the following errors:
wxmsw28u_core.lib(corelib_renderer.obj) : error LNK2019: unresolved external symbol _GdipGetDC@8 referenced in function "public: struct HDC__ * __thiscall Gdiplus::Graphics::GetHDC(void)" (?GetHDC@Graphics@Gdiplus@@QAEPAUHDC__@@XZ)
wxmsw28u_core.lib(corelib_renderer.obj) : error LNK2019: unresolved external symbol _GdipReleaseDC@8 referenced in function "public: void __thiscall Gdiplus::Graphics::ReleaseHDC(struct HDC__ *)" (?ReleaseHDC@Graphics@Gdiplus@@QAEXPAUHDC__@@@Z)
wxmsw28u_core.lib(corelib_graphics.obj) : error LNK2019: unresolved external symbol _GdipFree@4 referenced in function "public: static void __cdecl Gdiplus::GdiplusBase::operator delete(void *)" (??3GdiplusBase@Gdiplus@@SAXPAX@Z)
wxmsw28u_core.lib(corelib_graphics.obj) : error LNK2019: unresolved external symbol _GdipAlloc@4 referenced in function "public: static void * __cdecl Gdiplus::GdiplusBase::operator new(unsigned int)" (??2GdiplusBase@Gdiplus@@SAPAXI@Z)
There is error list includes a number of others that I deleted for brevity. If I can find a solution for these 4 the others will be fixed as well.
The "wxmsw28u_core.lib" file does contain a reference to _GdipGetDC@8 (for example).
Any ideas why these errors are occurring?
I downloaded wxPack from Sourceforge and placed it in "C:\Programming\wxWidgets2.8" (This is v 2.8.9).
I configured VS2008 as follows:
* Changed "Configuration" to "Unicode Debug Multilib WX_PYTHON_0"
* Right-clicked on "mmex" (in the Solution Explorer) and chose Properties
* Expanded "Configuration Properties"
* Expanded "Linker"
* Clicked on "Input"
* Add "libcmtd, msvcrt, msvcprtd" to "Ignore Specific Library"
* Expanded "Configuration Properties"
* Expanded "C/C++"
* Clicked on "General"
* Changed all occurances of ${WXWIN} to the path where wxWidgets is installed (Didn't want to create an environment variable)
* Did the same with "Linker" and "Resources"
* Clicked on "Code Generation"
* Changed "Runtime Library" to "Multi-threaded Debug" (from ""Multi-threaded Debug DLL")
The C++ commandline:
/O2 /I "C:\Programming\wxWidgets2.8\lib\vc_lib\mswu" /I "C:\Programming\wxWidgets2.8\include" /I "..\..\include" /I "..\..\sqlite" /D "WIN32" /D "_UNICODE" /D "__WXMSW__" /D "NDEBUG" /D "NOPCH" /D "WXSQLITE3_HAVE_CODEC" /D "WXSQLITE3_HAVE_METADATA" /D "TIXML_USE_STL" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0710" /D "UNICODE" /FD /EHsc /MTd /Fo"vc-static-u\mmex\\" /Fd"vc-static-u\mmex.pdb" /W4 /nologo /c /TP /errorReport:prompt
The Linker commandline:
/OUT:"vc-static-u\mmex.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Programming\wxWidgets2.8\lib\vc_lib" /MANIFEST /MANIFESTFILE:"vc-static-u\mmex\mmex.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"libcmt" /NODEFAULTLIB:"msvcrt" /NODEFAULTLIB:"msvcprtd" /PDB:"vc-static-u\mmex.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT wxmsw28u_core.lib wxmsw28u_qa.lib wxbase28u_net.lib wxmsw28u_html.lib wxbase28u_xml.lib wxmsw28u_aui.lib wxmsw28u_adv.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib vc-static-u\sqlite3.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
After doing a Rebuild All, I get the following errors:
wxmsw28u_core.lib(corelib_renderer.obj) : error LNK2019: unresolved external symbol _GdipGetDC@8 referenced in function "public: struct HDC__ * __thiscall Gdiplus::Graphics::GetHDC(void)" (?GetHDC@Graphics@Gdiplus@@QAEPAUHDC__@@XZ)
wxmsw28u_core.lib(corelib_renderer.obj) : error LNK2019: unresolved external symbol _GdipReleaseDC@8 referenced in function "public: void __thiscall Gdiplus::Graphics::ReleaseHDC(struct HDC__ *)" (?ReleaseHDC@Graphics@Gdiplus@@QAEXPAUHDC__@@@Z)
wxmsw28u_core.lib(corelib_graphics.obj) : error LNK2019: unresolved external symbol _GdipFree@4 referenced in function "public: static void __cdecl Gdiplus::GdiplusBase::operator delete(void *)" (??3GdiplusBase@Gdiplus@@SAXPAX@Z)
wxmsw28u_core.lib(corelib_graphics.obj) : error LNK2019: unresolved external symbol _GdipAlloc@4 referenced in function "public: static void * __cdecl Gdiplus::GdiplusBase::operator new(unsigned int)" (??2GdiplusBase@Gdiplus@@SAPAXI@Z)
There is error list includes a number of others that I deleted for brevity. If I can find a solution for these 4 the others will be fixed as well.
The "wxmsw28u_core.lib" file does contain a reference to _GdipGetDC@8 (for example).
Any ideas why these errors are occurring?