Build error (GCC 4.7.0)
timjb opened this issue · 2 comments
timjb commented
I got the following error using GCC on Arch Linux:
$ python tools/prebuild.py
$ make config=debug command_line
==== Building static_lib (debug) ====
(output omitted)
In file included from ../src/generated/all_builtin_types.cpp:1:0:
../src/generated/../types/null.cpp:6:5: error: ‘string’ in namespace ‘std’ does not name a type
../src/generated/../types/null.cpp:10:23: error: variable or field ‘formatSource’ declared void
../src/generated/../types/null.cpp:10:23: error: ‘StyledSource’ was not declared in this scope
../src/generated/../types/null.cpp:10:37: error: ‘source’ was not declared in this scope
../src/generated/../types/null.cpp:10:45: error: ‘Term’ was not declared in this scope
../src/generated/../types/null.cpp:10:51: error: ‘term’ was not declared in this scope
../src/generated/../types/null.cpp:15:5: error: ‘caValue’ does not name a type
../src/generated/../types/null.cpp:20:21: error: variable or field ‘setup_type’ declared void
../src/generated/../types/null.cpp:20:21: error: ‘Type’ was not declared in this scope
../src/generated/../types/null.cpp:20:27: error: ‘type’ was not declared in this scope
make[1]: *** [obj/Debug/static_lib/all_builtin_types.o] Error 1
make: *** [static_lib] Error 2
By looking in the files in src/types
I noticed that the line
#include "circa/internal/for_hosted_funcs.h"
is missing in src/types/null.cpp
. I added it and the code compiled. I found this out by chance and don't consider myself an expert in C++. Can you confirm this and add the line in the repo?
paulhodge commented
Thanks for the investigation, adding the #include line was a good fix. Should be fixed in c8fe70d
timjb commented
Thanks!