Compilation failure
Brought to you by:
lukasmach
I get the following error when trying to compile the project:
$ make
g++ -O3 -c pkg-config --cflags opencv libxml-2.0 sdl gtk+-2.0
-I./ann_1.1.1/include/ actions.cpp
In file included from geometry_structures.h:38:0,
from actions.h:28,
from actions.cpp:25:
./sift/include/utils.h:159:45: error: new declaration ‘char basename(const char)’
/usr/include/string.h:603:28: error: ambiguates old declaration ‘const char basename(const char)’
actions.cpp: In function ‘bool action_camera_resection(size_t, bool, bool)’:
actions.cpp:108:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat]
make: *** [actions.o] Error 1
Get the same thing when trying to compile
$make
g++ -O3 -c
pkg-config --cflags opencv libxml-2.0 sdl gtk+-2.0
-I./ann_1.1.1/include/ actions.cppIn file included from geometry_structures.h:38:0,
from actions.h:28,
from actions.cpp:25:
./sift/include/utils.h:159:45: error: new declaration ‘char basename(const char)’
extern char basename( const char pathname );
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from core_debug.h:30,
from core_structures.h:29,
from geometry_structures.h:28,
from actions.h:28,
from actions.cpp:25:
/usr/include/string.h:599:26: error: ambiguates old declaration ‘const char basename(const char)’
extern "C++" const char basename (const char filename)
^
In file included from geometry_structures.h:28:0,
from actions.h:28,
from actions.cpp:25:
actions.cpp: In function ‘bool action_camera_resection(size_t, bool, bool)’:
core_structures.h:50:177: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
#define ASSERT_IS_SET(variable_name, index) (IS_SET((variable_name), (index)) ? 0 : (printf("%s, %d: accessing undefined index %d in dynamic array", FILE, LINE__, (index)), core_abort()))
^
actions.cpp:108:2: note: in expansion of macro ‘ASSERT_IS_SET’
ASSERT_IS_SET(shots, shot_id);
^
make: *** [actions.o] Error 1
Forgot to mention this is on Linux, Ubuntu 13.10