Author Topic: Get wxWidgets 3.0 to work on C::B, Win7  (Read 19549 times)

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Get wxWidgets 3.0 to work on C::B, Win7
« on: January 31, 2014, 11:48:42 pm »
Hello everyone ! It's my first post here, and great to see such a lively community of C::B users.

I am fairly new to programming in C++, and totally new to using 3rd party libraries, so please have patience and don't mind my silly questions  :) Today I have been trying to set up wxWidgets for use with C::B, with no success. I am using Win 7, 64 bit. I downloaded the latest version of C::B ( codeblocks-13.12mingw-setup.exe ), and the latest wxWidgets 3.0 package ( wxMSW-3.0.0_gcc471TDM_x64_ReleaseDLL.7z ) and installed both. I tried to follow the guide on this page : http://wiki.wxwidgets.org/CodeBlocks_Setup_Guide
I followed steps and did what it said, but honestly, I had no idea what was going on, because I have never before compiled a library. Nor do I know what these steps mean and what they do. I ended up with trying to run a basic wxWidget 3.0 project on C::B, but ( surprisingly !  ;D ) it didn't work, because of missing files / headers.

During the process of following the guide, I believe I have messed things up. Therefore, I would like to clean up the mess first. And then, hopefully with your help, set things up and running as they should be. I would greatly appreciate your guidance through the process, and if possible also an explanation of what the single steps are. It would benefit me greatly in my learning process, and probably to others with similar issues as well !  :)
Thank you very much, and keep up the great work with the forum  :)


Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #1 on: February 01, 2014, 01:38:03 am »
Read the stuff on this link http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

After glancing at that link it will be clear that you need to build wxWidgets or download a pre-built wxWidgets.
(Finding a correct pre-built wxWidgets 3.0 seems to be challenging at this time; found one with no info on which compiler
it is valid for and at 900 MB its to build for me to check.)

Have you decided on the Compiler you are going to be using?

Your prior post implied MinGW GCC; but, it was NOT clear to me if that was a decision on your part.

Tim S.
« Last Edit: February 01, 2014, 01:42:53 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #2 on: February 01, 2014, 01:46:05 am »
Thank you for your answer.

I will try to follow the instructions of your provided link. But most likely I still won't understand the process, and can repeat same mistakes again. Besides, I am afraid I have already made some "damage" during the setup, that can negatively affect my next attempt.

I didn't make any decision on Compiler. It seems C::B comes with MinGW GCC, so that sounds like a reasonable choice. If there are any big differences or considerations I should take, please don't save words. I have much to learn, and I have just started  :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #3 on: February 01, 2014, 01:52:00 am »
Thank you for your answer.

I will try to follow the instructions of your provided link. But most likely I still won't understand the process, and can repeat same mistakes again. Besides, I am afraid I have already made some "damage" during the setup, that can negatively affect my next attempt.

I didn't make any decision on Compiler. It seems C::B comes with MinGW GCC, so that sounds like a reasonable choice. If there are any big differences or considerations I should take, please don't save words. I have much to learn, and I have just started  :)

Other than wasting time and hard-disk space I know of no reason not to use "MinGW GCC".
(The waste happens if you decide to change versions or makes of compilers.)

When using Code::Blocks MinGW GCC is the normal choose for Windows users; but, MinGW GCC has many different versions to pick from.

Building wxWidgets on my slow 32 bit computer takes 2 hours and about 2 gigs of hard-drive space.

If you download a pre-built wxWidgets the compiler version needs to be an almost prefect match for it to work with your compiler selection.

Tim S.
« Last Edit: February 01, 2014, 01:54:38 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #4 on: February 01, 2014, 01:59:24 am »
Can you please point me to location of pre-built wxWidgets ? Is it a shortcut that can save me of the problems I am having with building ?
What procedure do I need to take, if it is different from the one on your link ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #5 on: February 01, 2014, 02:14:48 am »
Can you please point me to location of pre-built wxWidgets ? Is it a shortcut that can save me of the problems I am having with building ?
What procedure do I need to take, if it is different from the one on your link ?

You have high speed internet you can try download a 1 gigabyte file it would take me longer to download the file than to build.
And, you might be wasting time downloading a file you can't use.

Link to the new wxPack site https://github.com/rjpcomputing/wxpack/wiki

Reading more about the site; I am guessing you built wxWidgets MinGW64 both 32-bit and 64-bit.
If you decided to download wxPack; I suggest trying TDM version of MinGW64 and see if it works with wxPack before trying the MinGW64 version.

Tim S.
« Last Edit: February 01, 2014, 02:25:43 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #6 on: February 01, 2014, 02:20:54 am »

You have high speed internet you can try download a 1 gigabyte file it would take me longer to download the file than to build.
And, you might be wasting time downloading a file you can't use.

Link to the new wxPack site https://github.com/rjpcomputing/wxpack/wiki

Tim S.

Is this the one distro that includes the entire library + graphical development tools ? I have been looking for it, but didn't find it ( or didn't know that was it, ).

I can download 1 gigabyte file in a reasonable time. Why is this file 1 GB in size, but the built libraries that you mentioned take 2 GB ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #7 on: February 01, 2014, 02:28:51 am »

You have high speed internet you can try download a 1 gigabyte file it would take me longer to download the file than to build.
And, you might be wasting time downloading a file you can't use.

Link to the new wxPack site https://github.com/rjpcomputing/wxpack/wiki

Tim S.

Is this the one distro that includes the entire library + graphical development tools ? I have been looking for it, but didn't find it ( or didn't know that was it, ).

I can download 1 gigabyte file in a reasonable time. Why is this file 1 GB in size, but the built libraries that you mentioned take 2 GB ?

It is zipped up and the 2 GB was just a guess of total space used.

Try clicking on the downloads link. https://github.com/rjpcomputing/wxpack/wiki

The one with 3.0 in the name.

Quote
Reading more about the site; I am guessing you built wxWidgets MinGW64 both 32-bit and 64-bit.
If you decided to download wxPack; I suggest trying TDM version of MinGW64 and see if it works with wxPack before trying the MinGW64 version.

Hey, I just noticed the download has a link with the Compiler the wxWidgets was built with.
You will likely need both of the downloads. Skip the wxPack 2.8 unless you wish to do 2.8 in addition to 3.0 wxWidgets.

Note: The on-line info is better for 2.8 and CB works better with 2.8 so you might be better off with 2.8.

Tim S.
« Last Edit: February 01, 2014, 02:33:20 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #8 on: February 01, 2014, 02:42:16 am »
Right now I am slightly confused  ??? I am currently downloading the "wxPack_v3.0.00.03.exe" . What to do after it finishes the download ? Will I need to download something else ?

Quote
Note: The on-line info is better for 2.8 and CB works better with 2.8 so you might be better off with 2.8.

Do you have personal experience in developing apps with wxWidgets ? Better on-line info for 2.8 and better CB support are great arguments to use this version. Do you happen to know if there's a big difference between 2.8 and 3.0 ? Surely 3.0 must be better developed version, and some day good on-line doc will appear too, so I don't want to stay too much behind ...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #9 on: February 01, 2014, 02:54:19 am »
Right now I am slightly confused  ??? I am currently downloading the "wxPack_v3.0.00.03.exe" . What to do after it finishes the download ? Will I need to download something else ?

Quote
Note: The on-line info is better for 2.8 and CB works better with 2.8 so you might be better off with 2.8.

Do you have personal experience in developing apps with wxWidgets ? Better on-line info for 2.8 and better CB support are great arguments to use this version. Do you happen to know if there's a big difference between 2.8 and 3.0 ? Surely 3.0 must be better developed version, and some day good on-line doc will appear too, so I don't want to stay too much behind ...

I have only really complied projects using wxWidgets; I have never written projects using wxWidgets.

The 3.0 download should contain the wx tools; no idea how good the wxWidgets tool is/are in wxPack.
I do know wxSmith part of Code::Blocks currently works better with wxWidgets 2.8.
But, the CB Team is working on fixing all the wxWidgets 3.0 bugs in wxSmith as they are reported.
I have NOT paid attention on how quickly the fixes are being done to wxSmith.

You will NEED to download the TDM Compiler, also.
wxWidgets is a C++ Library; C++ Library often need a closely matching compiler for the Library to work correctly or at all.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #10 on: February 01, 2014, 03:53:19 am »
I have installed wxPack 3.0 and also TDM compiler.

Can someone help me with telling how to start using wxWidgets in C::B ? If I try create a wxWidgets project, I have several options to choose, and none of them worked so far. I can choose first -> Preferred GUI builder ( none / wxSmith / wxFormBuilder )  & application type ( Dialog Based / Frame Based ).

If I choose, for example, wxSmith and Dialog based, it asks me for the location of wxWidgets on my computer. In my case, this is : O:\SourceCode\Libraries\wxWidgets3.0 , so that is my entry there. Then it asks for compiler and configuration - I leave it as it is, GNU GCC Compiler with "create debug" and "create release" boxes ticked. Next comes a selection of many options in 2 categories : wxWidgets Library Settings and Miscellaneous Settings - I have no clue what should be the right choices here. And no matter what I choose ( or not choose ) here, after clicking "next" I get the warning message saying :
" A matching Debug configuration cannot be found in the wxWidgets directory you specified. This means that Debug target of your project will not build. Are you sure you want to continue with these settings ? ":

If I leave all the option boxes unchecked, and respond to the warning message with "OK" 2 times, I get to the project window with editor box. A sample GUI window ( Welcome to wxWidgets ) is there, but of course trying to build the project won't work. Log gives 1 error, which is :

||=== Build: Debug in gh (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lwxmsw30ud|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|

What am I missing ? What are the settings I should be careful about choosing ?


Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #11 on: February 01, 2014, 03:57:14 am »
I have installed wxPack 3.0 and also TDM compiler.

Can someone help me with telling how to start using wxWidgets in C::B ? If I try create a wxWidgets project, I have several options to choose, and none of them worked so far. I can choose first -> Preferred GUI builder ( none / wxSmith / wxFormBuilder )  & application type ( Dialog Based / Frame Based ).

If I choose, for example, wxSmith and Dialog based, it asks me for the location of wxWidgets on my computer. In my case, this is : O:\SourceCode\Libraries\wxWidgets3.0 , so that is my entry there. Then it asks for compiler and configuration - I leave it as it is, GNU GCC Compiler with "create debug" and "create release" boxes ticked. Next comes a selection of many options in 2 categories : wxWidgets Library Settings and Miscellaneous Settings - I have no clue what should be the right choices here. And no matter what I choose ( or not choose ) here, after clicking "next" I get the warning message saying :
" A matching Debug configuration cannot be found in the wxWidgets directory you specified. This means that Debug target of your project will not build. Are you sure you want to continue with these settings ? ":

If I leave all the option boxes unchecked, and respond to the warning message with "OK" 2 times, I get to the project window with editor box. A sample GUI window ( Welcome to wxWidgets ) is there, but of course trying to build the project won't work. Log gives 1 error, which is :

||=== Build: Debug in gh (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lwxmsw30ud|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|

What am I missing ? What are the settings I should be careful about choosing ?



I would ignore a matching " Debug target" can NOT be found; just try building the release for now.

To get the "Debug target" to work try the below items in the CB wxWidgets wizard.

Did you try clicking yes on "Using the wxWidgets release binaries"?

Or if that fails, try checking on "Configure advanced options" and make sure the checkmark is NOT in front of "Use __WXDEBUG__"

Note: Using the wizards is about as far as my wxWidgets knowledge goes. The only other things I do is build wxWidgets Lib and the wxWidgets samples.

Tim S.
« Last Edit: February 01, 2014, 04:06:33 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #12 on: February 01, 2014, 04:06:49 am »
Did you try clicking yes on "Using the wxWidgets release binaries"?

Or if that fails, try checking on "Configure advanced options" and make sure the checkmark is NOT in front of "Use __WXDEBUG__"

I am sorry, where does the "Using the wxWidgets release binaries" question appear ? I didn't notice it.

I have also tried the 2nd option you suggested, with same build message result :/

OK, I apologize if my questions go too far with respect to your regular usage of wxW and C::B . Could you tell me in that case the simplest way you think I could make it work ? Carrying in mind the fact that I am a complete newbie and can't do any magic.
« Last Edit: February 01, 2014, 04:09:46 am by thor36 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #13 on: February 01, 2014, 04:09:24 am »
What compiler are you using?

Did you configure Code::Blocks to use the Compiler that works with the wxWidgets you downloaded?

Please list all the files in the wxWidgets lib folder that are or type DLL?
This should help me to determine which options are correct for use in the wizard.

In my case the DLL are in this folder "C:\wxMSW-3.0\wxWidgets-3.0.0\lib\gcc_dll"
You are likely under "lib\gcc_dll" if in another location it might have a issue or it might not.

The DLLs in my folder are: Yours might have a very different name; the name will tell what options are correct.
Code: [Select]
wxmsw30u_gcc_cb.dll
wxmsw30u_gl_gcc_cb.dll

Also, look for an "lib\gcc_lib" folder it might work also.

Tim S.
« Last Edit: February 01, 2014, 04:14:22 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #14 on: February 01, 2014, 04:13:55 am »
If I go to Settings -> Compiler , the selected Compiler there is GNU GCC Compiler , as is the case at configuring the project.

I have downloaded wxPack 3.0, which had an easy setup procedure. And as far as my understanding goes, it installed already built wxW library, so I don't think I came across any Compiler selection in that process, nor was any mentioned.

------

in "wxWidgets3.0" , I have folders "lib" and "lib64". Each of those contain same 6 folders, named : gcc48_dll, gcc48_lib, vcc100_dll, vcc100_lib, vcc120_dll, vcc120_lib

The 3 folders with endings "_dll" contain dll files, among others

In "lib" , folder "gcc48_dll" ( assuming this is the right folders ? ) has 34 .dll files . Some of them start with "wxmsw30u" , but they have appendices, for example "wxmsw30u_gl_gcc48.dll"
« Last Edit: February 01, 2014, 04:33:21 am by thor36 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #15 on: February 01, 2014, 04:16:11 am »
If I go to Settings -> Compiler , the selected Compiler there is GNU GCC Compiler , as is the case at configuring the project.

I have downloaded wxPack 3.0, which had an easy setup procedure. And as far as my understanding goes, it installed already built wxW library, so I don't think I came across any Compiler selection in that process, nor was any mentioned.



As I stated earlier, for a C++ Library to work you must have a Compiler that is close enough to work with it.

We can continue; but, you will need to fix this before you can link any code.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #16 on: February 01, 2014, 04:20:32 am »
Quote
In my case the DLL are in this folder "C:\wxMSW-3.0\wxWidgets-3.0.0\lib\gcc_dll"
Yours are likely under "lib\gcc_dll" if in another location it might have a issue or it might not.

The DLLs in my folder are: Yours might have a very different name; the name will tell what options are correct.


Code: [Select]
wxmsw30u_gcc_cb.dll
wxmsw30u_gl_gcc_cb.dll


Also, look for an "lib\gcc_lib" folder it might work also.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #17 on: February 01, 2014, 04:25:21 am »
If I go to Settings -> Compiler , the selected Compiler there is GNU GCC Compiler , as is the case at configuring the project.

I have downloaded wxPack 3.0, which had an easy setup procedure. And as far as my understanding goes, it installed already built wxW library, so I don't think I came across any Compiler selection in that process, nor was any mentioned.

------

in "wxWidgets3.0" , I have folders "lib" and "lib64". Each of those contain same 6 folders, named : gcc48_dll, gcc48_lib, vcc100_dll, vcc100_lib, vcc120_dll, vcc120_lib

The 3 folders with endings "_dll" contain dll files, among others

Do you have a 32 or 64 bit version of Windows OS?

If 64 Bit, List the DLLs under lib64/gcc48_dll.
If NOT 64 Bit OS, List the DLLs under lib/gcc48_dll.

Do you see any files with "wxbase" as part of the DLL name?

Tim S.
« Last Edit: February 01, 2014, 04:34:37 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #18 on: February 01, 2014, 04:37:59 am »
I have 64 bit version of Win. I edited reply on the previous page, before noticing a new one opened in the forum.

http://shrani.si/f/3s/dP/4tJHU5Wh/dll.jpg

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #19 on: February 01, 2014, 04:41:39 am »
I have 64 bit version of Win. I edited reply on the previous page, before noticing a new one opened in the forum.

http://shrani.si/f/3s/dP/4tJHU5Wh/dll.jpg

That looks like a MultiLib wx build.
This means you have to select MultiLib (Monothic Lib is the wrong choice in the Wizard.)

Do you wish to build for 32 bit OS or just for yourself and other 64 bit users using 64 bit Libraries?


Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #20 on: February 01, 2014, 04:42:57 am »
Where in Wizard do I select this ? It slipped my eyes so far.

32 bit would be better IMO.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #21 on: February 01, 2014, 04:44:04 am »
You could have to edit the Wizard Script; but, I gave a rename/copy choice below.
Decided editing scripts would be to chancy for a CB newbie to do.

Around line 300 is this code.
Code: [Select]
       local lib = WxPath + _T("/lib/");
        if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc*")))
        {
            lib = lib + _T("gcc_");

For 32 bit libs will need to be like this.

Code: [Select]
       local lib = WxPath + _T("/lib/");
        if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc*")))
        {
            lib = lib + _T("gcc48_");

Tim S.
« Last Edit: February 01, 2014, 04:55:50 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #22 on: February 01, 2014, 04:45:23 am »
Where in Wizard do I select this ? It slipped my eyes so far.

32 bit would be better IMO.

Its NOT in the Wizard; the Wizard is for self built wxWidgets using the Directions on the page linked in my first or second post.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #23 on: February 01, 2014, 04:46:22 am »
I think you are starting to see why I self build.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #24 on: February 01, 2014, 04:50:02 am »
You are also going to have to edit the Wizard Script.

Around line 300 is this code.
Code: [Select]
       local lib = WxPath + _T("/lib/");
        if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc*")))
        {
            lib = lib + _T("gcc_");

For 32 bit libs will need to be like this.

Code: [Select]
       local lib = WxPath + _T("/lib/");
        if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc*")))
        {
            lib = lib + _T("gcc48_");

Tim S.

If you do NOT wish to edit the script you can instead rename or copy the correct folder under lib to just be gcc_dll instead of gcc48_dll.

Then, the wizard will work for 32 Bit; this might NOT be a good idea for the 64bit folder.

Tim S.
« Last Edit: February 01, 2014, 04:54:13 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #25 on: February 01, 2014, 04:55:51 am »
I don't really know where to edit the script anyway... :-\

And renaming the folder brought about a myriad of errors - "no such file or directory"

How about options at

Settings -> Compiler -> Linker Settings and Search Directories ? I suppose that needs some attention too
« Last Edit: February 01, 2014, 04:57:58 am by thor36 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #26 on: February 01, 2014, 05:02:00 am »
I don't really know where to edit the script anyway... :-\

And renaming the folder brought about a myriad of errors - "no such file or directory"

How about options at

Settings -> Compiler -> Linker Settings and Search Directories ? I suppose that needs some attention too


What did you rename?
What did you rename it to?

Where was the errors?

The Compiler search folders DO NOT matter till the Compiler is installed and setup.
Or, the wizard has finished running?
Did you finish with the CB wx Wizard?

Editing a CB wxWidgets project from monolithic to multilib is beyond my patience to help you do.

Tim S.
« Last Edit: February 01, 2014, 05:08:41 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #27 on: February 01, 2014, 05:08:39 am »
Actually... it looks like it works now.

I renamed "gcc48_dll" to just "gcc_dll" in "lib" folder. But I believe I did the same before, and it threw errors.
I guess that solves it, for now. I have an ominous feeling there are more surprises awaiting in the sack. But now I can at least try do something with wx. Thanks a bunch Tim, I appreciate your guidance and patience big time. I hope you have some left, in case something goes bananas and I need more help another time  ;D

Actually, there's another question I may add. What do I need to set to get executable file after building the project ? In console applications I always found it in bin, this time I don't see it around.
« Last Edit: February 01, 2014, 05:11:09 am by thor36 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #28 on: February 01, 2014, 05:12:36 am »
Actually... it looks like it works now.

I renamed "gcc48_dll" to just "gcc_dll" in "lib" folder. But I believe I did the same before, and it threw errors.
I guess that solves it, for now. I have an ominous feeling there are more surprises awaiting in the sack. But now I can at least try do something with wx. Thanks a bunch Tim, I appreciate your guidance and patience big time. I hope you have some left, in case something goes bananas and I need more help another time  ;D

Good setting up the project is done.

The next step please start a new topic.

Some thing like"How to the setup CB Toolchain with MinGW64 TDM version to build 32 bits application".

You will almost positively NOT be able to link without using the Compiler used to build those wxWidgets libs.

Edit: I am guessing it was MinGW64 TDM that was on the list of downloads; but, it might be an MinGW32 TDM that matches the one installed with Code::Blocks.

Tim S.
« Last Edit: February 01, 2014, 05:34:21 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #29 on: February 01, 2014, 10:03:04 am »
I did not read all the posts in this thread, but ara you aware, that 3.0 has prebuild binaries for use with TDM gcc 4.7.1 and 4.8.1 on the wxWidgets download page ?
http://sourceforge.net/projects/wxwindows/files/3.0.0/binaries/

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #30 on: February 01, 2014, 01:12:03 pm »
I did not read all the posts in this thread, but ara you aware, that 3.0 has prebuild binaries for use with TDM gcc 4.7.1 and 4.8.1 on the wxWidgets download page ?
http://sourceforge.net/projects/wxwindows/files/3.0.0/binaries/

I was not aware of that. I was looking to download and instal wxPack. What is the difference, if I will install the version you provided ? And how do I use TDM gcc for compiling later ?

Since you have not read all the posts, I must tell you that up to now I have only wrote console applications without any use of 3rd party libraries, with default settings in C::B.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #31 on: February 01, 2014, 01:18:11 pm »
TDM gcc4.7.1 is shipped with C::B 13.12 (with MinGW).
4.8 can be downloaded from TDragons site:
http://tdm-gcc.tdragon.net/

Offline thor36

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Get wxWidgets 3.0 to work on C::B, Win7
« Reply #32 on: February 01, 2014, 02:02:27 pm »
http://docs.wxwidgets.org/3.0.0/page_introduction.html#page_introduction_requirements

" The primarily supported compilers are Microsoft Visual C++ (versions 6 up to 2013 are supported, at least 2005 is recommended) and GNU g++ (either from the traditional MinGW, TDM-GCC or MinGW-w64 distributions). "

Is there a need for TDM compiler, if MinGW is mentioned there ?