Can't create a wxWidgets Project

General questions regarding the usage of CodeLite
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: Can't create a wxWidgets Project

Post by coder99 »

eranif wrote:My guess is:
You imported the minimal using CL VS importer?
No, I was trying to follow the wxWidget tutorial, IIRC, but named it minimal
eranif wrote:

Code: Select all

-lwxexpat.lib -lwinmm.lib -lcomctl32.lib -lrpcrt4.lib


Who added these libraries?
That must have been me :-(
I copied the libraries from the MSVC workspace and did not notice or pay attention to the extension
eranif wrote: CodeLite is searching what you told him to search...

Can u try and create a simple wx project using CL WX wizard?

point
WXWIN to the base of your WX install directory
and
WXCFG gcc_lib\mswud

Eran
Eran
They are set that way.

After removing the extensions from my libraries list, I find some multiply defined errors.
I'll have to go through the list and see what I can figure out.

But I am getting closer.

I very much appreciate your help and patience.
Later edit:
The release version now compiles and runs, the debug version still gives me the same problem

Code: Select all

Building: 
"mingw32-make.exe"  -j 2 -f "minimal_wsp.mk"
----------Building project:[ minimal - Debug ]----------
g++ -o ./Debug/minimal ./Debug/minimal_app.o ./Debug/minimal_frame.o  -Ld:/wxWidgetsEclipse2.8.9/lib/gcc_lib/mswu -Ld:/wxWidgetsEclipse2.8.9/lib/gcc_lib  -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxmsw28u_richtext -lwxbase28u_xml -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lwinmm -lcomctl32 -lrpcrt4 -lwsock32 -lodbc32  -O2  -mthreads -Ld:\wxWidgetsEclipse2.8.9\lib\gcc_lib -lwxmsw28ud_html -lwxmsw28ud_adv -lwxmsw28ud_core -lwxbase28ud_xml -lwxbase28ud_net -lwxbase28ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -mwindows 
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole16OnFatalExceptionEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../include/wx/app.h:(.text+0x0): multiple definition of `wxAppConsole::wxAppConsole()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsoleC1Ev':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:123: multiple definition of `wxAppConsole::wxAppConsole()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x50): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsoleD2Ev':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:141: multiple definition of `wxAppConsole::~wxAppConsole()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xa0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsoleD1Ev':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:141: multiple definition of `wxAppConsole::~wxAppConsole()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x280): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsoleD0Ev':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:141: multiple definition of `wxAppConsole::~wxAppConsole()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x460): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole10InitializeERiPPw':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:150: multiple definition of `wxAppConsole::Initialize(int&, wchar_t**)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x630): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole7CleanUpEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:167: multiple definition of `wxAppConsole::CleanUp()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x7a0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole6OnInitEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:175: multiple definition of `wxAppConsole::OnInit()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x7b0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole6OnExitEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:205: multiple definition of `wxAppConsole::OnExit()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x930): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole4ExitEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:216: multiple definition of `wxAppConsole::Exit()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x960): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole12CreateTraitsEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:225: multiple definition of `wxAppConsole::CreateTraits()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x980): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole9GetTraitsEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:230: multiple definition of `wxAppConsole::GetTraits()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x9a0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole20ProcessPendingEventsEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:268: multiple definition of `wxAppConsole::ProcessPendingEvents()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x9d0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole11FilterEventER7wxEvent':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:305: multiple definition of `wxAppConsole::FilterEvent(wxEvent&)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xa60): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZNK12wxAppConsole11HandleEventEP12wxEvtHandlerMS0_FvR7wxEventES3_':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:320: multiple definition of `wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xa70): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole13OnInitCmdLineER15wxCmdLineParser':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:336: multiple definition of `wxAppConsole::OnInitCmdLine(wxCmdLineParser&)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xac0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole15OnCmdLineParsedER15wxCmdLineParser':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:375: multiple definition of `wxAppConsole::OnCmdLineParsed(wxCmdLineParser&)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xb00): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole13OnCmdLineHelpER15wxCmdLineParser':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:389: multiple definition of `wxAppConsole::OnCmdLineHelp(wxCmdLineParser&)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xc10): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole14OnCmdLineErrorER15wxCmdLineParser':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:396: multiple definition of `wxAppConsole::OnCmdLineError(wxCmdLineParser&)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xc30): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole17CheckBuildOptionsEPKcS1_':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:411: multiple definition of `wxAppConsole::CheckBuildOptions(char const*, char const*)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xc50): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase15CreateLogTargetEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:478: multiple definition of `wxConsoleAppTraitsBase::CreateLogTarget()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xf10): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase19CreateMessageOutputEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:485: multiple definition of `wxConsoleAppTraitsBase::CreateMessageOutput()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xfc0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase16CreateFontMapperEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:492: multiple definition of `wxConsoleAppTraitsBase::CreateFontMapper()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0xfe0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase14CreateRendererEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:499: multiple definition of `wxConsoleAppTraitsBase::CreateRenderer()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x1080): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase9HasStderrEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:512: multiple definition of `wxConsoleAppTraitsBase::HasStderr()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x1090): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase18ScheduleForDestroyEP8wxObject':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:518: multiple definition of `wxConsoleAppTraitsBase::ScheduleForDestroy(wxObject*)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x10a0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase23RemoveFromPendingDeleteEP8wxObject':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:523: multiple definition of `wxConsoleAppTraitsBase::RemoveFromPendingDelete(wxObject*)'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x10c0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN22wxConsoleAppTraitsBase26GetSocketGUIFunctionsTableEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:529: multiple definition of `wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x10d0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `Z6wxExitv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:631: multiple definition of `wxExit()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x10e0): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `Z12wxWakeUpIdlev':
d:/wxWidgetsEclipse2.8.9/build/msw/../../src/common/appbase.cpp:644: multiple definition of `wxWakeUpIdle()'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.text+0x1110): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole16OnFatalExceptionEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../include/wx/app.h:(.bss+0x0): multiple definition of `wxAppConsole::ms_appInstance'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.bss+0x4): first defined here
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28ud.a(baselib_appbase.o): In function `ZN12wxAppConsole16OnFatalExceptionEv':
d:/wxWidgetsEclipse2.8.9/build/msw/../../include/wx/app.h:(.bss+0x4): multiple definition of `wxAppConsole::ms_appInitFn'
d:/wxWidgetsEclipse2.8.9/lib/gcc_lib/libwxbase28u.a(baselib_appbase.o):appbase.cpp:(.bss+0x0): first defined here
collect2: ld returned 1 exit status
mingw32-make[1]: *** [Debug/minimal] Error 1
mingw32-make.exe: *** [All] Error 2
0 errors, 0 warnings, total time: 00:00:02 seconds
----------Build Ended----------

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't create a wxWidgets Project

Post by eranif »

can u post your project?

Maybe if I will look it at here, it will be quicker

Eran
Make sure you have read the HOW TO POST thread
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: Can't create a wxWidgets Project

Post by coder99 »

Looks like the .lib extensions was my mistake when copying the libraries - I cut & pasted from MSVC.

For this project I was following the wxWidgets tutorial but named it minimal.

I have meanwhile resolved all problems with this project and can now compile and run both the release and debug versions.

A very big Thank you for both the software and your patience in helping me sort this out.

There are still times when it seems I have to exit CL and restart before I can have it do what I expect, but that could easily be (more) finger problems at my end ;-)

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

Post Reply