#pragma and -e or -exx

New to FreeBASIC? Post your questions here.
grausvic
Posts: 4
Joined: Jun 07, 2019 10:34

#pragma and -e or -exx

Postby grausvic » Jun 07, 2019 10:48

I'm trying to compile instructions (written inside a program) like:

#pragma -exx
#pragma "-exx"
#pragma cmdline=-exx
#pragma cmdline="-exx"

...but they don't work, an error is shown when compiling. How can I use these instructions (I mean -exx) inside a FreeBasic program?
MrSwiss
Posts: 3083
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: #pragma and -e or -exx

Postby MrSwiss » Jun 07, 2019 12:31

How can I use these instructions (I mean -exx) inside a FreeBasic program?
Simple, you don't ... (except, maybe #Pragma Once, in a *.bi file).
Those are Command Line Arguments for the Compiler itself (FBC).

See documentation: FreeBASIC Manual
Specifically, FBC Command Line Options: Compiler Options
grausvic
Posts: 4
Joined: Jun 07, 2019 10:34

Re: #pragma and -e or -exx

Postby grausvic » Jun 08, 2019 12:46

I see. My specific problem was that I couldn't find how to tell my editor to compile with the -exx option (even if I found it, my syntax was wrong).
And I thought that, as well as you can use things like #lang and many others inside your program, you could write something like #-exx or #pragma -exx or whatever.
It's curious: unless I'm wrong, there is an asymmetry between command options like -lang and others like -exx, so for the beginner it's a bit confusing, specially if you have problems with your IDE (editor associated with FreeBasic).
Now everything is O.K, I finally found how to work it out with my editor.
I hope this mini-post serves to any beginner having the same problem: you must insist, re-read you editor's instructions many times, retry, ...

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 5 guests