User forums > Help
compiler error
cxwshawn:
:(,
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 ...
xunxun:
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.
cxwshawn:
--- Quote from: xunxun1982 on November 15, 2010, 05:25:39 am ---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.
--- End quote ---
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 ?
cxwshawn:
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
xunxun:
Well, but I think there is something wrong with your "stdlib.h".
Could you change another edition of mingw?
Navigation
[0] Message Index
[#] Next page
Go to full version