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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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 »

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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 »

Online stahta01

  • Lives here!
  • ****
  • Posts: 6509
    • 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/