|
|
On 2020-10-21 06:07, ken williams wrote:
> Now I want to run the test from "Programming Principle and Practice" with the code:
>
> #include <FL/Fl.h>
> #include <FL/Fl_Box.h>
> #include <FL/Fl_Window.h>
Oh no, if the book has lowercase .h's, then I'm afraid it's a mistake in the book.
.H is correct for those.
You can get away with the wrong case on some platforms (windows + mac), but not on linux,
freebsd, etc.
FLTK uses ".H" for C++ includes, and ".h" for C include files.
> But now I have this compile error:
>
> ken@Lnx fltk_test]$ g++ fltk_test.cpp
No, you can't just compile FLTK this way. There's many libraries that need to
be included on the command line.
Use instead:
fltk-config --compile fltk_test.cpp
..and you'll likely get better results. fltk-config has other command flags
to let you get the list of compiler flags, libraries, etc. if you're trying
to compile more complicated applications that have many modules using a Makefile.
But for a single .cpp file like you have, the above should work fine.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/06434cfa-22bd-9bc7-183c-6950c3b05ba5%40seriss.com.
[ Direct Link to Message ] | |
|
| |