2

I'm started to learn Free Pascal and stick to the simple yet important question: is it possible to create project in console Free Pascal IDE?

How could I compile two units into one program?

I've searched over Internet, but all links leads to the Lazarus, which is not the same thing as Free Pascal IDE...

My best clue would be is to use Makefiles, but as far as I can see, information on this is also very-very limited.

So how create and compile multi-unit Pascal programs in Free Pascal IDE then?

3
  • 2
    Why not just use Lazarus though?
    – Thomas
    Jan 24, 2013 at 9:10
  • 1
    I don't like Delphi style UI this Gimp like windows placement...
    – shytikov
    Jan 24, 2013 at 10:12
  • 1
    Lazarus doesn't work in a putty. Jan 24, 2013 at 20:24

1 Answer 1

4

The textmode IDE has no project concept where a list of files is kept, OR any external build system.

Basically the autobuild capability of the compiler (that is built-in) is utilized, so pressing compile or build on the mainmodule(program) will compile the whole lot.

The main module can be set in compiler->primary file, so that compile will also work from non main modules.

However it is possible to have local IDE settings (primary file, directories, defines), by copying all fp.(cfg|dsk|ini) files from the FPC directory to your project dir, and then customizing them (from within the IDE).

One could regard the combination of a set of config files + a directory for the mainmodule as a project or solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.