Author Topic: Compiling wxDFast, codeblocks dosen't work, regular old-fashioned method does.  (Read 8479 times)

Offline Racecar56

  • Single posting newcomer
  • *
  • Posts: 5
  • Linux User
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.
Racecar 56

Don't ask what OS I use, it is Linux if I don't say anything.
It always will be Linux unless I mention otherwise.
Google is NOT my friend. ixquick pwns it: www.ixquick.com

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
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.

Code
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
« Last Edit: June 01, 2009, 07:09:48 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Racecar56

  • Single posting newcomer
  • *
  • Posts: 5
  • Linux User
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.
Racecar 56

Don't ask what OS I use, it is Linux if I don't say anything.
It always will be Linux unless I mention otherwise.
Google is NOT my friend. ixquick pwns it: www.ixquick.com

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
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
Code
WXCONFIG = $(WXWIDGETS_DIR)wx-config --debug=yes
to
Code
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.
« Last Edit: June 01, 2009, 09:31:23 am by jens »

Offline Racecar56

  • Single posting newcomer
  • *
  • Posts: 5
  • Linux User
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.

Code
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.

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
Code
WXCONFIG = $(WXWIDGETS_DIR)wx-config --debug=yes
to
Code
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! : >
Racecar 56

Don't ask what OS I use, it is Linux if I don't say anything.
It always will be Linux unless I mention otherwise.
Google is NOT my friend. ixquick pwns it: www.ixquick.com

Offline Racecar56

  • Single posting newcomer
  • *
  • Posts: 5
  • Linux User
||=== 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 ===|
Racecar 56

Don't ask what OS I use, it is Linux if I don't say anything.
It always will be Linux unless I mention otherwise.
Google is NOT my friend. ixquick pwns it: www.ixquick.com

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
||=== 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:
And you most likely have to add USE_EXTERNAL_XRC to "Build options -> Compiler settings -> #defines" (not if you use Makefile.gcc).

Offline Racecar56

  • Single posting newcomer
  • *
  • Posts: 5
  • Linux User
||=== 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:
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>
« Last Edit: June 01, 2009, 10:58:34 pm by Racecar56 »
Racecar 56

Don't ask what OS I use, it is Linux if I don't say anything.
It always will be Linux unless I mention otherwise.
Google is NOT my friend. ixquick pwns it: www.ixquick.com

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
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) ?