不在make进程中命名类型

时间:2013-09-05 10:53:08

标签: c++ boost

我一直在尝试在Windows中编译一些代码,但是我收到了这个错误:'flann_index_t'没有命名类型' 这个错误来自哪里? 任何人都可以帮我解决这个问题吗?

g++ -I. -Iflann/src/cpp -c -o src/main.o src/main.cpp
In file included from ./boost/asio/async_result.hpp:18,
             from ./boost/asio.hpp:20,
             from src/common.hpp:30,
             from src/main.cpp:9:
./boost/asio/detail/config.hpp:367:5: warning: #warning Please define _WIN32_WIN
NT or _WIN32_WINDOWS appropriately.
./boost/asio/detail/config.hpp:368:5: warning: #warning For example, add -D_WIN3
2_WINNT=0x0501 to the compiler command line.
./boost/asio/detail/config.hpp:369:5: warning: #warning Assuming _WIN32_WINNT=0x
0501 (i.e. Windows XP target).
In file included from src/common.hpp:50,
             from src/main.cpp:9:
src/CBIR.hpp:32: error: 'flann_index_t' does not name a type
./flann/util/matrix.h: In function 'int cbir::main(int, char**)':
./flann/util/matrix.h:75: error: 'flann::uchar* flann::Matrix_::data' is protected
src/main.cpp:39: error: within this context Makefile:43: recipe for target `src/main.o' failed 
make: *** [src/main.o] Error 1

1 个答案:

答案 0 :(得分:0)

假设您使用的是flann,那么您需要:

#include <flann.h>
CBIR.hpp中的