forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

C Style conditional compilation

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
Ronan



Joined: 27 Jun 2007
Posts: 19

PostPosted: Sun Dec 25, 2011 8:59 am    Post subject: C Style conditional compilation Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7928
Location: Salford, UK

PostPosted: Sun Dec 25, 2011 11:00 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Ronan



Joined: 27 Jun 2007
Posts: 19

PostPosted: Sun Dec 25, 2011 11:51 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7928
Location: Salford, UK

PostPosted: Mon Dec 26, 2011 11:04 am    Post subject: Reply with quote

Under Compiler Options, Miscellaneous, add /cfpp.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group