0

im having some trouble getting GMP, mpfr to work in Visual studio 2015, i did not recompile gmp, i downloaded the precompiled versions and im trying to use Release x64. however when i compile my test program im getting the error:

"LNK2001 unresolved external symbol __gmpf_init2"

my code is a very simple test program just to check if gmp is working or not, however i cannot get past this point:

#include <stdio.h>
#include <conio.h>
#include <math.h>

#include <gmp.h>
#include <mpfr.h>


#define PREC 2048


int main()
{

printf("Program start:\n");

mpf_t rop9;

mpf_init2(rop9, PREC);   

getchar();
return 0;

}

i have added the directory for the gmp in Project>Properties>C/C++> All Options but i fear i have not added something?

C:\Program Files %28x86%29\Microsoft Visual Studio 14.0\VC\GMP\mpfr_mpir_x86_x64_msvc2010\mpfr\dll\x64\Release

C:\Program Files %28x86%29\Microsoft Visual Studio 14.0\VC\GMP\mpfr_mpir_x86_x64_msvc2010\mpfr

any help would be much appreciated! (P.S. sorry i am unable to upload images as my reputation is <10)

  • Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix), and no images are necessary unless there is absolutely no other way to demonstrate the problem. – Ken White Jul 08 '16 at 02:46
  • Im sorry, i still cannot figure this out?? – Why_Is_This_Hard Jul 08 '16 at 03:33

0 Answers0