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
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
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?
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
_teo_,
I would expect this is a wx-config issue.
Execute
wx-config --cflags
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:
-I/usr/lib/wx/include/gtk-unicode-release-2.6
tells me that I'm using version 2.6, whereas
-I/opt/wx/2.7/lib/wx/include/gtk2-unicode-release-2.7
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
sudo update-alternatives --config wx-config
This should show you a list of alternatives for wx-config. For me, it reports:
Selection Alternatives
----------------------------------------------------------
1 /usr/lib/wx/config/gtk2-unicode-release-2.6
2 /opt/wx/2.7/bin/wx-config
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?
Quote from: stahta01 on October 20, 2006, 03:56:13 PM
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.
Ok, I will check include path and post here my observations. Thanks anyway.
Quote from: stahta01 on October 20, 2006, 03:56:13 PM
I am still try to figure out how to install GCC on Linux.
Btw, which distribution do you use? It should be fairly easy task to install compiler and rest tools for C/C++ development.
Quote from: rjmyst3 on October 20, 2006, 04:23:14 PM
_teo_,
I would expect this is a wx-config issue.
This sounds logical (like Java Runtime). I'll give it a try later today and will post here (I am at work).
Quote from: _teo_ on October 20, 2006, 04:38:42 PM
Btw, which distribution do you use? It should be fairly easy task to install compiler and rest tools for C/C++ development.
I was trying Kubuntu but gave up to many problems and not enough directions, I am trying Ubuntu 6.06 Dapper release but can't get my dialup to work. And the Package software says GCC is installed but GCC --version says it can't find the command. I plan to build a different computer out of the spare parts I have; because, I think the dialup is a hardware issue. Also, thinking about trying VM version of Ubuntu under windows. I am starting to think I may have to wait till I get broadband connection before I can get Linux to work.
Tim S
Quote from: stahta01 on October 20, 2006, 05:01:26 PM
I was trying Kubuntu but gave up to many problems and not enough directions, I am trying Ubuntu 6.06 Dapper release but can't get my dialup to work.
www.linmodems.org - I had troubles with my modem as well (SuSE), but I switched finally to DSL. I had no chance to use that modem.
Quote from: stahta01 on October 20, 2006, 05:01:26 PM
And the Package software says GCC is installed but GCC --version says it can't find the command.
Well, I am sure you know about www.ubuntuforums.org. Have you asked there about GCC? I got it from repositories.
Quote from: stahta01 on October 20, 2006, 05:01:26 PM
I plan to build a different computer out of the spare parts I have; because, I think the dialup is a hardware issue. Also, thinking about trying VM version of Ubuntu under windows. I am starting to think I may have to wait till I get broadband connection before I can get Linux to work.
I am not a geek and probably cannot help you further, but if I can, you are welcome.
Quote from: stahta01 on October 20, 2006, 05:01:26 PM
And the Package software says GCC is installed but GCC --version says it can't find the command.
Commands are case-sensitive in linux.
try:
gcc --version
Also you can get every thing to need to build by installing the build-essential package.
sudo apt-get install build-essential
Quote from: stahta01 on October 20, 2006, 05:01:26 PM
Quote from: _teo_ on October 20, 2006, 04:38:42 PM
Btw, which distribution do you use? It should be fairly easy task to install compiler and rest tools for C/C++ development.
I was trying Kubuntu but gave up to many problems and not enough directions, I am trying Ubuntu 6.06 Dapper release but can't get my dialup to work. And the Package software says GCC is installed but GCC --version says it can't find the command. I plan to build a different computer out of the spare parts I have; because, I think the dialup is a hardware issue. Also, thinking about trying VM version of Ubuntu under windows. I am starting to think I may have to wait till I get broadband connection before I can get Linux to work.
Tim S
Did you really type in GCC --version ? If yes, you have to type gcc --version (lowercase "gcc", linux handles everything casesensitive). Also make sure that you installed g++, too.(I've been too slow :? ). Don't forget the package
zip or it won't build either.
For your problem with the modem, go to the linmodems page or ask in www.ubuntuforums.org . Please also post the output of
/sbin/lspci (perhaps you have to run it as root) in the forum (or first search in google with the exact modem info ;)).
You can pm me the output. I can search a bit for you, if you don't find the right resources :)
Daniel
I will try it in lower case. But, I think I did do it in lower case.
I can't do this sudo apt-get install build-essential till I get a internet connection or is this on the install CD-ROM?
Tim S
rjmyst3, you are right. Both 2.6 and 2.7 were there. Now I am compiling CB and hope... :)
Yes!!! I got it working! And now the fun begins... :D
Quote from: stahta01 on October 20, 2006, 07:30:06 PM
I can't do this sudo apt-get install build-essential till I get a internet connection or is this on the install CD-ROM?
build-essential tools are on the "alternate" install CD, which you can add to Synaptic
Thank you.
I will download the "alternate" install CD under windows and try it that way.
Edit: I have started on ubuntu-6.06.1-alternate-i386.jigdo no idea how long it will take.
Edit: jigdo failed, I think I must have typed GCC instead of gcc since the desktop cd should have GCC package on it.
Tim S