简体   繁体   中英

gmp.h /mpir.h linker in visual studio 2012 professional

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM