Author Topic: Code::Blocks + wxPack...  (Read 24222 times)

StateS

  • Guest
Code::Blocks + wxPack...
« on: September 08, 2006, 10:45:25 am »
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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9695
Re: Code::Blocks + wxPack...
« Reply #1 on: September 08, 2006, 11:20:49 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

StateS

  • Guest
Re: Code::Blocks + wxPack...
« Reply #2 on: September 08, 2006, 12:04:21 pm »
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...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2718
Re: Code::Blocks + wxPack...
« Reply #3 on: September 08, 2006, 01:20:53 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



« Last Edit: September 08, 2006, 01:24:18 pm by Pecan »

StateS

  • Guest
Re: Code::Blocks + wxPack...
« Reply #4 on: September 08, 2006, 01:31:45 pm »
ok. I did that but the same message appears anyway...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2718
Re: Code::Blocks + wxPack...
« Reply #5 on: September 08, 2006, 01:37:19 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

  • Guest
Re: Code::Blocks + wxPack...
« Reply #6 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9695
Re: Code::Blocks + wxPack...
« Reply #7 on: September 08, 2006, 02:32:34 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

StateS

  • Guest
Re: Code::Blocks + wxPack...
« Reply #8 on: September 08, 2006, 03:01:25 pm »
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]

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Code::Blocks + wxPack...
« Reply #9 on: September 08, 2006, 03:08:31 pm »
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]

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Code::Blocks + wxPack...
« Reply #10 on: September 08, 2006, 03:10:00 pm »
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:
Code
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

  • Guest
Re: Code::Blocks + wxPack...
« Reply #11 on: September 08, 2006, 03:39:35 pm »
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?

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Code::Blocks + wxPack...
« Reply #12 on: September 08, 2006, 06:33:13 pm »
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:
Code
$(#wx)\lib\gcc_
To:
Code
$(#wx)\lib\gcc_lib

and also add to 'TopLevelTarget -> Linker -> Link Libraries'
Code
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]
« Last Edit: September 08, 2006, 06:37:01 pm by RJP Computing »
- Ryan

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

sethjackson

  • Guest

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Code::Blocks + wxPack...
« Reply #14 on: September 08, 2006, 07:59:51 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
Quote
Zc: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