English 中文(简体)
法定链接、视觉演播室和FLANN
原标题:Static linking, visual studio, and FLANN

我正试图将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

确实会有一些帮助。 我为此花费了大量时间。

最佳回答

事实证明,这又一次证明,你正在对一切静态汇编。

问题回答

暂无回答




相关问题
C++/CLI : How to override Equal method of Object class

I am a newbie to C++/CLI and is having some problems trying to override the Equal method of the base Object class. I get the following compilation warning error for the following code. How should this ...

处理多重定义错误[封闭]

I m试图汇编一些C++文档。 • 在连接阶段(汇编工作)发现以下几类错误:

What s causing this error in a subclass of MKAnnotationView?

I m trying to create a subclass of MKAnnotationView for an iPhone Mapkit app, but for some reason I am suddenly encountering this error: Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/...

iphlpapi / ifdef.h

I m trying to use iphlpapi (GetAdapterInfo) and am having trouble compiling the code. I have iphlpapi.h from SDK 7 and have added the appropriate path to the include files in visual studio. I get ...

was not declared in this scope C++

Why do I get this error in the code below? class ST : public Instruction{ public: ST (string _name, int _value):Instruction(_name,_value){} void execute(int[]& anArr, int aVal){ //...

Adding an include guard breaks the build

I added #ifndef..#define..#endif to a file of my project and the compiler fails. As soon as I remove it or put any other name in the define it compiles fine. What could be the problem? Sounds like ...

<list> retreving items problem with iterator

I have a list of type Instruction*. Instruction is a class that I made. This class has a function called execute(). I create a list of Instruction* list<Instruction*> instList; I create an ...

热门标签