Author Topic: Compiling doesnt works  (Read 3381 times)

scarvenger

  • Guest
Compiling doesnt works
« on: August 24, 2006, 03:19:03 am »
I cant do wxWidgets to work on C::B what exactly should i do? I already downloaded the wxWidgets, i am using windows Xp, thank you

Offline Indrekis

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Compiling doesnt works
« Reply #1 on: August 24, 2006, 06:08:56 am »
You need to provide more information about your problem if you want to get help.

1.)
What do you mean, saying "can't do wxWidgets to work on CB"?
You want to develop wxWidgets based applications, using CB as IDE?
Or you want to do some development for the CB?

2.)
Quote
I already downloaded the wxWidgets
Which version?
Have you downloaded some binary (unofficial?) distribution or devpak,
or sources?
If you downloaded sources, have your compiled them?

3.)
Which version of CodeBlocks are you using?

4.)
Which compiler are you using?

Supposing you are using mingw/gcc and new enough nighty build of CB
(If you are using RC2, it do worth updating 8)):

You need compiled wxWidgets before using it!
If you downloaded sources of wxWidgets, and do not have MSYS, please read
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_%28MSW%29
If you have MSYS, you also can do the following:

Extract sources into some folder, for example d:/wxWidgets/sources/wxwidgets263
(In windows paths "/" and "\" are almost interchangeable, but for MSYS it is crucial to use "/" or at least "\\")
Then:
<begin of shell commands>
cd d:/wxWidgets/sources/wxwidgets263
mkdir BUILD
cd BUILD
../configure --with-msw --enable-monolithic --enable-unicode --prefix="d:/wxWidgets/FirstBuild"
make
make install
<end of shell commands>

--prefix="..." shows place, where you want wxWidgets to be installed.
Running "../configure --help" you may see many additional options.
Also it worth reading <wxWidgets_src>/docs/msw/install.txt


If you have compiled wxWidgets, you can use CB wizard to create corresponding project.
Menu File/New/Project;
In the appeared "New from template dialog" select "wxWidgets application"
Wizard asks some questions (here I present most important):
Project title, folder to create project in, location of the wxWidgets (folder which contains headers and libs of wxWidgets, in above case - d:/wxWidgets/FirstBuild (value of prefix :))) and some other...

After the project is generated, you may need to adjust path to the current setup.h file and libraries (wizard guesses/defaults are not always correct).
For example, in Project/Build options/Directories/Compiler add something like
d:\wxWidgets\FirstBuild\lib\wx\include\msw-unicode-debug-2.6
or
$(#wx.lib)\wx\include\msw-unicode-debug-2.6
- path to setup.h

Then, compile, run and so on....


Additionaly, you can search through the forums. For example:
http://forums.codeblocks.org/index.php?topic=3035.0


Please, excuse both my English (it's not my native language) and my guesses about you problem - for more accurate advice additional information is necessary.