1

I am trying to use gmp.h for C/C++. I am currently working on visual studio 2012 professional. I followed the instructions from the link. But still I got error messages...

1>------ Build started: Project: final, Configuration: Debug Win32 ------
1>  final.cpp
1>final.obj : error LNK2019: unresolved external symbol ___gmpz_init referenced in function _wmain
1>final.obj : error LNK2019: unresolved external symbol ___gmpz_init_set_ui referenced in function _wmain
1>final.obj : error LNK2019: unresolved external symbol ___gmpz_out_str referenced in function _wmain
1>D:\New folder\final\Debug\final.exe : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I tried all possible options but could not got the solution. Please help me out

Nadeem_MK
  • 7,533
  • 7
  • 50
  • 61

1 Answers1

0

I had the same problem and it was just that I wasn't linking the library. You need to include the library in the Visual Studio project.

How to add additional libraries to Visual Studio project?