It seems the problem is solved by changing include directories. Because amp.h includes gmp.h like #include <>.
But project doesn't work.
I try to compile following code
Code:
#include "amp.h"
int i=3;
amp::ampf<128> a(i);
void main () {
}
As a result of this:
Quote:
1.obj : error LNK2019: unresolved external symbol _mpfr_set_si referenced in function "private: void __thiscall amp::ampf<128>::InitializeAsSLong(long)" (?InitializeAsSLong@?$ampf@$0IA@@amp@@AAEXJ@Z)
1.obj : error LNK2019: unresolved external symbol _mpfr_set4 referenced in function "public: struct __mpfr_struct * __thiscall amp::ampf<128>::getWritePtr(void)" (?getWritePtr@?$ampf@$0IA@@amp@@QAEPAU__mpfr_struct@@XZ)
amp.obj : error LNK2001: unresolved external symbol "_mpfr_set4"
amp.obj : error LNK2019: unresolved external symbol _mpfr_init2 referenced in function "public: static struct amp::mpfr_record * __cdecl amp::mpfr_storage::newMpfr(unsigned int)" (?newMpfr@mpfr_storage@amp@@SAPAUmpfr_record@2@I@Z)
amp.obj : error LNK2019: unresolved external symbol ___gmp_randseed_ui referenced in function"public: static struct __gmp_randstate_struct (* __cdecl amp::mpfr_storage::getRandState(void))[1]" (?getRandState@mpfr_storage@amp@@SAPAY00U__gmp_randstate_struct@@XZ)
amp.obj : error LNK2019: unresolved external symbol ___gmp_randinit_default referenced in function "public: static struct __gmp_randstate_struct (* __cdecl amp::mpfr_storage::getRandState(void))[1]" (?getRandState@mpfr_storage@amp@@SAPAY00U__gmp_randstate_struct@@XZ)
I think it means I make something wrong.
P.S. AlgLib version 3 is more simple to use, but I need the amp.
In the third version of AlgLib LNK2019 problem is solved by including all .cpp files. But in this version there are just ap.cpp and amp.cpp.
Also I didn't use build.bat and I don't know how to use it.
Attempt of including static libraries results in error LNK2005.