I don't have the nextion.h files so I didn't try compiling it, but does this work? Copy and paste the text in the spoiler tag below into a node editor (this is an easier way to share Embrio nodes than writing out the text like you did).
I don't remember why you can't use a #define statement, I think it messed up the parsing that Embrio does when compiling. I'm not sure if there are cases where you have to use #define instead of a variable. Anyway I will add to my notes to relook at this to see if I can get #defines working.
If this doesn't work, could you paste back the node, but with the nextion references? Assuming you have added the .h and .cpp files to your controller (as seen on the bottom of
this page), you can include the references in the copied XML by right clicking on the node and selecting "copy with references", then checking the references to include in the form that pops up.
<EmbrioCopy>
<Version>2.1.1.0</Version>
<Name></Name>
<UniqueID>00000000-0000-0000-0000-000000000000</UniqueID>
<Description></Description>
<NodeColor>128,128,128,255</NodeColor>
<IsBuiltIn>False</IsBuiltIn>
<ImageByteArray></ImageByteArray>
<Nodes>
<Node>
<UniqueID>284a150b-04ba-4bd8-98af-d689e0034f6b</UniqueID>
<NodeType>Dynamic</NodeType>
<NodeName>Node Definition</NodeName>
<UserDefinedName></UserDefinedName>
<Description></Description>
<NodeColor>201,227,222,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>260</Width>
<DefinitionID>754d4a61-97a6-4504-92ea-e00dceb71457</DefinitionID>
<EditingProperties>
<IsInEditMode>False</IsInEditMode>
<CodeHeight>228</CodeHeight>
<EditedLanguage>Arduino</EditedLanguage>
<IsEditingIODefinitions>False</IsEditingIODefinitions>
<UpdateCodeDefinitionID>c4bc6b88-4575-4aba-b002-ca594db4e5c9</UpdateCodeDefinitionID>
</EditingProperties>
<SetLength>0</SetLength>
<SetInputs></SetInputs>
<SetOutputs></SetOutputs>
<Inputs></Inputs>
<Outputs>
<Output>
<UniqueID>845af889-e9c7-4552-9c77-7ca8473747bb</UniqueID>
<DefinitionID>24b26463-c4d9-4bcd-a9bf-08a1e2ded58c</DefinitionID>
<DefaultName>Msg Out</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>String</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.StringNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<MaxLength>10</MaxLength>
</Output>
</Outputs>
</Node>
</Nodes>
<NodeDefinitions>
<Definition>
<Name>Node Definition</Name>
<SoftwareVersion>2.1.1.0</SoftwareVersion>
<UniqueID>754d4a61-97a6-4504-92ea-e00dceb71457</UniqueID>
<Description></Description>
<UseIOSet>False</UseIOSet>
<InputDefinitions></InputDefinitions>
<OutputDefinitions>
<OutputDefinition>
<Type>Embrio.NodeEngine.Definitions.StringNodeOutputDefinition</Type>
<Name>Msg Out</Name>
<UniqueID>24b26463-c4d9-4bcd-a9bf-08a1e2ded58c</UniqueID>
<IsOutsideConnection>False</IsOutsideConnection>
<IsInIOSet>False</IsInIOSet>
<IsUserAdded>True</IsUserAdded>
<DefaultMaxLength>10</DefaultMaxLength>
</OutputDefinition>
</OutputDefinitions>
<UpdateCodes>
<UpdateCode>
<UpdateCondition>Declaration</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code>#include &quot;Nextion.h&quot;
Nextion myNextion(Serial2, 9600);</Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>c4bc6b88-4575-4aba-b002-ca594db4e5c9</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>Startup</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code>Serial.begin(9600);
myNextion.init();</Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>2875a856-7a8a-4b82-b262-4e07753e5f93</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>EveryUpdate</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code>String message = myNextion.listen();
if(message != &quot;&quot;)
{
Output_MsgOut = message;
}</Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>51c18654-8758-4ddc-90d5-85193b837768</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>Shutdown</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code></Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>ea0ab0ed-a2c9-4e45-877a-df26cb80371b</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>None</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code></Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>d4d8fc4a-4af3-4682-bb50-bca7a2972bc4</UniqueID>
</UpdateCode>
</UpdateCodes>
<NodeColor>201,227,222,255</NodeColor>
<IsBuiltIn>False</IsBuiltIn>
<TouchesPin>True</TouchesPin>
<IsLanguageLocked>False</IsLanguageLocked>
<CategoryName>Project</CategoryName>
</Definition>
</NodeDefinitions>
</EmbrioCopy>