Can't compile firmware anymore: 'nullptr' was not declared in this scope
 
Notifications
Clear all

Can't compile firmware anymore: 'nullptr' was not declared in this scope  

  RSS
Tiago
(@tiago)
Reputable Member
Can't compile firmware anymore: 'nullptr' was not declared in this scope

Trying to compile new firmware 3.5
I'm getting this compile error: 'nullptr' was not declared in this scope
I'm using all prusa steps and my gcc version shows version 4.8.1.
Also i checked plantform file and gnu11 is present since nullptr is a c++11 feature.

Then i also tried with latest arduino 1.8.7 and i get same error.

Anyone have this problem too?

Complete log:

Aviso: platform.txt do núcleo «Marlin AVR Boards» contém recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}" deprecados, convertidos automaticamente para recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Considere actualizar este núcleo.
In file included from sketch\ConfigurationStore.cpp:6:0:

ultralcd.h:160: error: 'nullptr' was not declared in this scope

uint8_t choose_menu_P(const char *header, const char *item, const char *last_item = nullptr);

^

ConfigurationStore.cpp:171: error: expected constructor, destructor, or type conversion before '(' token

static_assert (EXTRUDERS == 1, "ConfigurationStore M500_conf not implemented for more extruders, fix filament_size array size.");

^

ConfigurationStore.cpp:172: error: expected constructor, destructor, or type conversion before '(' token

static_assert (NUM_AXIS == 4, "ConfigurationStore M500_conf not implemented for more axis."

^

ConfigurationStore.cpp:180: error: expected constructor, destructor, or type conversion before '(' token

static_assert (sizeof(M500_conf) == 188, "sizeof(M500_conf) has changed, ensure that EEPROM_VERSION has been incremented, "

^

exit status 1
'nullptr' was not declared in this scope

Posted : 23/11/2018 5:27 pm
Tiago
(@tiago)
Reputable Member
Topic starter answered:
Re: Can't compile firmware anymore: 'nullptr' was not declared in this scope

After many tries and edits i fixed the problem by using the Visual Micro with Visual Studio and set the extra flags there.
Compiled now!

Posted : 23/11/2018 6:23 pm
Blodorn
(@blodorn)
New Member
Re: Can't compile firmware anymore: 'nullptr' was not declared in this scope

What specifically did you do to fix this? I'm having this problem right now, and would really like a solution.

Posted : 02/01/2019 6:10 am
Tiago
(@tiago)
Reputable Member
Topic starter answered:
Re: Can't compile firmware anymore: 'nullptr' was not declared in this scope


What specifically did you do to fix this? I'm having this problem right now, and would really like a solution.

I've added -std=c++11 at compiler flags on Visual Studio with Visual Micro

Posted : 07/01/2019 9:57 pm
Share: