Discussion:
Problem linking against wxBase
Tim Burgess
2014-09-17 13:26:45 UTC
Permalink
Hi,

I'm using VS2010 to build my project in debug for 64-bit Unicode Windows
against WX2.9.3. I have the following library path:

$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib;C:\Program
files\boost\lib\64-bit;C:\WxWidgets-2.9.3\lib\vc_amd64_lib;C:\program
files\crypto++\X64\Output\Debug\;C:\program files (x86)\WiX Toolset
v3.8\SDK\VS2010\lib\x64;c:\program files\rtmidi-2.0.1\lib\x64;c:\program
files (x86)\visual leak detector\lib\win64;

In the Linker|Input dialog I have the following additional dependencies set:

wxbase29ud.lib;cryptlib.lib;msi.lib;dutil.lib;psapi.lib;Rpcrt4.lib;Comctl32.
lib;wxzlibd.lib;wxpngd.lib;wxmsw29ud_core.lib;wxbase29ud.lib;winmm.lib;rtmid
id.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;%(Ad
ditionalDependencies)

I get errors of the form:

1>TranslationTablesDialog.obj : error LNK2001: unresolved external symbol
"public: virtual class wxClassInfo * __cdecl
wxObject::GetClassInfoW(void)const "
(?***@wxObject@@UEBAPEAVwxClassInfo@@XZ)

My other errors are other references to this same symbol.

I checked the documentation and found that GetClassInfo requires the base
library, but I thought I already had this covered, as the wxbase29ud.lib
exists in the library path and is specified in my dependency list.

Can anybody point out where I'm going wrong, please?

Best wishes.
Tim Burgess
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Igor Korot
2014-09-17 23:31:07 UTC
Permalink
Hi, Tim,
Post by Tim Burgess
Hi,
I'm using VS2010 to build my project in debug for 64-bit Unicode Windows
$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib;C:\Program
files\boost\lib\64-bit;C:\WxWidgets-2.9.3\lib\vc_amd64_lib;C:\program
files\crypto++\X64\Output\Debug\;C:\program files (x86)\WiX Toolset
v3.8\SDK\VS2010\lib\x64;c:\program files\rtmidi-2.0.1\lib\x64;c:\program
files (x86)\visual leak detector\lib\win64;
wxbase29ud.lib;cryptlib.lib;msi.lib;dutil.lib;psapi.lib;Rpcrt4.lib;Comctl32.
lib;wxzlibd.lib;wxpngd.lib;wxmsw29ud_core.lib;wxbase29ud.lib;winmm.lib;rtmid
id.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;%(Ad
ditionalDependencies)
There is an extra wxbase29ud.lib referenced in the beginning of the line above.

Thank you.
Post by Tim Burgess
1>TranslationTablesDialog.obj : error LNK2001: unresolved external symbol
"public: virtual class wxClassInfo * __cdecl
wxObject::GetClassInfoW(void)const "
My other errors are other references to this same symbol.
I checked the documentation and found that GetClassInfo requires the base
library, but I thought I already had this covered, as the wxbase29ud.lib
exists in the library path and is specified in my dependency list.
Can anybody point out where I'm going wrong, please?
Best wishes.
Tim Burgess
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Tim Burgess
2014-09-18 13:06:57 UTC
Permalink
Hi,

Thanks for noticing that. I got rid of the duplication but, unfortunately, it didn't change anything.


Best wishes.
Tim Burgess


-----Original Message-----
From: wx-***@googlegroups.com [mailto:wx-***@googlegroups.com] On Behalf Of Igor Korot
Sent: 18 September 2014 00:31
To: wx-***@googlegroups.com
Subject: Re: Problem linking against wxBase

Hi, Tim,
Post by Tim Burgess
Hi,
I'm using VS2010 to build my project in debug for 64-bit Unicode
$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib;C:\Program
files\boost\lib\64-bit;C:\WxWidgets-2.9.3\lib\vc_amd64_lib;C:\program
files\crypto++\X64\Output\Debug\;C:\program files (x86)\WiX Toolset
v3.8\SDK\VS2010\lib\x64;c:\program
files\rtmidi-2.0.1\lib\x64;c:\program
files (x86)\visual leak detector\lib\win64;
wxbase29ud.lib;cryptlib.lib;msi.lib;dutil.lib;psapi.lib;Rpcrt4.lib;Comctl32.
lib;wxzlibd.lib;wxpngd.lib;wxmsw29ud_core.lib;wxbase29ud.lib;winmm.lib
;rtmid
id.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.
lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.li
b;%(Ad
ditionalDependencies)
There is an extra wxbase29ud.lib referenced in the beginning of the line above.

Thank you.
Post by Tim Burgess
1>TranslationTablesDialog.obj : error LNK2001: unresolved external
1>symbol
"public: virtual class wxClassInfo * __cdecl
wxObject::GetClassInfoW(void)const "
My other errors are other references to this same symbol.
I checked the documentation and found that GetClassInfo requires the
base library, but I thought I already had this covered, as the
wxbase29ud.lib exists in the library path and is specified in my dependency list.
Can anybody point out where I'm going wrong, please?
Best wishes.
Tim Burgess
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Eric Jensen
2014-09-18 13:20:27 UTC
Permalink
Hello Tim,

Wednesday, September 17, 2014, 3:26:45 PM, you wrote:

1>>TranslationTablesDialog.obj : error LNK2001: unresolved external symbol
TB> "public: virtual class wxClassInfo * __cdecl
TB> wxObject::GetClassInfoW(void)const "
TB> (?***@wxObject@@UEBAPEAVwxClassInfo@@XZ)

The "W" at the end of the method name indicates that this is caused by
some ANSI/Unicode mismatch. The name of the wxWidgets method
wxObject::GetClassInfo() should not be replaced with GetClassInfoA or
GetClassInfoW depending on ANSI/Unicode setting. That happens with the
Windows function of the same name.

I guess that you're somewhere including a headerfile from a
third-party library that includes "windows.h".

Either include "wx/msw/winundef.h" afterwards or try shuffling around
the order of include files. E.g. first all non-wx header files, then
all wx header files.

Regards,
Eric
--
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Tim Burgess
2014-09-18 15:54:46 UTC
Permalink
Hi Eric,

Now I'm kicking myself, as I've fallen foul of this before and should have
remembered it. Many thanks for the reminder.


Best wishes.
Tim Burgess

-----Original Message-----
From: wx-***@googlegroups.com [mailto:wx-***@googlegroups.com] On Behalf
Of Eric Jensen
Sent: 18 September 2014 14:20
To: Tim Burgess
Subject: Re: Problem linking against wxBase

Hello Tim,

Wednesday, September 17, 2014, 3:26:45 PM, you wrote:

1>>TranslationTablesDialog.obj : error LNK2001: unresolved external
1>>symbol
TB> "public: virtual class wxClassInfo * __cdecl
TB> wxObject::GetClassInfoW(void)const "
TB> (?***@wxObject@@UEBAPEAVwxClassInfo@@XZ)

The "W" at the end of the method name indicates that this is caused by some
ANSI/Unicode mismatch. The name of the wxWidgets method
wxObject::GetClassInfo() should not be replaced with GetClassInfoA or
GetClassInfoW depending on ANSI/Unicode setting. That happens with the
Windows function of the same name.

I guess that you're somewhere including a headerfile from a third-party
library that includes "windows.h".

Either include "wx/msw/winundef.h" afterwards or try shuffling around the
order of include files. E.g. first all non-wx header files, then all wx
header files.

Regards,
Eric
--
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...