On 19 February 2018 at 21:58, <tamwen...@gmail.com> wrote: > Mr. Hart, > > May I ask a follow-up question then? I did the same things on my Mac OS > desktop as on my Ubuntu laptop, same g++ command (for compiling the same > cpp file), same configure command (for installing mpir). Well, I didn't > have to manually install m4 on my Mac OS while I had to do it on my Ubuntu > as you advised earlier. So I suppose m4 was pre-installed on Mac OS. Yet > I encountered no compiling issues on the Mac OS like the ones on the > Ubuntu. Any insight on this? >
No idea. > > With regard to your latest reply, I didn't pass --enable-gmpcompat to > configure. Must I do this? > If you want a gmp.h and libgmp, you need to pass this to configure. > I just sort of thought since I didn't do it on my Mac OS and it worked, I > probably could repeat it on my Ubuntu. I need some more detailed > instructions on how to accomplish what you mentioned in your reply. Sorry > I'm a newbie on this. After mpir installation on my Ubuntu computer, the > relevant header files are in the default /usr/local/include/ and the > libraries are in the default /usr/local/lib/. Based on your reply, I'm > guessing here's what I need to do. FIrst, configure and install mpir again > with > > ./configure --with-yasm=/usr/local/bin/yasm --enable-cxx > -enable-gmpcompat > > Then in my source code, instead of #include <mpir.h> directive, I should > put > > #include "/usr/local/include/mpir.h" > #include "/usr/local/include/gmp.h" > You put just the second line, not the mpir.h line. > > And I'm lost on the proper g++ command. > > Please enlighten me. Thank you so much for your time. > > On Monday, February 19, 2018 at 12:38:23 PM UTC-8, Bill Hart wrote: >> >> You need to give the location of the .h files (mpir.h or gmp.h if you >> pass --enable-gmpcompat to configure). For this you must use the -I >> directive to gcc. You also need to tell it where to find the library, with >> the -L directive. These are always required when linking against libraries. >> > It's -I/path1 -L/path2 where path1 is the directory where the mpir.h/gmp.h file is installed and path2 is the directory where the library (libgmp.so) is installed. You also need -lgmp (assuming you passed --enable-gmpcompat). But I think you had that. -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.