Author Topic: Compiling WxWidgets  (Read 4333 times)

Offline blank

  • Single posting newcomer
  • *
  • Posts: 4
Compiling WxWidgets
« on: September 16, 2005, 06:04:40 am »
Okay I know this has probably been posted millions of times, and I'll sound like a noob, but I've searched for a couple hours on google on how to compile wxWidgets and I still have no luck, all references to it are very vague, and say 'for more information go to blah', and 'blah' ends up being another vague manual, linking to another one, and so on and so forth.  Anyways, I'm using VSC++.Net, but I also use Borland, just in case one of you guys prefer it.  I dont understnad how to compile the library, I opened the dsw but it has a lot of projects in it, and I'm not quite sure which to compile.  After I compile it, I just put it in my compiler's lib folder and then use the #pragma comment (lib, "library.lib") command right?  That should do, then also of course, include the specific header file.  I hope someone can help me, I tried downloading precompiled libraries but I rather compile them myself, thanks for anything.

EDIT:  Sorry, I got to compile with borland, by the way, I have the libraries now, but does that mean I have to use borland to compile now?  I'd really still like to use VSC++, or do I have to compile with VSC++ to be able to use it with it, anyways, which library is the one I use to compile program?  The normal basic one, is it core?  Thanks guys.

www.codeblank.net - New Coding Forums with Syntax Highlighting
« Last Edit: September 16, 2005, 06:19:17 am by blank »

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Compiling WxWidgets
« Reply #1 on: September 16, 2005, 08:26:24 pm »
Anyways, I'm using VSC++.Net, but I also use Borland, just in case one of you guys prefer it.  I dont understnad how to compile the library...

http://wiki.codeblocks.org/index.php/Tutorials

Quote
EDIT:  Sorry, I got to compile with borland, by the way, I have the libraries now, but does that mean I have to use borland to compile now?  I'd really still like to use VSC++, or do I have to compile with VSC++ to be able to use it with it, anyways, which library is the one I use to compile program?  The normal basic one, is it core? 

- Right now we're doing a monolithic build of wx.  So there is only 1 lib.  (See wiki)

- You should be able to use borland generated lib with msvc - .lib should be a standard format - although I can't guarantee it (different compilers may generate different name mangling exports, so I'm not positive it's 100% compatible).

Offline blank

  • Single posting newcomer
  • *
  • Posts: 4
Re: Compiling WxWidgets
« Reply #2 on: September 17, 2005, 12:17:02 am »
Uh thanks, but what library am I supposed to use.

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Compiling WxWidgets
« Reply #3 on: September 17, 2005, 09:13:12 am »
http://wiki.codeblocks.org/index.php/Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29#Building_wxWidgets_2.6.1_mingw32_.26_vc.2B.2B_toolkit_2003

Those instructions give steps for compiling as well as what options to set to build a sample wxWidgets app against the library.  The wxmsw26_gcc_cb.dll is the monolithic library that's produced (and libwxmsw26.a is the import library.  you just put wxmsw26 in the link libraries listbox which is equivalent to passing -lwxmsw26 as a link option).

Offline blank

  • Single posting newcomer
  • *
  • Posts: 4
Re: Compiling WxWidgets
« Reply #4 on: September 18, 2005, 08:14:15 am »
Look I have wxmsw26d_core.lib, wxzlibd.lib, etc.  Which one do I use?

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Compiling WxWidgets
« Reply #5 on: September 18, 2005, 12:06:09 pm »
hmm. seems you haven't build wxWidgets monolithic.. You need to rebuild wxWidgets with the MONOLITHIC=1 option. (see the wiki page)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline blank

  • Single posting newcomer
  • *
  • Posts: 4
Re: Compiling WxWidgets
« Reply #6 on: September 18, 2005, 08:53:27 pm »
Okay, thanks.  By the way, it only shows you how to do it with mingw and vc tookit, can I do this with borland as well?  IF I cant, can I use the library generated by mingw with borland?  Thanks.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Compiling WxWidgets
« Reply #7 on: September 18, 2005, 11:51:31 pm »
I am not sure, but I thought Borland also has a "make" command. and instead of using makefile.gcc, you should use makefile.bcc. The rest should be the same....

If this doesn;t work, please don't shoot me, because I don't use the Borland compiler  8)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring