> I am self taught and rather unfamilair with the g++/GCC compiler
> toolchain. [...] when I try to compile the helloworld program:
> [...]
> using the command:
> g++ -o tester tutorial.cxx
>
> I get the following errors:
> tutorial.cxx:1:19: error: FL/Fl.H: No such file or directory
> ...

This is not really an fltk problem, so if off-topic here, but...

Your problem is that your g++ command line is only really sufficient
for a simple program where all code is contained in a single file
and that code makes no reference to variables and functions from
elsewhere such as external libraries.

The g++ compiler will look in some standard places for any header
files that are referenced via #include statements. The FL/* files
are not in the standard places, so you will need to tell the compiler
where to find these files by using the -I option.

Once you have done that, you still have to tell the compiler/linker
where it can find the code corresponding to the implementation of
the entities in the header files. You do this via -L and -l options.

In your case, the easiest thing to do is to use the 'fltk-config'
tool that should have been built during the installation:

    /path/to/fltk-config --compile tutorial.cxx

Check out 'fltk-config --help' to see the other options and how to
find out how to set the -I, -L and -l options.

You really need to find a gcc/g++ tutorial, but I hope this helps.

Cheers
Duncan

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to