I'm trying to start with wxWidgets (developing under Debian). But I don't understand why I should "install" wxWidgets. Why can't I just include the header-files in my Project and compile it?
The following is based on the standard practice of headers containing function prototypes only. This is, I believe, the case with wxWidgets.
When you compile code, the compiler looks through the header files to check that the functions you use are being used correctly; it check against the name of the function, the input types, and the return type. The header does not contain the code for the function; only the prototype.
It then leaves a note for the linker, saying "at this point, run the function named THIS, with inputs THESE, and give me back an object of type THIS".
The linker then goes looking for all those functions. They exist in the compiled libraries. No libraries, no compiled code. You have to use the libraries because the headers do not contain the code.
Thanks a lot!
But after compation, the binary includes all necessary code to talk to the X-Server directly and there aren't any dynamic-linked libraries, are they? So the binary would also run on another linux-machine without having the compiled wxWidgets-files in the inc-directory, wouldn't it? (Like a stand-alone app, constisting of only one binary, talking directly to the X11-Server).
And thanks for your offer Jessy.
Where can I choose the way to link wxWidgets (static/dynamic)? Is this written in the man-page of gcc? Because for little demo-programms I'd like to include it in my binary, but for reel programs it would be better to script an installer which installs the wx-libraries.