Hi,
I too am facing a problem with the compilation of wxWidgets in C::B.
I'm using wxPack with the latest release of C::B for Windows (C::B 10.05) [which was installed with the MinGW option via the installer] and have read all the steps in the Wiki page which was linked to in Jen's post. I have also looked in the build.cfg file to identify the parameters for using wxWidgets in C::B, and used the correct parameters in this regard. I have also set the Environmental PATH variable and the toolchain executable path to the bin folder in MinGW in C::B. However, when I tried to create a blank wxWidget project in C::B and compile the code (to identify if wxWidget is able to generate a simple yet functional GUI), the error message in my C::B Build log is as follows:
-------------- Build: Debug in Project 1-1 ---------------
Precompiling header: wx_pch.h
In file included from C:\CodeBlocks\wxWidgets2.8\include/wx/string.h:55,
from C:\CodeBlocks\wxWidgets2.8\include/wx/log.h:47,
from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/private.h:24,
from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/wrapcdlg.h:18,
from C:\CodeBlocks\wxWidgets2.8\include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from <command-line>:0:
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In constructor 'wxCharBuffer::wxCharBuffer(const char*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
In file included from C:\CodeBlocks\wxWidgets2.8\include/wx/log.h:47,
from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/private.h:24,
from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/wrapcdlg.h:18,
from C:\CodeBlocks\wxWidgets2.8\include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from <command-line>:0:
C:\CodeBlocks\wxWidgets2.8\include/wx/string.h: In function 'int Stricmp(const char*, const char*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/string.h:141: error: 'strcasecmp' was not declared in this scope
In file included from C:\CodeBlocks\wxWidgets2.8\include/wx/gdicmn.h:20,
from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/private.h:213,
from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/wrapcdlg.h:18,
from C:\CodeBlocks\wxWidgets2.8\include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from <command-line>:0:
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxChar*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h:406: error: 'strdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxString&)':
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h:408: error: 'strdup' was not declared in this scope
Process terminated with status 1 (0 minutes, 6 seconds)
7 errors, 0 warnings
The respective files (e.g. buffer.h, string.h & list.h) also open to indicate the source of the error when I place my cursor on the specified line.
As far as I am aware, I am using MinGW as the compiler of choice here, and everything has been installed correctly. When I run mingw32-make.exe, I get the following output:
C:\CodeBlocks\wxWidgets2.8\build\msw>mingw32-make.exe
mingw32-make.exe: *** No targets specified and no makefile found. Stop.
This clearly indicates that MinGW has been properly installed in my system.
As such, please inform me as to what could have gone wrong here.
Thanks and I look forward to your reply.