User forums > Help
wxWidgets 2.6 (MSW, GCC) installation instructions
Gregorius:
I still don't know why the build fails on my notebook. PATH settings are identical on both computers :?
I've compiled wxWidgets on my desktop PC and copied 'lib' directory to my notebook then. C::B are working great on both computers now :) There is no problem with building and debugging wxWidgets apps.
C::B is a great tool, I really like it :)
Michael:
--- Quote from: Gregorius on February 01, 2006, 06:43:04 pm ---I still don't know why the build fails on my notebook. PATH settings are identical on both computers :?
--- End quote ---
May be it is related to software and/or DLL conflicts.
Michael
wittend:
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]
MortenMacFly:
--- Quote from: wittend on February 23, 2006, 05:55:34 pm ---[...]
--- End quote ---
Could you please tell what version of C::B you are using? The RC2?
Furthermore: Please enable "Full command line" (in the compiler settings under "Other") and post the compiler log again. This will ensure we'll see the full command line that fails to compile.
With regards, Morten.
TDragon:
Firstly, I highly recommend upgrading to one of the Nightly builds which can be found here. They are more feature-rich, and fix many bugs and annoyances (such as your warning, by using a "global variable" WX that you only need to set once). If you choose to use a nightly build you will need to:
* Uninstall C::B RC2 and delete any residual directories on your hard drive
* Install MinGW separately (I recommend the new 5.0.2 installer)
* Download the nightly build and the wxWidgets DLL and unzip them to the same directory
A newer version of Code::Blocks may or may not fix your errors; I suspect they're stemming from idiosyncracies within GCC or wxWidgets themselves. A look at the actual command line being used to run GCC would be helpful; this is done by changing the Compiler logging setting to "Full command line" (in the Other tab of your global compiler settings).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version