not sure how to get this too compile, i have tried an updated mingw, but still get the same error
#include <functional>
void foo() { }
int main() {
std::function<void()> f(foo);
}
obj\Debug\main.o||In function `main':|
C:\Users\vurentjie-64\My Code\CPP\test_functional\main.cpp|4|undefined reference to `___stack_chk_guard'|
C:\Users\vurentjie-64\My Code\CPP\test_functional\main.cpp|7|undefined reference to `___stack_chk_guard'|
C:\Users\vurentjie-64\My Code\CPP\test_functional\main.cpp|7|undefined reference to `___stack_chk_fail'|
||=== Build finished: 3 errors, 0 warnings ===|
trying to use std::function seems to be the cause of this, for instance i can get something simple like this working
auto func = [](){ std::cout << "Hello" << std::endl; };
func();
i don't actually think this is cb specific but perhaps someone else has dealt with this before.
i stumbled on this while trying to pass lambda's as arguments.
the following also errors the same
std::function<void ()> fn=[](){ std::cout << "Hello" << std::endl; };