Author Topic: wxWidgets problem: 'strlen' not declared in this scope  (Read 35568 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: wxWidgets problem: 'strlen' not declared in this scope
« Reply #15 on: October 19, 2010, 07:01:25 pm »
@psyhotron: It looks like GCC bug to me.
What version of MinGW GCC?
And, who built the MinGW GCC?

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 psyhotron

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxWidgets problem: 'strlen' not declared in this scope
« Reply #16 on: October 19, 2010, 07:24:05 pm »
Hi stahta01

I used mingw-get-inst-20100909.exe ... piece of software which looks for the latest MinGW build on the sourceforge.net ... I have chosen prepackaged repository catalogues 20100909 ... and after installation process was completed ... I could find new folder with MinGW on my C: drive ...

after that I just added in command prompt set path = %path%;C:\MinGW\bin

it works for compiling simple C/C++ code using code blocks but if fails when I'm trying to compile wxWidgets ver 2.8.10, 2.8.11 or 2.9.1 ... o d'oh 2.9.1 was the most successful so far because it creates far more files and libraries before it fails than the others.

I was reading that I could create native x64bit windows toolchain using mingw-w64 project but I do not know if I would like to go that far especially if I do not know if there's a simpler way.

I do not what to reinvent the wheel :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: wxWidgets problem: 'strlen' not declared in this scope
« Reply #17 on: October 19, 2010, 08:46:17 pm »
@psyhotron: I suggest using a stable MinGW GCC Build; if you wish to use the one you picked go to the Compiler or wxWidgets web-site to look for help.

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 psyhotron

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxWidgets problem: 'strlen' not declared in this scope
« Reply #18 on: October 20, 2010, 12:59:47 am »
ok! I have made it to work thanks to you all!

This is my small step by step instruction:

1. Remove all old installations of Code Blocks, MinGW, MinGW-64, and wxWidgets ... delete all folders of those applications after uninstallation process is complete.
2. Remove all references of MinGW from Path variable.
3. Download tdm-gcc-4.5.1 from this website -> http://tdm-gcc.tdragon.net/download
4. Start installation of tdm-gcc-4.5.1 and select to install latest stable version (from drop down menu) and make sure that "automatically add to path variable" is selected.
5. Download wxPack_v2.8.11.03.exe from this website -> http://sourceforge.net/projects/wxpack/files/wxpack/2.8.11.03/wxPack_v2.8.11.03.exe/download
6. Install it in C:\wxWidgets2.8
7. Download Code Blocks from this website -> http://www.codeblocks.org/downloads/26
8. Install it in default folder
9. Open up Code Blocks ->Settings -> Compiler and Debugger -> Toolchain Executables ... and select "Reset defaults" button.
10. Select "Autodetect" button in the same tab and it should come up with a popup to say that MinGW in MinGW32 was detected.
11. Select Settings->Global Variables select default from drop down menu click new variable and input "wx" and under base text field type: C:\wxWidgets2.8 and save.

From now on you should be able to select new project "wxWidgets" and it should compile without any problems under windows 7 ultimate 64Bit.  :D

Uff this cost me a looooot of time and reading ... problem is that all them websites including wiki pages ... they are fairly up to date but showing super old solutions or they are working for experienced power users ... or maybe for specific combination of os, compiler, wxWidgets and IDE ...

Anyways its alll good now  :D