lundi 19 juillet 2021

How can I make compiler version specific ifdef?

I've got the problem that my program will compile with g++10.2 and c++11 activated through cmake. but it will not compile with arduino dues arm-none-eabi-g++.exe compiler which also has c++11. The failure occurs because of one line that needs to be added for the arm compiler, but when I add that line to g++10.2 it won't compile.

So I need an #ifdef or some alternative to activate and deactivate the line specific for the compiler.

Aucun commentaire:

Enregistrer un commentaire