Trying to use FLTK on Mac...

CodeLite installation/troubleshooting forum
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Trying to use FLTK on Mac...

Post by DavidGH »

Also my file says wx-config.in. Does the extension mean anything different or is that what I'm looking for?
No; (to simplify) that file is to do with creating wx-config when building wxWidgets. 'wx-config' is actually a symlink that leads (perhaps indirectly) to, for example, /usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3.0, which is a script that, when called, outputs the details of its wxWidgets build and location.
the first three lines say
make[1]: wx-config: Command not found
What is the full path to your installed wx-config? You can probably find out by doing, in a terminal:
which wx-config
Do I need to locate the main wxWidgets-3.1.3 folder somewhere specific for the CodeLite command lines to find it?
If wxWidgets is installed, you don't need to do anything special (see above). OTOH if it's somewhere unusual (i.e. not in your $PATH) then you will need to let CodeLite know. The easiest way to do that is, in your compiler/linker settings, to change the shell command to e.g.
$(shell /full/path/to/that/wx-config --libs --debug)
And back to FLTK... there is still a huge list of "Undefined symbols...
That means the path is now valid but either wrong (it's a genuine file, but the wrong one) or inadequate (it's one library, but there are others that also need to be added). On Linux I think pkg-config will output the correct FLTK information (pkg-config is similar to wx-config; or, more accurately, wx-config is a wxWidgets-specific thing; most other programs use pkg-config). IIUC that's available for OSX too. If so, get it to tell you where it thinks your FLTK installation is. Also, you can call pkg-config in the CodeLite settings in the same way as you call wx-config.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Trying to use FLTK on Mac...

Post by DavidGH »

when I typed wx-config --cxxflags (etc.) in the terminal, I simply copy pasted the output into the Linker options etc. and I think I'm good to go!
I'm glad you have it working!

However, that's not future-proof. When you want to use a different wx version (and there'll probably be a new wx release today) that output will likely be inaccurate.

It would be better to find out why a simple $(shell wx-config... fails, and correct it. Where is your wx-config script? Any spaces in its path? When you try to call it in the standard way in a CodeLite project, what does the Build output tell you it's trying to do, and what errors do you get?
Johnnywz00
CodeLite Curious
Posts: 9
Joined: Mon Jul 20, 2020 4:46 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trying to use FLTK on Mac...

Post by Johnnywz00 »

Thanks for this info, this is gold for a rookie like me. My only programming has been in a C-derived (but much more user-friendly) text adventure creation language called TADS 3. So in a contained environment, I know a little something about using objects and overriding methods from a library that runs on a TADS interpreter, but when you throw me into the terminal and whatnot, I'm a total toddler.
I will try the additional info you gave about the config, however, for now (maybe not for always?) I'm just doing this as a hobby, so I am just in the tinkering stage and doubt that I will need to get the latest version of wxW every time it comes out. But really good to know. And I really like to understand how things work and why they don't work, instead of just accepting magical formulae, so thanks for explaining about the config and FLTK as well.
Many thanks for your time!
John

PS I believe the build output was always the same: wx-config command not found, and <wx/wx.h> file not found
Post Reply