News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Code::Blocks + wxPack...

Started by StateS, September 08, 2006, 10:45:25 AM

Previous topic - Next topic

StateS

I've installed the latest MinGW, Code::Blocks Nightly Build and wxPack on my PC, the version of wxPack includes wxWidgets v2.7.0. How do I use the latest wxWidgets with Code::Blocks? Do I just point it to the directory where wxWidgets is found?

MortenMacFly

Quote from: StateS on September 08, 2006, 10:45:25 AM
Do I just point it to the directory where wxWidgets is found?
There is no "wxWidgets settings" inside Code::Blocks. You just need to setup your project options (compiler/linker) to the appropriate folders. C::B itself uses wxWidgets 2.6.3 internally but that usually shouldn't matter to you. What counts for you is against what you are compiling/linking.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

StateS

Right... So I try to create a new "wxWidgets application" project with CodeBlocks... then it asks for the directory of wxWidgets, which I point it to... then it comes up with a whole mess of other things which I don't know what to do... then it says "A matching configuration could not be found in the wxWidgets directory you specified. This means that your project will not build. Are you sure you want to continue with these settings?"... What is it that I'm doing wrong? Before all of this, when CodeBlocks asked where wxWidgets was it had this variable thing in the textbox... something like $(#wx) or something like that... But now it doesn't show up anymore...

Pecan

#3
Quote from: StateS on September 08, 2006, 12:04:21 PM
Before all of this, when CodeBlocks asked where wxWidgets was it had this variable thing in the textbox... something like $(#wx) or something like that... But now it doesn't show up anymore...

Settings->Global variables




StateS

ok. I did that but the same message appears anyway...

Pecan

Quote from: StateS on September 08, 2006, 01:31:45 PM
ok. I did that but the same message appears anyway...

Please turn on full compile logging and paste the results here.
Also, system, CodeBlocks version, wxWidgets version

//-- Full Compile Logging --
Settings->Compiler and Debugger->"Other"->Compiler logging = "Full command line".

StateS

the error doesn't apper when I'm compiling... it happens when I'm trying to create a project... CodeBlocks Nightly Build September 7 2006, wxWidgets 2.7.0. Windows XP SP2 system.

MortenMacFly

Quote from: StateS on September 08, 2006, 02:18:43 PM
the error doesn't apper when I'm compiling... it happens when I'm trying to create a project... CodeBlocks Nightly Build September 7 2006, wxWidgets 2.7.0. Windows XP SP2 system.
Please tell us the directory structure of wxWidgets -> where are the includes and where o you have the libs? Then please explain in detail what settings from the wizard you don't understand (or post a screenshot of the appropriate dialog). This will help us to explain.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

StateS

OK, the part which I don't understand is pretty much the two dialogs after the one which asks you for the directory of wxwidgets. From what I think... It's to build the widgets right? but if that's true then that doesn't make sense cause I already have the widgets built... In wxPack they send a whole mess of prebuilt widgets, dll version, lib version, debug version etc... I have attached the tree listing of my wxwidgets directory and the screenshots of the two dialogs...


[attachment deleted by admin]

rjmyst3

When the wizard asks where to find wxWidgets, the default location is $(#wx) - that's good. That means it will use the global 'wx' variable to determine the location. Set the 'wx' global variable to the install location of wxPack - that is the root directory of the wxWidgets tree. The default in the wxPack install is C:\SourceCode\Libraries\wxWidgets2.7

Unfortunately, even when this is correct, the wizard still pops up the warning "A matching configuration could not be found in the wxWidgets directory you specified. This means that your project will not build. Are you sure you want to continue with these settings?". What is the wizard looking for?

The warning can be ignored with wxPack, in some cases. If I leave the default checkboxes checked, on the last page (see screenshot), the wizard sets up the project with the correct paths. It does assume that you'll be linking to version 2.6, you'll need to change the linked library to libwxmsw27u.a.

However, if I uncheck the box for "Use wxWidgets DLL", the generated linker path is "$(#wx)\lib\gcc_" instead of "$(#wx)\lib\gcc_lib".

You can definately use Code::Blocks to make projects that use wxPack, however, it looks like the wizard is looking for some configuration files that wxPack either does not have, or does not have in the right place.

If the authors of the wizard would post exactly what they are looking for, as far as configuration, and it is determined that that is the best approach, I'm sure wxPack could be updated.

Hopefully, in the future, these two tools will work better together.



[attachment deleted by admin]
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

RJP Computing

You can disregard that warning. I am not sure what the wizard is actually looking for, but you do need to set the Global Variable to the base directory of the wxPack install.

Example:
C:\SourceCode\Libraries\wxWidgets2.7

1. Then once it creates the files open the 'Build Options' ans click the top level target.
2. Choose the 'Linker' tab.
3. Change the 'Link Libraries' to have a 27 instead of the 26.
      Example: libwxmsw26u.a -> libwxmsw27u.a
      (See screenshot)

[attachment deleted by admin]
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB

StateS

So basically I can just go ahead and click next in everything and it will work fine right? All i have to do is modify that linker setting?

RJP Computing

#12
This is for the "Using wxWidgets DLL" checked.

I guess when you un-check the "Using wxWidgets DLL" it requires you to change the 'TopLevelTarget -> Directories -> Linker' tab from:
$(#wx)\lib\gcc_
To:
$(#wx)\lib\gcc_lib

and also add to 'TopLevelTarget -> Linker -> Link Libraries'
comctl32
ole32
oleaut32
uuid


You can look at the attached screen shots for some details on the Wizard setup, Bug in wizard generated directories, and the link libraries needed.

[attachment deleted by admin]
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB


RJP Computing

Quote from: sethjackson on September 08, 2006, 07:08:39 PM
Fix is here. :)

http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1465&group_id=5358
Nice job. I haven't tested it yet, but there are many problems with choosing vc as your compiler. To see all the steps required to get the wxWidgets wizard up to working condition with Visual C++ please look at the tutorial here.

Please take special note of the
QuoteZc:wchar_t-

(More information: This setting should be in the Compiler|Compiler Flags tab, but it isn't, so we are adding it manually.)

The difference is that VC8.0 turns this setting ON by default and in VC7.1 you can just turn it on. So I imagine that this was an oversight when making the VC8.0 support. I can make a separate thread for this issue if you think that is necessary.
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB