User forums > Help

Cannot build on Ubuntu 6.06 (64 bit)

(1/4) > >>

_teo_:
Hello *,

First of all, I'm new here and if this is wrong place for my questions, please let me know which is better suited.

I tried last night (>6 hours) to build CB on my system and I couldn't. I use Ubuntu 6.06 - 64 bit version.

All prerequisites are met. I followed the "Installing Code::Blocks from source on Linux" wiki page. The wxGTK library is available in repositories. It says that it is version 2.6-0. I installed wx-common as well.

So, I run bootstrap and configure without errors. But make fails. Some problems are listed below:
- wxHIDE_READONLY - I just commented that out
- the compiler complains that the Numpad keys are defined twice (or three times) - I just commented out duplications
- at some places CenterOnScreen function wasn't found - well it isn't that important (commented out)
- some functions were with different parameter types and return types - mainly I had to add unsigned
- wxDynamicCast couldn't cast wxWindow* to const wxFrame* (static_cast is involved) - I just removed that parts, although this could lead to misbehavior later
- and at the end I gave up when I hit the WX_DEFINE_ARRAY macro...

My questions are:
1) which wxWidgets library do you use?
2) is there anything else that I should take into account while building?

I really don't believe that one should hit that many problems while building CB. I must have done something wrong.

Any help is appreciated.
Teo

stahta01:
wxHIDE_READONLY - I just commented that out
- the compiler complains that the Numpad keys are defined twice (or three times) - I just commented out duplications

The above two errors imply that you are using 2.7 not 2.6 version of wxWidgets. Please verify the version being used. Other than that I can't help you, since I use windows.

Codeblocks does not work with 2.7 versions of wxWidgets. The recommended is 2.6.3 with patch 2, I think it will work with 2.6.2 version of wxWidgets. This is under windows not sure if it applies to Linux etc.

I would look at this link and see if it helps
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#wxWidgets_build

Tim S

_teo_:
Good hit, Tim. I tried to compile 2.7 first (this is the problem). Later I found the wiki page you are referring to and followed instructions.

Perhaps I failed to uninstall the 2.7 version. I typed "make uninstall" as root in same directory where I compiled it before and it said that there is nothing to do. So, I continued with the version in repositories. Any idea on how to properly uninstall 2.7?

stahta01:
I think you are going to need a Linux person to help you. I am still try to figure out how to install GCC on Linux. So, I can't help you. I just recognized the errors because I am trying to build C::B with 2.7 under windows.
Note: The error is caused under windows because the wrong include files are being used. It is not a library/so issue. So, I would look for the include files for wxWidgets 2.7 and see if deleting them help or at least rename the top folder.

Tim S

rjmyst3:
_teo_,
 I would expect this is a wx-config issue.
 Execute

--- Code: ---wx-config --cflags
--- End code ---
in the terminal. It should dump compiler flags used with gcc. Look for one starting with -I to determine which version of wxWidgets you're compiling with.
For example:

--- Code: ----I/usr/lib/wx/include/gtk-unicode-release-2.6
--- End code ---
tells me that I'm using version 2.6, whereas

--- Code: ----I/opt/wx/2.7/lib/wx/include/gtk2-unicode-release-2.7
--- End code ---
would tell me that I'm using version 2.7.

If wx-config is returning the wrong version, then you probably have more than one copy of wx-config on your system, and you need to change the default to the one you'd like to use.

In a terminal, exectue

--- Code: ---sudo update-alternatives --config wx-config
--- End code ---
This should show you a list of alternatives for wx-config. For me, it reports:

--- Code: ---  Selection       Alternatives
----------------------------------------------------------
       1             /usr/lib/wx/config/gtk2-unicode-release-2.6
       2             /opt/wx/2.7/bin/wx-config

--- End code ---
So I would choose 1 to use the 2.6 version for building codeblocks.

After I'm done building codeblocks, I would run update-alternatives again to switch back to 2.7, for use with compiling my own projects.

Does that help?

Navigation

[0] Message Index

[#] Next page

Go to full version