티스토리 뷰

Mesh Processing

MPIR 라이브러리 빌드 및 사용

배고플땐스윙칩 2021. 2. 4. 01:46

가끔 MPIR 라이브러리가 필요할 때가 있습니다.  MPIR은 The Multiple Precision Integers and Rationals Library의 약자로 수치연산에 활용됩니다.

아래는 MPIR 라이브러리를 빌드하고 필요한 파일들을 얻는 방법입니다.

 

 

mpir.org/index.html#release

 

MPIR: Multiple Precision Integers and Rationals

Overview MPIR is a highly optimised library for bignum arithmetic forked from the GMP bignum library. It is written in assembly language and C. It is community maintained via the GitHub repositories of William Hart (Linux/OSX) and Brian Gladman (Windows).

mpir.org

이 곳에서 Downloads로 들어가면 21년 1월 12일 기준 MPIR 3.0.0이 최신 버전입니다. MPIR 3.0.0 soruce.zip을 다운 받아 압축을 풀어줍니다.

 

폴더에 들어가보면 아래 사진과 같이 build.vcXX로 폴더들이 있습니다. 본인이 사용하는 VisualStudio 버전에 맞게 들어가서 mpir.sln을 실행합니다.

솔루션을 실행하게 되면 솔루션 탐색기에 아래 그림과 같이 여러 버전이 있습니다.

각각의 프로젝트 중 아래 그림처럼 Document를 확인하시고 필요한 프로젝트를 Release/debug, x64/x86을 맞게 설정한 뒤 빌드하시면 됩니다. 저는 lib_mpir_cxx을 빌드하였습니다.

혹시 빌드가 되지 않고 error가 뜨시는 분들은 아래 블로그를 참고하여 YASM을 설치해 주시기 바랍니다.

lecnote.tistory.com/entry/VISUAL-STUDIO%EC%97%90-YASM-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0-Using-yasm-with-VISUAL-STUDIO

 

VISUAL STUDIO에 YASM 사용하기 (Using yasm with VISUAL STUDIO)

GET YASM HERE : http://yasm.tortall.net/Download.html The YASM version vsyasm.exe is designed specifically for use with Visual Studio 2010(or higher). To tell Visual Studio where to find vsyasm.ex..

lecnote.tistory.com

빌드가 성공하였다면 mpir-3.0.0 폴더에 dll이나 lib 폴더가 생성된 것을 확인할 수 있습니다. 그 안을 보시면 원하는 버전의 필요한 파일들이 있으니 필요에 맞게 사용하시면 됩니다.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함