User forums > Help

willling to use codeblocks and wxwidgets

(1/2) > >>

nesquik:
I am trying to learn to work with an open source IDE for C++. I do image processing and data acquisition. Until now I used specialised software (like halcon, labview, matlab) for this.  But they also provide SDK’s  that work with C++. Therefore I want to start working with C++. I had a little bit experience with DevCpp but I want to compare to IDE: wxDevCpp and Codeblocks with wxWidgets. I installed wxDevCpp already but I really  want to try CodeBlocks as well. For some time now I am reading posts on the forum, the wikipage and I just don’t seem to get it working. Probably because I don’t now enough of C++ programming

I installed codeblocks using: codeblocks-1.0rc2_mingw.exe
I installed codeblocks using: wxMSW-2.6.3-Setup-1.exe
I installed MingW using:MinGW-5.0.2.exe
Then set the path variabele to the mingW directory

Then :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

but then : http://forums.codeblocks.org/index.php?topic=1701.0 and http://forums.codeblocks.org/index.php?topic=3332.0
says
Open the project CodeBlocks.cbp. You will be prompted to define the global variable $(#wx). Enter the location where you unpacked wxWidgets.

I can’t find this project and so I am not prompted for a global variable

So I already adapted build/compileroptions:

Linker:
 C:\wxWidgets-2.6.3\lib\gcc_dll\libwxmsw26u.a;

Compiler
C:\CodeBlocks\include
C:\wxWidgets-2.6.3\include
C:\wxWidgets-2.6.3\contrib\include
C:\wxWidgets-2.6.3\lib\gcc_dll\mswu

But then I don’t know what to do

I am thinking of looking at what is called nightly build but I don’t see how they can help me?
In how to use nightly build they say:So the best thing is install your nightly into a different directory from the one used for your RC2 installation. For that matter, just remove RC2.

An extra question maybe: Once Codeblocks works with wxwidgets Is it then possible to make form with toolbars and buttons like with wxdevcpp or to I need extra plugins therefore?

I really spend some time looking for answers in the forum but it didn’t find the solution. I know you had these questions probably a 100 times but after trying it meself I had to admit I need some help since:

PS: patch 2 is not yet installed

christopher72:
* for using a global variable 'wx':
- go to 'settings' -> 'compiler and debugger'. 
- click the 'other options' tab under the 'compiler' tab.
- add  "$(#wx)" to the text field. (without the quotation marks of course...)
- compile something. The "Global Variable Editor" dialog will appear, and you can choose your wxWidgets directory which will be assigned to the 'wx' variable.

* make sure you have the following #defines set in your build options / target options:
__GNUWIN32__
__WXMSW__
WXUSINGDLL

* to create dialogs, you can use the 'wxsmith' plugin, which is included in nightly builds. I can't help you here, since i never used the plugin. I created my dialogs with wxGlade, which also produced the source code for me.

* you need to realize that you can set compiler / linker options in three different places:
- globally, through settings->compiler and debugger,
- project, through project->build options,
- targets, through project->properties->'targets' tab.  Targets come in handy if you wish to build 'release' and 'debug' versions of your project, or even want to use a different compiler. 

* if you still encounter problems, give us the error messages your compiler generates.

thomas:

--- Quote ---Open the project CodeBlocks.cbp. You will be prompted to define the global variable $(#wx). Enter the location where you unpacked wxWidgets.
I can’t find this project and so I am not prompted for a global variable
--- End quote ---
You did not read properly.
First, you refer to the document "Compiling Code::Blocks for Windows". Unless you really want to compile Code::Blocks from source (which you apparently don't), there is no point in opening that project, and it is not surprising that you cannot find it, as it belongs to the Code::Blocks sources, not to wxWidgets.
Second, it says very clearly "Code::Blocks RC2 does not support global compiler variables" right under the first heading that's called "Note for RC2 users". Therefore, as long as you are using RC2, it is of no avail to think about global compiler variables.

If you are interested in using a nightly build, these are available at the BerliOS project page. You will need to download two packages, one for the wxWidgets shared library, and one for the executable. These come in separate packages, so people don't need to download the same library over and over again all the time. You don't need to download the third package with the MinGW library since you can copy it to the Code::Blocks folder from your MinGW distribution, it is the very same one (if you feel better downloading everything in one batch and unpacking everything in one go, you can of course do that, too).

christopher72:
hm, i can still add global variables in nightly build (june 9th), but i guess they don't actually do anything.
the rest of my info hopefully still stands though. ;-)

Michael:

--- Quote from: christopher72 on July 06, 2006, 11:46:53 pm ---hm, i can still add global variables in nightly build (june 9th), but i guess they don't actually do anything.
the rest of my info hopefully still stands though. ;-)

--- End quote ---

Hello,

this may eventually help:

http://wiki.codeblocks.org/index.php?title=Global_user_variables

Best wishes,
Michael

Navigation

[0] Message Index

[#] Next page

Go to full version