Linux, Modeler, FLTK and Libraries:

or: Things to remember when trying to make this work on your own box

 

When you compile a program, you have to tell it where to find its
libraries. There are a number of default paths for which library files
are seached. The specific paths are dependent on your operating system and
its particular configuration. In windows, it's usually
c:\windows\system32. In Linux, usually, it is /lib and /usr/lib.

If you compile this in Linux, you may need to tell the compiler where FLTK
is located. If it is in /usr/lib or /lib, you're fine. However, most
likely, if you built FLTK from scratch, it's likely it will end up in
/usr/local/lib unless you tell it otherwise. Thus, you have to do two
things:

1) tell the compiler to look in /usr/local/lib for the library
by passing it "-L/usr/local/lib". This is done
in the makefile already. Change it as needed.

2) Tell the OS where to find the libraries when you run the
program. This is done by setting the environment
variable LD_LIBRARY_PATH. In bash, this would be:
export LD_LIBRARY_PATH=/usr/local/lib

There are multiple ways to get around this. Infact, this particular
method is a bit redundant (specifying LD_LIBRARY_PATH makes it unecessary
to specify -L...), but this way things surely work. Another note,
LD_LIBRARY_PATH is a kludge! It was made to be used only temporarily.
Don't keep it set in your environment all the time as it may break things.

__________________________________________

thanks to Albert for the wonderful explanation and Linux build.

_________________________________________