我正试图将FLANN-Example.cpp编入2010年演播室。 档案是<代码>的一个使用例子。 快速近邻图书馆(FLANN);该图书馆意在产生可执行的效果。 我通过整个<代码>CMake,并安装了为静态连接而建立的SC5F图书馆(附属图书馆)。
我可以汇编其他所有东西,但flann_example.cpp除外。
产出如下:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: flann_cpp_s, Configuration: Debug Win32 ------
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _setvbuf already defined in LIBCMTD.lib(setvbuf.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isdigit already defined in LIBCMTD.lib(_ctype.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isalpha already defined in LIBCMTD.lib(_ctype.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __errno already defined in LIBCMTD.lib(dosmap.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _isalnum already defined in LIBCMTD.lib(_ctype.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strcspn already defined in LIBCMTD.lib(strcspn.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __read already defined in LIBCMTD.lib(read.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __get_osfhandle already defined in LIBCMTD.lib(osfinfo.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __open already defined in LIBCMTD.lib(open.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __write already defined in LIBCMTD.lib(write.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __lseeki64 already defined in LIBCMTD.lib(lseeki64.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __chsize_s already defined in LIBCMTD.lib(chsize.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __close already defined in LIBCMTD.lib(close.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: __fileno already defined in LIBCMTD.lib(fileno.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fread already defined in LIBCMTD.lib(fread.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
2>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
2>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
2>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
2>LINK : warning LNK4098: defaultlib MSVCRT conflicts with use of other libs; use /NODEFAULTLIB:library
2>C:flann-1.6.11-srcinlibDebugflann_example.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
这里是我的<可见> 添加名录:
C:Program Files %28x86%29HDF GroupHDF51.8.7includecpp;
C:/flann-1.6.11-src/src/cpp;
%(AdditionalIncludeDirectories)
兹在<>链接<>><><><>><><>
C:Program Files (x86)HDF GroupHDF51.8.7libhdf5_cpp.lib;
C:Program Files (x86)HDF GroupHDF51.8.7libhdf5.lib;
C:Program Files (x86)HDF GroupHDF51.8.7libhdf5_hl_cpp.lib;
C:Program Files (x86)HDF GroupHDF51.8.7libhdf5_hl.lib;
C:Program Files (x86)HDF GroupHDF51.8.7lib oolshdf5_tools.lib;
C:Program Files (x86)HDF GroupHDF51.8.7libzlib.lib;
C:Program Files (x86)HDF GroupHDF51.8.7liblibszip.lib;
C:flann-1.6.11-srcinlibDebugflann_cpp_s.lib;
C:flann-1.6.11-srcinlibDebugflann_s.lib;
C:flann-1.6.11-srcinlibDebugflann_cpp-gd.lib;
C:flann-1.6.11-srcinlibDebugflann.lib;
C:flann-1.6.11-srcinlibDebugflann_cpp_s-gd.lib;
C:flann-1.6.11-srcinlibDebugflann_cpp.lib;%(AdditionalDependencies)
<>Compiler Options
/I"C:Program Files (x86)HDF GroupHDF51.8.7includecpp" /I"C:/flann-1.6.11- src/src/cpp" /Zi /nologo /W3 /WX- /Od /Ob0 /Oy- /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_FLANN_VERSION=1.6.11" /D "FLANN_STATIC" /D "CMAKE_INTDIR="Debug"" /D "_MBCS" /Gm- /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fp"flann_cpp_s.dirDebugflann_example.pch" /Fa"Debug" /Fo"flann_cpp_s.dirDebug" /Fd"C:/flann-1.6.11-src/bin/lib/Debug/flann_cpp_s.pdb" /Gd /TP /analyze- /errorReport:queue
确实会有一些帮助。 我为此花费了大量时间。