Author Topic: Help Configuring C::B and wxWidgets  (Read 7828 times)

Jamiil

  • Guest
Help Configuring C::B and wxWidgets
« on: May 18, 2005, 04:45:30 pm »
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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Help Configuring C::B and wxWidgets
« Reply #1 on: May 18, 2005, 06:56:30 pm »
Copy wxWidgets-2.6.0/include/wx/msw/setup.h to wxWidgets-2.6.0/include/wx/

Yiannis.
Be patient!
This bug will be fixed soon...

Jamiil

  • Guest
Help Configuring C::B and wxWidgets
« Reply #2 on: May 18, 2005, 08:31:54 pm »
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

  • Guest
Help Configuring C::B and wxWidgets
« Reply #3 on: May 18, 2005, 11:14:21 pm »
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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Help Configuring C::B and wxWidgets
« Reply #4 on: May 18, 2005, 11:37:39 pm »
I'd love to do it, but frankly the first attempts exhausted me. Any volunteers? :)

Jamiil

  • Guest
Help Configuring C::B and wxWidgets
« Reply #5 on: May 19, 2005, 12:18:11 am »
Well, I would not mind writing an article on "Configuring Code::Blocks to statically link wxWidgets-2.x.x", but some sort of standard must exist, so that I can write about it, However this standard has elude me. So far I have been giving ideas and tips on how to do it, but there has not been a thorough follow-up.
Unfortunately, or otherwise, my background is in the UNIX world and  
Nevertheless, I am going to log all the messages in this thread in the hope that, if I finally get the library to successfully link and compile, I'll be able to document my experience so that others can learn from it.  I am not a technical writer, or a writer for that matter, but after all these years reading and writing technical articles, notes and documentation for every piece of software I have used or developed I feel I am up to the challenge.
I understand that Rickq22 has the Know_How, since s/he once tried to create the documentation, perhaps we could team up to and have it once and for all completed.

takeshimiya

  • Guest
Help Configuring C::B and wxWidgets
« Reply #6 on: May 19, 2005, 05:38:38 am »
Oh, seems compiling wxWidgets isn't very out-of-the-box with Code::Blocks, maybe making Code::Blocks projects for compiling it could help??

If that is done would be very great contributing it to wxWidgets next release. A better solution would be to make a bakefile plugin that generates Code::Blocks projects, so the wxWidgets team can auto mantain the projects.
Hope that anyone knows how to do it.

As for other libs (SDL, zlib, etc) would be great that the people that manages compiling a lib and projects could put somewhere the project files (here at the forum or at the WiKi), a rough guide at least would be great also.

Offline gaymin

  • Single posting newcomer
  • *
  • Posts: 5
    • http://www.ubergeekultd.com
How to use SDL with CodeBlocks
« Reply #7 on: June 06, 2005, 04:15:45 pm »
I have written a small tutorial on how to use SDL with codeblocks.  It can be found at http://www.ubergeekultd.com/tutorials/SDLcodeblocks.pdf
I hope it helps out.  I'll write one up about how I use zlib with codeblocks where I have more time... and perhaps I'll even get around to the one on wxwidgets.  It isn't all that hard, it just takes some time.