View previous topic :: View next topic |
Author |
Message |
Ronan
Joined: 27 Jun 2007 Posts: 19
|
Posted: Sun Dec 25, 2011 8:59 am Post subject: C Style conditional compilation |
|
|
hi all,
What's the syntax for C style conditional compilation. I have legacy code in that form but silverfrost plato complains as that: "error 32 - Statement not recognised"
Code: | #ifdef HAVE_CHOLMOD
INTEGER(KIND=AddrInt) :: Cholmod=0
#endif |
and "error 172 - Constant expression expected" is raised for the line below
Code: | INTEGER(KIND=AddrInt) :: SpMV=0 |
any help will be appreciated. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Sun Dec 25, 2011 11:00 am Post subject: |
|
|
You will need /cfpp on the FTN95 command line.
In Plato this means you will have to have a project and set the project properties to do this. |
|
Back to top |
|
|
Ronan
Joined: 27 Jun 2007 Posts: 19
|
Posted: Sun Dec 25, 2011 11:51 am Post subject: |
|
|
Thanks,
I have a project, but exactly where to set it ?
I added /CFPP at the compiler options ->Miscellaneous ->Sparam or in alternative compiler options , respectively but didn't succeed.
it also refers to header file where where is been refered to by
inlcude "config.h"
content of the file is :
Code: | #define ARCH_32_BITS 0
#define C_DLLEXPORT
etc... |
It seems that I didn't properly set the Plato to recognize the C type formatting due to that it produces the same errors for the program and config.h file.
Code: | error 699 - Invalid character '#' at start of line |
Configuration is : CheckMate Win32 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Mon Dec 26, 2011 11:04 am Post subject: |
|
|
Under Compiler Options, Miscellaneous, add /cfpp. |
|
Back to top |
|
|
|