Author Topic: building fltk apps  (Read 4583 times)

MarkR

  • Guest
building fltk apps
« on: June 09, 2005, 04:53:39 pm »
I am using the latest distro 1.0-finalbeta with the posted 'fix' to the console runner (I don't mind hitting enter  :wink: ) on W2K with CygWin.  First off, very nice.  I have slowly been making the switch from an editor and bash shell into C::B and haven't found anything bad yet!

Question 1:
How to pass args (ie appname <args>) to console runner?

Question 2:
How to run fltk-config <option> <option> <option> so that my cxxflags and ldflags reflect the return values from fltk-config.  I tried it as a pre-build command (with and without the single quotes) and it seemed to fail horribly.  Like it did not know fltk-config was in my cygwin search path.

Reflections on above:
I am sure that there must be a way to pass console runner an arg list.  I just can't seem to locate it (nor get hits using search here).  Please advise.

Running fltk-config is the best way to get all the needed compiler options and linker includes I know of for building an fltk app.  In a perfect world I could run:
Code: [Select]

fltk-config --use-images --cxxflags
// This output would be used when compiling
fltk-config --use-images --ldflags
// This gives the needed link libraries


Apart from not being able to find out how to pass args I now just run the above commands and hand copy the libs into the linker section.  I then created an fltkAPP user template but since you don't always need --use-images (or the flags for GL) I end up with extra link libs.

Thanks for your time and an excellent (and open) product.

A happy customer,
Mark

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
building fltk apps
« Reply #1 on: June 09, 2005, 05:50:36 pm »
Quote
Question 1:
How to pass args (ie appname <args>) to console runner?

The arguments to be passed when executing your program, can be set in "Project->Set execution parameters".

Quote
Question 2:
How to run fltk-config <option> <option> <option> so that my cxxflags and ldflags reflect the return values from fltk-config. I tried it as a pre-build command (with and without the single quotes) and it seemed to fail horribly. Like it did not know fltk-config was in my cygwin search path.

Not possible in "direct-mode", only in GNU "make" mode. To set this, go to "Compiler->Compiler options->Other->Build method".

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

Anonymous

  • Guest
building fltk apps
« Reply #2 on: June 09, 2005, 06:42:33 pm »
Thank you very much, it did help a lot.  The first I may (or not) have found eventually.  The second, drat!  Just when I thought I threw the Makefile monkey from my back.  Oh well.

Mark

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building fltk apps
« Reply #3 on: June 09, 2005, 07:31:18 pm »
BTW Maybe we should change "Set Execution parameters" to "Set program arguments". Parameter looks too generic, and many people seem to migrate from Visual blah.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
building fltk apps
« Reply #4 on: June 09, 2005, 07:45:09 pm »
Quote from: Anonymous
Thank you very much, it did help a lot.  The first I may (or not) have found eventually.  The second, drat!  Just when I thought I threw the Makefile monkey from my back.  Oh well.
Mark

Well, not possible yet ;)

Quote from: rickg22
BTW Maybe we should change "Set Execution parameters" to "Set program arguments". Parameter looks too generic, and many people seem to migrate from Visual blah.

Sure Rick, go ahead :)

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