2

Argh... I've been struggling lately to make Visual Studio 2010 (VC++) include a bunch of 3rd party libraries I wanna use in my project. That's the issue: The linker seems not to be able to determine every symbol that is generated in my code which come from the 3rd party libraries definitions. I've included the header files path on my include directories and also the sources path on my source directory, but it is still not working. I've googled it for a while and in most of cases, the issues is cause by a missing reference of the .lib file on linker's additional dependencies, however the library don't come with them.

Here's a piece of sample code:

#include "stdafx.h"
#include <fuzzylite\FuzzyEngine.h>

int _tmain(int argc, _TCHAR* argv[])
{
    fl::FuzzyEngine eng;
    return 0;
}

So that's the output VS shows

Fuzzycolors.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall fl::FuzzyEngine::~FuzzyEngine(void)" (??1FuzzyEngine@fl@@UAE@XZ) referenced in function _wmain
Fuzzycolors.obj : error LNK2019: unresolved external symbol "public: __thiscall fl::FuzzyEngine::FuzzyEngine(void)" (??0FuzzyEngine@fl@@QAE@XZ) referenced in function _wmain

So i wonder if is there a way to build my sources with the .h and .cpp files of my 3rd party library. Thank you.

Caio

4

1 回答 1

0

在http://www.fuzzylite.com查看新版本的fuzzylite-2.0 。那个问题已经解决了。

Windows 需要添加__declspec(dllexport)到以前版本中不存在的类。今天,每个类都以 开头,缺少的定义class FL_EXPORT Engine在哪里。FL_EXPORT

于 2013-03-27T11:25:22.713 回答