i programmed a software for internet access via ethernet and GSM. It uses a compiler switch GSM_m to compile it ether for ethernet or GSM.
But after having done all the work and compiling / switching between GSM and ethernet i found a very strange behaviour of the compiler. It was ok with GSM_m defined but when i commented the Line 3 (#define) the compiler told me the sub ''zugangsdaten() was not declared in this scope''
For better understanding and knowing i broke down the whole program to the (now useless) rest of the 14 lines you can see. But the error is still there...
The compiler error comes up...
if i comment line 1 (//), but NOT if i comment line 5 (SoftwareSerial) at the same time
The compiler works as forseen if no line is commented.
It's better if you post your code, rather than attach it. And it must be posted between code tags. </> in the "Reply" dialog. When it's just attached, we have to first create a folder then open your code in our IDE. And afterwards, the folder remains unless we navigate to the "Temp" folder and manually remove it. It's much easier to just view the code in your post.
Now you've edited and added the code, but wrongly:-
ie Your code and any error messages should always be placed between code tags. Posting it inline as you have done makes it much harder to read or copy and paste for diagnosis.
It's still not too late to edit your post and do this. You'll make potential helpers much happier.
I think that the problem is caused by the way that the IDE rearranges the program and inserts its own function definitions before compiling the resulting code.
UKHeliBob:
I think that the problem is caused by the way that the IDE rearranges the program and inserts its own function definitions before compiling the resulting code.
Try inserting
byte dummyByte;
as the very first line of the program
Hi UKHeliBob,
thank you very much for reading my post and your very helpful hint which solved my problem!