MSVC 6.0 WX 2.6.0 Cannot link samples

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
xaxero
Knows some wx things
Knows some wx things
Posts: 33
Joined: Mon Apr 25, 2005 12:20 pm

MSVC 6.0 WX 2.6.0 Cannot link samples

Post by xaxero »

Good morning,
I am converting from 2.4.2 to 2.6.0 I can compile my own stuff fine but get linker errors - 2 externals unresolved for wxApp. I( include every library in the /lib directory to no avail).

Trying to backtrack by loading the samples for analysis I get a huge project file list for every sample including it would seem all the wxWidgets source.

In the file list there are 3 groups the last of which is the sample in question. It would appear that the DSP files are somehow mixed up. I can compile the sample by compiling that group only but the linker fails trying to load wxcore26.lib that does not apear anywhere in the library lists.

I think something went badly wrong with my install. Rolled everything back to 2.4.2 so I can work however I would like to move forward. Has anyone else experienced these problems.

Thank you for any insight.


Jonathan
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: MSVC 6.0 WX 2.6.0 Cannot link samples

Post by ABX »

xaxero wrote:I am converting from 2.4.2 to 2.6.0 I can compile my own stuff fine but get linker errors - 2 externals unresolved for wxApp.
Quote, please.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
xaxero
Knows some wx things
Knows some wx things
Posts: 33
Joined: Mon Apr 25, 2005 12:20 pm

Post by xaxero »

INK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
WXWindPlotApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::HandleEvent(class wxEvtHandler *,void (__thiscall wxEvtHandler::*)(class wxEvent &),class wxEvent &)const " (?HandleEvent@wxAppConsole@@UBEX
PAVwxEvtHandler@@P82@AEXAAVwxEvent@@@Z1@Z)
WXWindPlotApp.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::OnExceptionInMainLoop(void)" (?OnExceptionInMainLoop@wxApp@@UAE_NXZ)
cnavw.exe : fatal error LNK1120: 2 unresolved externals
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

xaxero wrote:INK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
WXWindPlotApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::HandleEvent(class wxEvtHandler *,void (__thiscall wxEvtHandler::*)(class wxEvent &),class wxEvent &)const " (?HandleEvent@wxAppConsole@@UBEX
PAVwxEvtHandler@@P82@AEXAAVwxEvent@@@Z1@Z)
WXWindPlotApp.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::OnExceptionInMainLoop(void)" (?OnExceptionInMainLoop@wxApp@@UAE_NXZ)
cnavw.exe : fatal error LNK1120: 2 unresolved externals
These members are holded within wxUSE_EXCEPTIONS flag. Are you sure library and your application are compiled with the same value of this flag? Perhaps there is some conflict from older wxWidgets install.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
xaxero
Knows some wx things
Knows some wx things
Posts: 33
Joined: Mon Apr 25, 2005 12:20 pm

Post by xaxero »

That was the problem - Pulled exceptions out and I have clean excecution.

Thank you for the fast response.
el-512
In need of some credit
In need of some credit
Posts: 9
Joined: Wed May 04, 2005 7:00 am

Post by el-512 »

Hi,

I have the same problem, but have no clou, what you mean with "Pulled exceptions out and I have clean excecution".

I changed my wxInstallation from 2.4.2 to 2.6.0 (removed everything from the computer and installed the new version). I changed nothing in my VC++ 6. I did "complete compile" for the project (with event-handling, surfaces...). Then I get the exact linker errors like xaxero.

The linker list is:
winmm.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 comctl32.lib rpcrt4.lib wsock32.lib wxmsw.lib zlib.lib regex.lib png.lib jpeg.lib tiff.lib

Thank's for any help
el-512
In need of some credit
In need of some credit
Posts: 9
Joined: Wed May 04, 2005 7:00 am

Post by el-512 »

Hi,

some more new data:
In project settings / C\C++ / Programming Language C++
I removed the flag
Activate Exception Handling

But now I get a compiler warning C4530 for all my cpp files. You can see the complete warning below (in German - sorry). Although I do NOT use the MFC it tells me, that this error happens in
visual_studio\vc98\include\xstring(525)

Any Ideas?

Thank's in advance




:\s2cfg\classes\c_isc_service_db\_db_abstract.cpp(179) : warning C4530: C++-Handler verwendet, aber Entladesemantik ist nicht aktiviert. Geben Sie -GX an.
c:\programme\develop\visual_studio\vc98\include\xstring(525) : warning C4530: C++-Handler verwendet, aber Entladesemantik ist nicht aktiviert. Geben Sie -GX an.
c:\programme\develop\visual_studio\vc98\include\xstring(521) : Bei der Kompilierung der Member-Funktion 'void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Copy(unsigned int)' der Klassenvorla
ge
Post Reply