First create an empty Project file:
- File | New | Project
- Target name = myproggy (whatever you call your program)
- Target path = . (just a dot will do)
- Type of build = FLTK application
- select With console if you are using cout, otherwise don't.
- OK
If you don't have the C++ file already, create it:
- File | New | C++ Source File
- type in some contents
- File | Save
Now add the C++ file to the project:
- Select the Project file
- Project | Insert File(s)
- Select your C++ file
- Open
Now the Build and Run buttons will work properly.
The purpose of the Project file is to tell the compiler that the FLTK libraries need to be linked with your C++ program. It can also be used if your program is contained in many small files - just insert them all into the project file.
When you move your program between computers, it is necessary to copy the project file (something.PRJ) as well as your program. Otherwise, you have to re-create the project file.
MSC 18 Oct 2005