I want to compile wxDFast (on Linux obviously), but it can't seem to find my includes of wx-2.6 and wx-2.8 (I think it uses 2.8, I tried both .6 and .8,) and it fails to detect them. How do I configure it to see the wxWidgets includes? They are in /usr/include/wx-2.8 for 2.8 and /usr/include/wx-2.6 for 2.6. I can't get either to work. I (think I) am using GCC. I tried 2 methods. Using Plugins>Library Finder (didn't work), and using the properties thing in 'search directories'. I'm not really new to CodeBlocks but I don't have much experience with it.
I am windows user; so, I am just repeating what I read.
Try running the below on command line and see if results look right.
wx-config --libs
wx-config --cflags
Edit: The wxDFast.cbp does not work right under WinXP so it might not be good under Linux either
Tim S
wx-config --libs:
-pthread -Wl,-Bsymbolic-functions -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
wx-config --cflags:
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
Notice that the old-fashiones './configure && make' method works perfectly. I think it is a codeblocks problem. By the way it''s v8.02 on Ubuntu 9.04.
Quote from: Racecar56 on June 01, 2009, 07:13:48 AM
Notice that the old-fashiones './configure && make' method works perfectly. I think it is a codeblocks problem. By the way it''s v8.02 on Ubuntu 9.04.
does make -f Makefile.gcc work?
The Code::Blocks project just uses Makefile.gcc. But, the Makefile.gcc does not work under windows.
Tim S
I just tested it and if you compile the release version the cbp-file works straightforward under linux.
The debug-version tries to use a wxWidgets debug version, what is not available in most cases.
You have to change line 22 of Makefile.gcc from WXCONFIG = $(WXWIDGETS_DIR)wx-config --debug=yes to WXCONFIG = $(WXWIDGETS_DIR)wx-config --debug=no or leave the --debug-parameter away.
You can also use the project-file as "real" cbp-file.
Just uncheck the This is a custom Makefile-checkbox in the "Project properties -> Project settings", fix the output paths in "Project properties -> Build targets" to meet different directories (or the debug-build overrides the release-build and vice-versa) and remove the "wxDFast.rc"-file (windows-resource-file) from the project.
And you most likely have to add USE_EXTERNAL_XRC to "Build options -> Compiler settings -> #defines" (not if you use Makefile.gcc).
EDIT:
if you fix the output path for the executable, you also have to copy the resources-subdir to the output-dir (probably in the post-build-step.
Quote from: stahta01 on June 01, 2009, 06:56:23 AM
I am windows user; so, I am just repeating what I read.
Try running the below on command line and see if results look right.
wx-config --libs
wx-config --cflags
Edit: The wxDFast.cbp does not work right under WinXP so it might not be good under Linux either
Tim S
Yes, it does work.
Quote from: jens on June 01, 2009, 09:11:45 AM
I just tested it and if you compile the release version the cbp-file works straightforward under linux.
The debug-version tries to use a wxWidgets debug version, what is not available in most cases.
You have to change line 22 of Makefile.gcc from WXCONFIG = $(WXWIDGETS_DIR)wx-config --debug=yes to WXCONFIG = $(WXWIDGETS_DIR)wx-config --debug=no or leave the --debug-parameter away.
You can also use the project-file as "real" cbp-file.
Just uncheck the This is a custom Makefile-checkbox in the "Project properties -> Project settings", fix the output paths in "Project properties -> Build targets" to meet different directories (or the debug-build overrides the release-build and vice-versa) and remove the "wxDFast.rc"-file (windows-resource-file) from the project.
And you most likely have to add USE_EXTERNAL_XRC to "Build options -> Compiler settings -> #defines" (not if you use Makefile.gcc).
EDIT:
if you fix the output path for the executable, you also have to copy the resources-subdir to the output-dir (probably in the post-build-step.
Thanks! : >
||=== wxDFast, Release ===|
obj/Release/src/wxDFast.o||In function `mApplication::OnInit()':|
wxDFast.cpp:(.text+0x5797)||undefined reference to `InitXmlResource()'|
||=== Build finished: 1 errors, 0 warnings ===|
Quote from: Racecar56 on June 01, 2009, 09:34:55 PM
||=== wxDFast, Release ===|
obj/Release/src/wxDFast.o||In function `mApplication::OnInit()':|
wxDFast.cpp:(.text+0x5797)||undefined reference to `InitXmlResource()'|
||=== Build finished: 1 errors, 0 warnings ===|
That's why I wrote:
Quote from: jens on June 01, 2009, 09:11:45 AM
And you most likely have to add USE_EXTERNAL_XRC to "Build options -> Compiler settings -> #defines" (not if you use Makefile.gcc).
Quote from: jens on June 01, 2009, 09:39:27 PM
Quote from: Racecar56 on June 01, 2009, 09:34:55 PM
||=== wxDFast, Release ===|
obj/Release/src/wxDFast.o||In function `mApplication::OnInit()':|
wxDFast.cpp:(.text+0x5797)||undefined reference to `InitXmlResource()'|
||=== Build finished: 1 errors, 0 warnings ===|
That's why I wrote:
Quote from: jens on June 01, 2009, 09:11:45 AM
And you most likely have to add USE_EXTERNAL_XRC to "Build options -> Compiler settings -> #defines" (not if you use Makefile.gcc).
It still does it.
EDIT: NVM.
Just had to recompile the whole thing, and it worked. At last.
</thread>
Quote from: Racecar56 on June 01, 2009, 10:41:22 PM
It still does it.
Did you rebuild the project, not just build ?
Or at least save
wxDFast.cpp with a new timestamp, to force the cobject-file to be rebuild (add and remove a space at the end of a line and save the file, or something similar) ?