Author Topic: How to install wxWidgets ?  (Read 4900 times)

Offline Smilence

  • Multiple posting newcomer
  • *
  • Posts: 11
How to install wxWidgets ?
« on: March 22, 2013, 06:35:45 am »
I followed the WxWindowsQuickRef http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef to compile wxWidgets and create wxWidgets project in C::B,when I Build and Run a project in last step,I got the message below
Quote
||=== Build: Debug in d (compiler: GNU GCC Compiler) ===|
D:\Program\wxWidgets\include\wx\buffer.h||In constructor 'wxCharBuffer::wxCharBuffer(const char*)':|
D:\Program\wxWidgets\include\wx\buffer.h|127|error: 'strdup' was not declared in this scope|
D:\Program\wxWidgets\include\wx\buffer.h||In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':|
D:\Program\wxWidgets\include\wx\buffer.h|127|error: 'strdup' was not declared in this scope|
D:\Program\wxWidgets\include\wx\buffer.h||In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':|
D:\Program\wxWidgets\include\wx\buffer.h|134|error: '_wcsdup' was not declared in this scope|
D:\Program\wxWidgets\include\wx\buffer.h||In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':|
D:\Program\wxWidgets\include\wx\buffer.h|134|error: '_wcsdup' was not declared in this scope|
D:\Program\wxWidgets\include\wx\string.h||In function 'int Stricmp(const char*, const char*)':|
D:\Program\wxWidgets\include\wx\string.h|141|error: 'strcasecmp' was not declared in this scope|
D:\Program\wxWidgets\include\wx\list.h||In constructor 'wxListKey::wxListKey(const wxChar*)':|
D:\Program\wxWidgets\include\wx\list.h|406|error: '_wcsdup' was not declared in this scope|
D:\Program\wxWidgets\include\wx\list.h||In constructor 'wxListKey::wxListKey(const wxString&)':|
D:\Program\wxWidgets\include\wx\list.h|408|error: '_wcsdup' was not declared in this scope|
||=== Build failed: 7 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Could somebody please tell me how to fix it?
« Last Edit: March 22, 2013, 06:37:49 am by Smilence »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3020
Re: How to install wxWidgets ?
« Reply #1 on: March 22, 2013, 08:51:23 am »
wx versione?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7187
    • My Best Post
Re: How to install wxWidgets ?
« Reply #2 on: March 22, 2013, 12:46:32 pm »
IIRC, I got about the same errors trying to compile something using wxWidgets with MinGW GCC and the option "-std=c++11".

What Compiler and version?
What site did you get it from if MinGW GCC?
And, of course, we still need wxWidgets version?

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F



Tim S.
« Last Edit: March 22, 2013, 12:48:57 pm 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 Smilence

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: How to install wxWidgets ?
« Reply #3 on: March 22, 2013, 05:29:53 pm »
IIRC, I got about the same errors trying to compile something using wxWidgets with MinGW GCC and the option "-std=c++11".
Wow,you genius,I exactly choiced the "-std=c++11" ,I'm new to wxWidgets and C++,this is a great challenge to me ;D

thank you so much, Tim S
« Last Edit: March 22, 2013, 05:49:44 pm by Smilence »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7187
    • My Best Post
Re: How to install wxWidgets ?
« Reply #4 on: March 22, 2013, 06:35:09 pm »
IIRC, I got about the same errors trying to compile something using wxWidgets with MinGW GCC and the option "-std=c++11".
Wow,you genius,I exactly choiced the "-std=c++11" ,I'm new to wxWidgets and C++,this is a great challenge to me ;D

thank you so much, Tim S


I am 90% sure that the option -std=gnu++11 did work for me; it means something like -std=c++11; but allow GCC extensions, too.

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