1

我一直在尝试在 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
4

1 回答 1

0

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

#include <flann.h>

CBIR.hpp.

于 2013-09-05T12:31:27.147 回答