Code::Blocks Forums
User forums => Help => Topic started by: cxwshawn on November 15, 2010, 04:44:59 am
-
:(,
met a problem when build wxWidget project, the error information is :
-------------- Build: Debug in testwxWidget1 ---------------
Compiling: testwxWidget1App.cpp
In file included from D:\wxWidgets-2.8.11\include/wx/string.h:55,
from D:\wxWidgets-2.8.11\include/wx/memory.h:16,
from D:\wxWidgets-2.8.11\include/wx/object.h:20,
from D:\wxWidgets-2.8.11\include/wx/event.h:17,
from D:\wxWidgets-2.8.11\include/wx/app.h:20,
from E:\project\codeBlocks\testwxWidget1\testwxWidget1App.h:13,
from E:\project\codeBlocks\testwxWidget1\testwxWidget1App.cpp:10:
D:\wxWidgets-2.8.11\include/wx/buffer.h: In constructor 'wxCharBuffer::wxCharBuffer(const char*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/buffer.h: In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/buffer.h: In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/buffer.h: In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
In file included from D:\wxWidgets-2.8.11\include/wx/memory.h:16,
from D:\wxWidgets-2.8.11\include/wx/object.h:20,
from D:\wxWidgets-2.8.11\include/wx/event.h:17,
from D:\wxWidgets-2.8.11\include/wx/app.h:20,
from E:\project\codeBlocks\testwxWidget1\testwxWidget1App.h:13,
from E:\project\codeBlocks\testwxWidget1\testwxWidget1App.cpp:10:
D:\wxWidgets-2.8.11\include/wx/string.h: In function 'int Stricmp(const char*, const char*)':
D:\wxWidgets-2.8.11\include/wx/string.h:141: error: 'strcasecmp' was not declared in this scope
In file included from D:\wxWidgets-2.8.11\include/wx/gdicmn.h:20,
from D:\wxWidgets-2.8.11\include/wx/event.h:21,
from D:\wxWidgets-2.8.11\include/wx/app.h:20,
from E:\project\codeBlocks\testwxWidget1\testwxWidget1App.h:13,
from E:\project\codeBlocks\testwxWidget1\testwxWidget1App.cpp:10:
D:\wxWidgets-2.8.11\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxChar*)':
D:\wxWidgets-2.8.11\include/wx/list.h:406: error: '_wcsdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxString&)':
D:\wxWidgets-2.8.11\include/wx/list.h:408: error: '_wcsdup' was not declared in this scope
Process terminated with status 1 (0 minutes, 1 seconds)
7 errors, 0 warnings (0 minutes, 1 seconds)
please give me some help, thanks ...
-
I think your mingw gcc or your compiler configure have something wrong, for I know 'strdup' declared in "string.h", which is in MinGW's include folder.
-
I think your mingw gcc or your compiler configure have something wrong, for I know 'strdup' declared in "string.h", which is in MinGW's include folder.
yep, I can open the string.h using right click on strdup "find declaration of 'strdup' ", so I think it does be in this scope, is there any possibility that I have installed cygwin in my pc leading to this problem ?
-
I think I have found the point. there is a "string.h" in mingw in codeblocks, but there is also a "string.h" in wxWidget, But I don't know how to let these two filed not confilcted, please give some advice.
regards
shawn
-
Well, but I think there is something wrong with your "stdlib.h".
Could you change another edition of mingw?
-
Well, but I think there is something wrong with your "stdlib.h".
Could you change another edition of mingw?
I have installed the lated mingw, and just change the compiler's installation directory in the tab "Toolchain executables", but it is still the same problems existed, can u give me some other suggestions . thanks
regards
shawn
-
If your mingw is integral, the problem is very strange.
Which edition of mingw did you use? And you can try the edition http://tdm-gcc.tdragon.net/.
Could you redownload the wxWidgets? I have no idea about the problems above.
-
Turn on Full Compiler Logging
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
You most likely have an search directory wrong.
Tim S.
-
Turn on Full Compiler Logging
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
You most likely have an search directory wrong.
Tim S.
I have done according what u said , but I still get the same problem as follows, and I think the compiler option is right :
-------------- Build: Debug in testwxwidget ---------------
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wno-attributes -Wall -g -D__WXDEBUG__ -std=c++0x -ID:\wxWidgets-2.8.11\include -ID:\wxWidgets-2.8.11\contrib\include -ID:\wxWidgets-2.8.11\lib\gcc_dll\mswud -ID:\MinGW\include -c E:\project\codeBlocks\testwxwidget\testwxwidgetApp.cpp -o obj\Debug\testwxwidgetApp.o
In file included from D:\wxWidgets-2.8.11\include/wx/string.h:55:0,
from D:\wxWidgets-2.8.11\include/wx/memory.h:16,
from D:\wxWidgets-2.8.11\include/wx/object.h:20,
from D:\wxWidgets-2.8.11\include/wx/event.h:17,
from D:\wxWidgets-2.8.11\include/wx/app.h:20,
from E:\project\codeBlocks\testwxwidget\/testwxwidgetApp.h:13,
from E:\project\codeBlocks\testwxwidget\testwxwidgetApp.cpp:10:
D:\wxWidgets-2.8.11\include/wx/buffer.h: In constructor 'wxCharBuffer::wxCharBuffer(const char*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:127:1: error: 'strdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/buffer.h: In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:127:1: error: 'strdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/buffer.h: In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:134:1: error: '_wcsdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/buffer.h: In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
D:\wxWidgets-2.8.11\include/wx/buffer.h:134:1: error: '_wcsdup' was not declared in this scope
In file included from D:\wxWidgets-2.8.11\include/wx/memory.h:16:0,
from D:\wxWidgets-2.8.11\include/wx/object.h:20,
from D:\wxWidgets-2.8.11\include/wx/event.h:17,
from D:\wxWidgets-2.8.11\include/wx/app.h:20,
from E:\project\codeBlocks\testwxwidget\/testwxwidgetApp.h:13,
from E:\project\codeBlocks\testwxwidget\testwxwidgetApp.cpp:10:
D:\wxWidgets-2.8.11\include/wx/string.h: In function 'int Stricmp(const char*, const char*)':
D:\wxWidgets-2.8.11\include/wx/string.h:141:31: error: 'strcasecmp' was not declared in this scope
In file included from D:\wxWidgets-2.8.11\include/wx/gdicmn.h:20:0,
from D:\wxWidgets-2.8.11\include/wx/event.h:21,
from D:\wxWidgets-2.8.11\include/wx/app.h:20,
from E:\project\codeBlocks\testwxwidget\/testwxwidgetApp.h:13,
from E:\project\codeBlocks\testwxwidget\testwxwidgetApp.cpp:10:
D:\wxWidgets-2.8.11\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxChar*)':
D:\wxWidgets-2.8.11\include/wx/list.h:406:36: error: '_wcsdup' was not declared in this scope
D:\wxWidgets-2.8.11\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxString&)':
D:\wxWidgets-2.8.11\include/wx/list.h:408:44: error: '_wcsdup' was not declared in this scope
Process terminated with status 1 (0 minutes, 1 seconds)
7 errors, 0 warnings (0 minutes, 1 seconds)
-
What version of MinGW GCC?
And, is it in this folder "D:\MinGW"?
Do you have any other MinGW installed in "E:\MinGW" or any other drive for E except D?
How did you install MinGW? Manually? Or using an Installer?
Tim S.
-
Found cause "-std=c++0x" causes your problem on my machine.
Note: You might want to try "-std=gnu++0x" instead of "-std=c++0x".
Tim S.
-
What version of MinGW GCC?
And, is it in this folder "D:\MinGW"?
Do you have any other MinGW installed in "E:\MinGW" or any other drive for E except D?
How did you install MinGW? Manually? Or using an Installer?
Tim S.
version of MinGW GCC is 4.5.0, and yes, it does in folder D:\MinGW.
When I installed CB , it is integrated with mingw, But since there is some problems
, I reinstalled into D: disk using installer .
-
Found cause "-std=c++0x" causes your problem on my machine.
Note: You might want to try "-std=gnu++0x" instead of "-std=c++0x".
Tim S.
sorry, I don't know what does this mean?
shawn
-
Found cause "-std=c++0x" causes your problem on my machine.
Note: You might want to try "-std=gnu++0x" instead of "-std=c++0x".
Tim S.
sorry, I don't know what does this mean?
shawn
and I can run the simple console application on my machine .
-
Found cause "-std=c++0x" causes your problem on my machine.
Note: You might want to try "-std=gnu++0x" instead of "-std=c++0x".
Tim S.
sorry, I don't know what does this mean?
shawn
Remove the Compiler Option "-std=c++0x" it DOES NOT work with wxWidgets 2.8.10.
Tim S.
-
Found cause "-std=c++0x" causes your problem on my machine.
Note: You might want to try "-std=gnu++0x" instead of "-std=c++0x".
Tim S.
sorry, I don't know what does this mean?
shawn
Remove the Compiler Option "-std=c++0x" it DOES NOT work with wxWidgets 2.8.10.
Tim S.
okay, thanks, I have got it resolved .
regards
shawn