General

Reply
Accepted Solution

#elif - Invalid preprocessor directive

Hi folks,

 

Trying to do an

#if CONDITION

#elif

#endif

 

#if and #endif work fine. #elif shows up in autocomplete, but upon build I get an "Invalid preprocessor expression" error. Any ideas? Thanks in advance.

Please use plain text.

Re: #elif - Invalid preprocessor directive

Do you mean to use #else instead of #elif?

 

For example #elif would be used like this in my engine:

 

#if XBOX
    // do xbox init
#elif WINDOWS_PHONE
    // do WP7 init
#elif PSM
    // do PSM init
#else
    // some other platform
#endif

 

 

If you only have one condition you'd just want to use #else

 

#if DEBUG
    // do debug stuff
#else
    // do release stuff
#endif

 

Martin Caine
Founder and Lead Programmer of Retroburn Game Studios

Twitter | LinkedIn | Facebook
Please use plain text.

Re: #elif - Invalid preprocessor directive

Yup, I'm a doofus. Thanks for the quick reply!

Please use plain text.
This widget could not be displayed.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。






Recent News