Silverfrost Forums

Welcome to our forums

C Style conditional compilation

25 Dec 2011 7:59 #9398

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'

#ifdef HAVE_CHOLMOD
    INTEGER(KIND=AddrInt) :: Cholmod=0
#endif

and 'error 172 - Constant expression expected' is raised for the line below

INTEGER(KIND=AddrInt) :: SpMV=0

any help will be appreciated.

25 Dec 2011 10:00 #9399

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.

25 Dec 2011 10:51 #9400

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 :

#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.

error 699 - Invalid character '#' at start of line

Configuration is : CheckMate Win32

26 Dec 2011 10:04 #9401

Under Compiler Options, Miscellaneous, add /cfpp.

Please login to reply.