Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
antonyturner  
#1 Posted : Wednesday, February 22, 2017 1:53:02 PM(UTC)
antonyturner

Rank: Newbie

Groups: BetaUser, Registered
Joined: 2/14/2017(UTC)
Posts: 3

The #endif tag in the Includes section gets ignored if this is used in more than 1 node.

To replicate, create 2 nodes, with the following includes:

//node 1 Include
#if n1
#include n1.h
#endif

//node2 include
#if n2
#include n2.h
#endif

The second #endif is ignored, so you get an error "unmatched #if"
EmbrioAdmin  
#2 Posted : Wednesday, February 22, 2017 3:53:20 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Thanks for the report, I'll look into it.

In what scenario are you needing to use these #if statements?
antonyturner  
#3 Posted : Monday, February 27, 2017 4:50:32 AM(UTC)
antonyturner

Rank: Newbie

Groups: BetaUser, Registered
Joined: 2/14/2017(UTC)
Posts: 3

I'm trying to include or exclude certain functionality based on global #defines. So, for instance, I have WIFI and GMS functionality, which I want to be able to switch on/off depending on what version of my hardware I'm compiling.

It works fine in all the other sections, but not in the "includes" section.
EmbrioAdmin  
#4 Posted : Monday, February 27, 2017 2:50:34 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Makes sense.

I think what's happening is that #include lines are being parsed out and dealt with, I'll update that process to ignore #if and #endif lines.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error