Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking problem Visual Studio C++ #2

Closed
paikonom opened this issue Aug 21, 2020 · 1 comment
Closed

Linking problem Visual Studio C++ #2

paikonom opened this issue Aug 21, 2020 · 1 comment

Comments

@paikonom
Copy link

Dear Juan ,
first of all congratulations for your amazing work!
I am trying to use fuzzylite in Visual Studio using C++. The problem is that I am getting an "unsolved external symbol" error. I would like to mention that I am not an expert regarding linking, compiling and so on...

I am working on a project about list scheduling. My C++ files are located in the following directory: C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling
Let me explain what have i done so far:

  1. Download fuzzylite files, unzip and copy the contents of fuzzylite-6.0-Win64\fuzzylite-6.0\fuzzylite into the C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling folder.
  2. Open Project properties->Configuration Properties-> VC++ Directories->Include Directories -> add C:\Users\panawths\Documents\Visual Studio2015\Projects\ListScheduling\ListScheduling\fl
  3. Open Project properties->Configuration Properties-> VC++ Directories->Library Directories -> add C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling\release\bin
  4. Open Project properties->Linker->Input->Addition Dependencies->add "C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling\release\bin\fuzzylite.lib"
  5. Open Project properties->Linker->General->Addition Library Directories->add C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling\Debug\bin, C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling\release\bin
  6. Open Project properties->Configuration Properties-> Debugging->Command Arguments -> add C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling\release\bin\fuzzylite-static C:\Users\panawths\Documents\Visual Studio 2015\Projects\ListScheduling\ListScheduling /DFL_CPP98=ON /EHsc /MD
  7. Add #include "fl/Headers.h" in the ListScheduling.cpp file (this file includes the main and the fuzzylite code). No compile error so far
    But, when I run my project I get the errors like:

Error LNK2019 unresolved external symbol "public: __thiscall fl::Engine::Engine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Engine@fl@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main

Error LNK2019 unresolved external symbol "public: __thiscall fl::General::General(void)" (??0General@fl@@QAE@XZ) referenced in function _main

Error LNK2001 unresolved external symbol "public: virtual class fl::AlgebraicSum * __thiscall fl::AlgebraicSum::clone(void)const " (?clone@AlgebraicSum@fl@@UBEPAV12@XZ)

Warning LNK4272 library machine type 'x64' conflicts with target machine type 'X86'

Thank you

`

@jcrada
Copy link
Member

jcrada commented Aug 26, 2020

Thanks for your question.

Please take a look at how I managed to do this here:
https://github.com/fuzzylite/fuzzylite/tree/release/examples/application

Cheers.

@jcrada jcrada closed this as completed Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants