Author Topic: Project wizard with wxSmith enabled results in incomplete build options  (Read 3760 times)

nullify

  • Guest
Hi, I'm not experienced with C::B or wxWidges so please forgive me if I'm stating the obvious or have misunderstood anything.

There's a problem when using the project wizard and selecting wxSmith as the GUI builder in the wizard. When wxSmith is chosen for the GUI builder in the wizard, it sets up the project and adds some skeleton code. This code includes the following:

#include <wx/image.h>
...
wxInitAllImageHandlers();

The problem is that code requires the jpeg and tiff compents to be linked in. But the project wizard does not add those components to the link settings. So trying that "first" program created by the wizard threw up loads of linker errors. It stumped me for a while, not a good start I thought - but was easy enough to fix by adding jpeg and tiff libs.

What do I think should happen? I think this manual process of adding libs should not be necessary because the wizard is responsible for the correct setup. Further more, I found out that I *didn't* even need those 2 lines of code for the program to build and run. So I'm unsure if they're really needed.

Tested with wxWidgets 2.8.8, CB8.02 and nightly build 5160, MinGW5.1.4, I'm using static multilibs - not monolithic.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Project wizard with wxSmith enabled results in incomplete build options
« Reply #1 on: August 11, 2008, 03:25:05 pm »
I'm using static multilibs - not monolithic.
Did you disable the use of the monolithic lib in the wizard then? It'll ask for the required (multi) libs if you do so directly from within the wizard and setup the project accordingly.

However, if you ever change the code of your project using wxSmith in a way it would require another lib then you need to setup this yourself within the linker option of your project / target. This is out of the scope of the wizard. It just sets up an initial project for you.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ