which as far as we known only occurs when you are building a 64-bit library, then you need to add '-fPIC' to each of the 'Command' lines in the C++ Linker, C++ Compiler, and C Compiler settings for both the 'Debug' and the 'Release' configurations. The C++ Linker and C++ Compiler command lines will then look like 'g++ -fPIC', whereas the C Compiler command line will look like 'gcc -fPIC'.
解决步骤:
(1)Select the TOP-SURF project in the left pane, and right-click to show the context menu, from which you will select 'Properties'.
(2)This opens a new window. In the left pane of this window, expand the 'C/C++ Build' option and then click 'Settings'.
(3) 在界面左侧分别选择C++ Linker, C++ Compiler, and C Compiler (如下图),在command中加入-fPIC
(4)在界面上方Configuraion处选择release重复(3)的步骤
2.#include<io.h>, io.h: No such file or directory
换成#include<sys/io.h>