User forums > Help

Help Configuring C::B and wxWidgets

(1/2) > >>

Jamiil:
After installing  wxWidgets-2.6.0_setup.exe, I have tried to compile the default code provided by C::B v1.0, but to no avail.
I have done some research and I found out that one has to add the locations of wxWidgets-2.6.0 library, i.e.‘Build Options -> Directories wxWidgets-2.6.0\include, etc…”, I did that but I now get an error message that reads:

Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\tmp\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
In file included from ../wxWidgets-2.6.0/include/wx/defs.h:21,
                 from ../wxWidgets-2.6.0/include/wx/wxprec.h:13,
                 from main.cpp:1:
../wxWidgets-2.6.0/include/wx/platform.h:260:22: wx/setup.h: No such file or directory
In file included from ../wxWidgets-2.6.0/include/wx/platform.h:263,
                 from ../wxWidgets-2.6.0/include/wx/defs.h:21,
                 from ../wxWidgets-2.6.0/include/wx/wxprec.h:13,
                 from main.cpp:1:
../wxWidgets-2.6.0/include/wx/chkconf.h:74:9: #error "wxUSE_DYNLIB_CLASS must be defined."
../wxWidgets-2.6.0/include/wx/chkconf.h:82:9: #error "wxUSE_EXCEPTIONS must be defined."
../wxWidgets-2.6.0/include/wx/chkconf.h:90:9: #error "wxUSE_FILESYSTEM must be defined."
….


What can I do to solve this problem? Are there any more configuration setting that I must do?

TIA

mandrav:
Copy wxWidgets-2.6.0/include/wx/msw/setup.h to wxWidgets-2.6.0/include/wx/

Yiannis.

Jamiil:
Thank you Yiannis!
It did the trick, part of the messages got resolved, however I still have the following messages floating around:
----
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\tmp\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
In file included from ../wxWidgets-2.6.0/include/wx/string.h:55,
                 from ../wxWidgets-2.6.0/include/wx/wxchar.h:133,
                 from ../wxWidgets-2.6.0/include/wx/debug.h:22,
                 from ../wxWidgets-2.6.0/include/wx/defs.h:450,
                 from ../wxWidgets-2.6.0/include/wx/wxprec.h:13,
                 from main.cpp:1:
../wxWidgets-2.6.0/include/wx/buffer.h: In constructor `wxCharBuffer::wxCharBuffer(const char*)':
../wxWidgets-2.6.0/include/wx/buffer.h:96: error: `strdup' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h:96: error: (Each undeclared identifier is reported only once for each function it appears in.)
../wxWidgets-2.6.0/include/wx/buffer.h: In member function `wxCharBuffer& wxCharBuffer::operator=(const char*)':
../wxWidgets-2.6.0/include/wx/buffer.h:96: error: `strdup' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h: In constructor `wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
../wxWidgets-2.6.0/include/wx/buffer.h:100: error: `wxStrdupW' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h: In member function `wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
../wxWidgets-2.6.0/include/wx/buffer.h:100: error: `wxStrdupW' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h: At global scope:
../wxWidgets-2.6.0/include/wx/buffer.h:177: error: ISO C++ forbids declaration of `DECLARE_NO_COPY_CLASS' with no type
../wxWidgets-2.6.0/include/wx/buffer.h:177: error: expected `;' before '}' token
../wxWidgets-2.6.0/include/wx/buffer.h:177: error: expected `;' before '}' token
../wxWidgets-2.6.0/include/wx/buffer.h: In member function `void wxMemoryBuffer::SetDataLen(size_t)':
../wxWidgets-2.6.0/include/wx/buffer.h:217: error: `wxASSERT' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h: In member function `void wxMemoryBuffer::AppendByte(char)':
../wxWidgets-2.6.0/include/wx/buffer.h:247: error: `_T' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h:247: error: `wxCHECK_RET' undeclared (first use this function)
../wxWidgets-2.6.0/include/wx/buffer.h: In member function `void wxMemoryBuffer::AppendData(void*, size_t)':


----
What could be causing this problem? can you help?

takeshimiya:
One of my feat. request was

"Documentation: Guide about compiling wx and other libs"
A very detailed step by step about compiling and using wxWidgets 2.6 and other libs as an example (like SDL+OpenGL).
For example this can be done by someone that have experience with the dificulties dealing when compiling libs like wxWidgets 2.6, SDL, GTK, etc.
Explaining the use of those when using shared or static libraries, using it in a project, screenshots, etc.

Perhaps putting that guide in Code::Blocks WiKi would be of great help.

http://sourceforge.net/tracker/index.php?func=detail&aid=1201653&group_id=126998&atid=707419

Regards,
Takeshi Miya

rickg22:
I'd love to do it, but frankly the first attempts exhausted me. Any volunteers? :)

Navigation

[0] Message Index

[#] Next page

Go to full version