Can't create a wxWidgets Project
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Can't create a wxWidgets Project
I'm trying to follow the wxWidgets project tutorial, and I get as far as creating a workspace, but after that things don't work.
When I highlight the just created work space, the wxWidgets icon becomes enabled, but when I click on it, nothing happens and I can't proceed following the rest of the tutorial.
What am I missing or how can I fix this
I have set the environment variables as suggested, but I am curious if these need to be adjusted if I wanted to build a release, non-Unicode ot statically linked version, since currently WXCFG points to the Unicode dynamically linked debug directory ?
TIA
When I highlight the just created work space, the wxWidgets icon becomes enabled, but when I click on it, nothing happens and I can't proceed following the rest of the tutorial.
What am I missing or how can I fix this
I have set the environment variables as suggested, but I am curious if these need to be adjusted if I wanted to build a release, non-Unicode ot statically linked version, since currently WXCFG points to the Unicode dynamically linked debug directory ?
TIA
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- 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
Hi,
Which tutorial and which OS?
It works fine here (XP & WX2.8.7)
Eran
Which tutorial and which OS?
It works fine here (XP & WX2.8.7)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Can't create a wxWidgets Project
Sorry for being unclear
OS: WinXP - I've added it now to my signature
The tutorial: wxdemo_gui.html
Later edit:
After restarting now, the wxWidget Project dialog does come up - I'll keep going with that for now and let you know if things change
Later yet:
I can now create the project, but I get a pile of errors.
According to:
http://codelite.org/WxWidgets/GettingRe ... derWindows
my environment variables are:
WXWIN d:\wxWidgetsEclipse2.8.9\
WXCFG gcc_lib\mswud
If I specify the extra include paths for the compiler, it does seem to find the header files, but quite obviously I need to define a bunch more things because I gett a lot of errors of the type:
But I'm unsure of how I make sure I get them all or specify them reasonably concisely.
OS: WinXP - I've added it now to my signature
The tutorial: wxdemo_gui.html
Later edit:
After restarting now, the wxWidget Project dialog does come up - I'll keep going with that for now and let you know if things change
Later yet:
I can now create the project, but I get a pile of errors.
According to:
http://codelite.org/WxWidgets/GettingRe ... derWindows
my environment variables are:
WXWIN d:\wxWidgetsEclipse2.8.9\
WXCFG gcc_lib\mswud
If I specify the extra include paths for the compiler, it does seem to find the header files, but quite obviously I need to define a bunch more things because I gett a lot of errors of the type:
Code: Select all
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:103:9: #error "wxUSE_DYNLIB_CLASS must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:111:9: #error "wxUSE_EXCEPTIONS must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:119:9: #error "wxUSE_FILESYSTEM must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:127:9: #error "wxUSE_FS_ARCHIVE must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:140:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:148:9: #error "wxUSE_LOG must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:156:9: #error "wxUSE_LONGLONG must be defined."
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- 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
Can u post the build log from the start?
the more interesting part is to see the command CodeLite is trying to execute
Eran
the more interesting part is to see the command CodeLite is trying to execute
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Can't create a wxWidgets Project
Code: Select all
Building:
"mingw32-make.exe" -j 2 -f "demo1_wsp.mk"
----------Building project:[ demo1 - Debug ]----------
g++ -c "C:/demo1/demo1_app.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -Id:\wxWidgetsEclipse2.8.9\lib\gcc_lib\mswud -Id:\wxWidgetsEclipse2.8.9\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -D__WX__ -o ./Debug/demo1_app.o -Id:/wxWidgetsEclipse2.8.9/include -Id:/wxWidgetsEclipse2.8.9/include/msvc
g++ -c "C:/demo1/demo1_frame.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -Id:\wxWidgetsEclipse2.8.9\lib\gcc_lib\mswud -Id:\wxWidgetsEclipse2.8.9\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -D__WX__ -o ./Debug/demo1_frame.o -Id:/wxWidgetsEclipse2.8.9/include -Id:/wxWidgetsEclipse2.8.9/include/msvc
In file included from d:/wxWidgetsEclipse2.8.9/include/wx/platform.h:196,
from d:/wxWidgetsEclipse2.8.9/include/wx/defs.h:21,
from d:/wxWidgetsEclipse2.8.9/include/wx/event.h:15,
from d:/wxWidgetsEclipse2.8.9/include/wx/window.h:19,
from d:/wxWidgetsEclipse2.8.9/include/wx/toplevel.h:21,
from d:/wxWidgetsEclipse2.8.9/include/wx/frame.h:19,
from C:/demo1/demo1_frame.h:4,
from C:/demo1/demo1_frame.cpp:1:
d:/wxWidgetsEclipse2.8.9/include/msvc/wx/setup.h:247:6: #error "This file should only be included when using Microsoft Visual C++"
In file included from d:/wxWidgetsEclipse2.8.9/include/wx/platform.h:293,
from d:/wxWidgetsEclipse2.8.9/include/wx/defs.h:21,
from d:/wxWidgetsEclipse2.8.9/include/wx/event.h:15,
from d:/wxWidgetsEclipse2.8.9/include/wx/window.h:19,
from d:/wxWidgetsEclipse2.8.9/include/wx/toplevel.h:21,
from d:/wxWidgetsEclipse2.8.9/include/wx/frame.h:19,
from C:/demo1/demo1_frame.h:4,
from C:/demo1/demo1_frame.cpp:1:
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:103:9: #error "wxUSE_DYNLIB_CLASS must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:111:9: #error "wxUSE_EXCEPTIONS must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:119:9: #error "wxUSE_FILESYSTEM must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:127:9: #error "wxUSE_FS_ARCHIVE must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:140:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:148:9: #error "wxUSE_LOG must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:156:9: #error "wxUSE_LONGLONG must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:164:9: #error "wxUSE_MIMETYPE must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:180:9: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:188:9: #error "wxUSE_PROTOCOL must be defined."
d:/wxWidgetsEclipse2.8.9/include/wx/chkconf.h:230:9: #error "wxUSE_REGEX must be defined."
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- 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
You are mixing compilers/settings here.
However, the compiler used is g++
Which compiler are u using? MSVC or g++ ?
Eran
Code: Select all
-Id:/wxWidgetsEclipse2.8.9/include
-Id:/wxWidgetsEclipse2.8.9/include/msvc
Which compiler are u using? MSVC or g++ ?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Can't create a wxWidgets Project
I'd like to use MinGW, if possible
Removing that entry changes nothing in the output, as far as I can see.
Removing that entry changes nothing in the output, as far as I can see.
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- 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
Now, the question is:
Do you have wxWidgets installed for g++?
It looks like you dont ...
Eran
Do you have wxWidgets installed for g++?
It looks like you dont ...
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Can't create a wxWidgets Project
I think I do
I use the same setup with Eclipse CDT - I finally got it to compile and run the minimal sample. It is using g++ - see below
As best I can tell, I ran the same steps to download and compile the wxWidgets package as outlined in your instructions in getting ready for wxWidgets.
Later edit:
After I recalled that I was getting similar error messages with Eclipse, I set the compiler include paths the same and I seem to be able to compile the release and the debug versions
The compiler paths I had to set are:
d
In that order.
\Now it complains about not finding the libraries.
I will continue work on this to see how far I get.
Later yet:
the error message from the build step I now get is:
It looks like Codelite is looking for MS type libs, but there are no *.lib files in that directory, they all are libxxxxxx.a files and Eclipse is happy with them.
I use the same setup with Eclipse CDT - I finally got it to compile and run the minimal sample. It is using g++ - see below
Code: Select all
**** Build of configuration Release for project wxMinimal ****
**** Internal Builder is used for build ****
g++ -LD:\wxWidgetsEclipse2.8.9\lib\gcc_lib\mswu -LD:\wxWidgetsEclipse2.8.9\lib\gcc_lib -Wl,--subsystem,windows -owxMinimal.exe minimal.o -lwxmsw28u_xrc -ladvapi32 -lwxbase28u_odbc -lwxmsw28u_dbgrid -lwxbase28u_net -lwxmsw28u_richtext -lwxmsw28u_media -lwxmsw28u_aui -lwxmsw28u_html -lwxmsw28u_adv -lwxbase28u_xml -lwxmsw28u_core -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -lwsock32 -lodbc32
Build complete for project wxMinimal
Time consumed: 953 ms.
Later edit:
After I recalled that I was getting similar error messages with Eclipse, I set the compiler include paths the same and I seem to be able to compile the release and the debug versions
The compiler paths I had to set are:
d
Code: Select all
:/wxWidgetsEclipse2.8.9/include
"D:/wxWidgetsEclipse2.8.9/lib/gcc_lib/mswud"
"D:/wxWidgetsEclipse2.8.9/include/msvc"
\Now it complains about not finding the libraries.
I will continue work on this to see how far I get.
Later yet:
the error message from the build step I now get is:
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.lib -lwxmsw28u_html.lib -lwxmsw28u_adv.lib -lwxmsw28u_core.lib -lwxmsw28u_richtext.lib -lwxbase28u_xml.lib -lwxbase28u.lib -lwxtiff.lib -lwxjpeg.lib -lwxpng.lib -lwxzlib.lib -lwxregexu.lib -lwxexpat.lib -lwinmm.lib -lcomctl32.lib -lrpcrt4.lib -lwsock32.lib -lodbc32.lib -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
c:\mingw-3.4.5\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw28u_xrc.lib
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:00 seconds
----------Build Ended----------
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- 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
My guess is:
You imported the minimal using CL VS importer?
Who added these libraries?
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
You imported the minimal using CL VS importer?
Code: Select all
-lwxexpat.lib -lwinmm.lib -lcomctl32.lib -lrpcrt4.lib
Who added these libraries?
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
Make sure you have read the HOW TO POST thread