Visual Studio 2017 Professional with all the latest updates
Visual Micro IDE Extension (latest update: 1801.27.0)
Arduino IDE 1.8.5
Teensyduino 1.41
IDE: Arduino 1.6/1.9
Board: Teensy 3.6
We have followed the solution provided here (https://forum.pjrc.com/threads/23467-Using-std-vector?p=69787&viewfull=1#post69787) and it has been working for months but now is failing with:
Visual Micro IDE Extension (latest update: 1801.27.0)
Arduino IDE 1.8.5
Teensyduino 1.41
IDE: Arduino 1.6/1.9
Board: Teensy 3.6
We have followed the solution provided here (https://forum.pjrc.com/threads/23467-Using-std-vector?p=69787&viewfull=1#post69787) and it has been working for months but now is failing with:
Code:
// Adding functions not included in std for compiler
#pragma once
extern "C"
{
int _getpid() { return -1; }
int _kill(int pid, int sig) { return -1; }
}
namespace std {
void __throw_bad_alloc()
{
Serial.println("Unable to allocate memory");
}
void __throw_length_error(char const*e)
{
Serial.print("Length Error :");
Serial.println(e);
}
}
Code:
Compiling 'Manifold' for 'Teensy 3.6'
City.cpp.o*: In function __gnu_cxx::new_allocator<CanKingdomStuff::Letter>::allocate(unsigned int, void const*)
new_allocator.h:102: undefined reference to std __throw_bad_alloc()
Error linking for board Teensy 3.6
new_allocator.h:102: undefined reference to std __throw_bad_alloc()
Build failed for project 'Manifold'
Folder.cpp.o*: In function std::vector<CanKingdomStuff::Letter, std::allocator<CanKingdomStuff::Letter> >::reserve(unsigned int)
vector.tcc:69: undefined reference to std __throw_length_error(char const*)
Page.cpp.o*: In function std::vector<unsigned char, std::allocator<unsigned char> >::_M_check_len(unsigned int, char const*) const
stl_vector.h:1425: undefined reference to std __throw_length_error(char const*)
collect2.exe*: error: ld returned 1 exit status