Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User_KP compiler fault #14

Open
nekser opened this issue Jul 12, 2016 · 0 comments
Open

User_KP compiler fault #14

nekser opened this issue Jul 12, 2016 · 0 comments

Comments

@nekser
Copy link

nekser commented Jul 12, 2016

Trying to build tests/user_kp, there is the following error:

smart-trip/tests/user_kp$ make
[ 25%] Built target ontology
[ 50%] Building C object common/CMakeFiles/commons.dir/st_point.c.o
smart-trip/common/st_point.c: In function ‘st_free_point_array’:
smart-trip/common/st_point.c:25:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < size; i++) {
^
smart-trip/common/st_point.c:25:5: note: use option -std=c99 or -std=gnu99 to compile your code
make[2]: *** [common/CMakeFiles/commons.dir/st_point.c.o] Error 1
make[1]: *** [common/CMakeFiles/commons.dir/all] Error 2
make: *** [all] Error 2

Possible solution, I found is to add
set (CMAKE_C_FLAGS "--std=gnu99 ${CMAKE_C_FLAGS}")
to tests/user_kp/CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant