Error LNK2019 with Alglib library with VS2019 and c++

24 Views Asked by At

I have downloaded the Alglib library and I have created a Console Application with VS2019, then under Project->proprieties->C/C++->General->Additional include directories I added the path to the src directory of Alglib containing the .h and .cpp files.

My main is as simple as this:

#include <iostream>
#include "interpolation.h"
int main()
{
   alglib::real_1d_array x;
   std::cout << "Hello World!\n";
}

But when I compile, I get this errors:

1>ConsoleApplication2.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall alglib::real_1d_array::real_1d_array(void)" (??0real_1d_array@alglib@@QAE@XZ) non risolto nella funzione _main

1>ConsoleApplication2.obj : error LNK2019: riferimento al simbolo esterno "public: virtual __thiscall alglib::real_1d_array::~real_1d_array(void)" (??1real_1d_array@alglib@@UAE@XZ) non risolto nella funzione _main

1>C:\Users\matti\source\repos\ConsoleApplication2\Debug\ConsoleApplication2.exe : fatal error LNK1120: 2 esterni non risolti

1>Compilazione progetto "ConsoleApplication2.vcxproj" NON COMPLETATA.

What am I doing wrong?

0

There are 0 best solutions below