I am a fairly experienced programmer in both *NIX & Win32, but I am new to Code::Blocks. I have used the DevC++ environment with wxWidgets successfully in the past. But I recently despaired of ever getting 4.9.9.2 & wxWidgets configured correctly on my system and decided to give Code::Blocks a try. After installing the IDE (at D:\bin\Codeblocks) I with some difficulty got wxWidgets to build - I believe in the Release/ANSI/DLL configuration. I have WxWidgets installed at D:\bin\Codeblocks\wx.
when I create a wxWidgets project using C::B I get an irritating warning
that I do not know how to prevent for future sessions, but which I can temporarily correct and live with. I go into project->build options->custom variables and change WX_DIR to "D:\bin\CodeBlocks\wx".
At this point I try to build this minimal application and am rewarded with an effulgence of error messages to the effect:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : D:\bin\CodeBlocks\Work\
--------------------------------------------------------------------------------
Switching to target: default
Precompiling header: wx_pch.h
In file included from D:/bin/CodeBlocks/wx/include/wx/string.h:55,
from D:/bin/CodeBlocks/wx/include/wx/wxchar.h:139,
from D:/bin/CodeBlocks/wx/include/wx/debug.h:22,
from D:/bin/CodeBlocks/wx/include/wx/defs.h:503,
from D:/bin/CodeBlocks/wx/include/wx/wxprec.h:13,
from ./wx_pch.h:9,
from <command line>:6:
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In constructor `wxCharBuffer::wxCharBuffer(const char*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:96: error: `strdup' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h:96: error: (Each undeclared identifier is reported only once for each function it appears in.)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `wxCharBuffer& wxCharBuffer::operator=(const char*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:96: error: `strdup' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In constructor `wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:100: error: `wxStrdupW' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:100: error: `wxStrdupW' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: At global scope:
D:/bin/CodeBlocks/wx/include/wx/buffer.h:177: error: ISO C++ forbids declaration of `DECLARE_NO_COPY_CLASS' with no type
D:/bin/CodeBlocks/wx/include/wx/buffer.h:177: error: expected `;' before '}' token
D:/bin/CodeBlocks/wx/include/wx/buffer.h:177: error: expected `;' before '}' token
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `void wxMemoryBuffer::SetDataLen(size_t)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:217: error: `wxASSERT' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `void wxMemoryBuffer::AppendByte(char)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:247: error: `_T' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h:247: error: `wxCHECK_RET' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `void wxMemoryBuffer::AppendData(void*, size_t)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:256: error: `memcpy' undeclared (first use this function)
In file included from D:/bin/CodeBlocks/wx/include/wx/string.h:56,
from D:/bin/CodeBlocks/wx/include/wx/wxchar.h:139,
from D:/bin/CodeBlocks/wx/include/wx/debug.h:22,
from D:/bin/CodeBlocks/wx/include/wx/defs.h:503,
from D:/bin/CodeBlocks/wx/include/wx/wxprec.h:13,
from ./wx_pch.h:9,
from <command line>:6:
D:/bin/CodeBlocks/wx/include/wx/strconv.h: At global scope:
D:/bin/CodeBlocks/wx/include/wx/strconv.h:201: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/strconv.h:201: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/strconv.h:226: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/strconv.h:226: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/strconv.h:231: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/strconv.h:231: error: expected `;' before '*' token
In file included from D:/bin/CodeBlocks/wx/include/wx/wxchar.h:139,
from D:/bin/CodeBlocks/wx/include/wx/debug.h:22,
from D:/bin/CodeBlocks/wx/include/wx/defs.h:503,
from D:/bin/CodeBlocks/wx/include/wx/wxprec.h:13,
from ./wx_pch.h:9,
from <command line>:6:
D:/bin/CodeBlocks/wx/include/wx/string.h:87: error: expected init-declarator before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:87: error: expected `,' or `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h: In function `size_t Strlen(const char*)':
D:/bin/CodeBlocks/wx/include/wx/string.h:102: error: `strlen' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/string.h: In function `int Stricmp(const char*, const char*)':
D:/bin/CodeBlocks/wx/include/wx/string.h:135: error: `strcasecmp' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/string.h: At global scope:
D:/bin/CodeBlocks/wx/include/wx/string.h:217: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:217: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:220: error: expected `;' before "bool"
D:/bin/CodeBlocks/wx/include/wx/string.h:256: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:256: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:266: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:266: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:276: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:276: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:279: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:279: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:280: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:281: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:281: error: `bool wxStringBase::ConcatSelf(size_t, int)' and `bool wxStringBase::ConcatSelf(size_t, int)' cannot be overloaded
D:/bin/CodeBlocks/wx/include/wx/string.h:292: error: `wxChar' does not name a type
D:/bin/CodeBlocks/wx/include/wx/string.h:293: error: `wxChar' does not name a type
D:/bin/CodeBlocks/wx/include/wx/string.h:295: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:295: error: expected `;' before '&' token
D:/bin/CodeBlocks/wx/include/wx/string.h:296: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:296: error: expected `;' before '&' token
D:/bin/CodeBlocks/wx/include/wx/string.h:297: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:297: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:298: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:298: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:299: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:299: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:300: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:300: error: expected `;' before '*' token
Process terminated with status 1 (0 minutes, 3 seconds)
52 errors, 0 warnings
I know that the source of my problems must be simple, but searching the FAQ's and the documentation and these fora have not yeilded any (understandable to me) solutions. I would appreciate any help anyone can offer.
-- Dave
Extra Info:
========
When I check gcc --version crom a cmd.exe command line the response is:
D:\bin\CodeBlocks>gcc --version
"gcc (GCC) 3.4.4 (mingw special)".
Checking make, I get:
D:\bin\CodeBlocks>make --version
"GNU Make version 3.77, by Richard Stallman and Roland McGrath."
Checking mingw versions from the command line (cmd.exe) I get:
D:\bin\CodeBlocks>mingw32-gcc --version
mingw32-gcc (GCC) 3.4.4 (mingw special)
and
D:\bin\CodeBlocks>mingw32-make --version
GNU Make 3.80
all of these commands are following the system path to locate the desired executable. Executing the same commands from the MinGW command line from /d/bin/CodeBlocks gives me exactly the same results.
[attachment deleted by admin]