Author Topic: Code::Blocks - configuration (MS Windows)  (Read 3973 times)

Offline marccinn

  • Single posting newcomer
  • *
  • Posts: 2
Code::Blocks - configuration (MS Windows)
« on: May 09, 2010, 04:14:10 pm »
Hi. I'd like to use C::B as the IDE to Pascal... yes, I want compile my programs with FPC. I hope it is possible to configure codeblocks to make it easier.

I added pascal syntax to Editor with no problems. My problem appears when I want to compile an example program - the FPC syntax is a bit different than GCC and very simplier, something like that - I've got my program in 'hello.pas' file, now type in console just "fpc hello" or "fpc hello.pas" and if no errors, I'm able to launch 'hello.exe'. When typing "fpc hello.pas -o hello.exe", the '-o' is an incorrect option.

Ok, my questions are:
1. How to cause Code::Blocks to compile .pas files with FPC (and to compile it ever; now, although all paths are set correctly, when pressed F9 I see only "nothing to be done"; but if extension of the file is e.g. *.cpp, fpc is ran) ?
2. How to modify the compiler's command line in IDE? When compilinkg, I want "fpc hello.pas" against "fpc hello.pas -o hello.pas".

Thanks in advice for help.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13070
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline marccinn

  • Single posting newcomer
  • *
  • Posts: 2
Re: Code::Blocks - configuration (MS Windows)
« Reply #2 on: May 09, 2010, 08:11:22 pm »
Thanks a lot for this. Compilation is now OK, but the source file still must have a C or C++ extension - - I think it doesn't work... or I cannot set 'pas' extension as default. And I don't want to create a project, specially to may compile a single file...