gmp 6.2.1 and mpfr 4.1.0

General FreeBASIC programming questions.
dodicat
Posts: 6790
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: gmp 6.1.2 and mpfr 3.1.5

Postby dodicat » Mar 20, 2017 23:01

Thanks srvaldez.
Makoto WATANABE
Posts: 196
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: gmp 6.1.2 and mpfr 3.1.5

Postby Makoto WATANABE » May 08, 2017 11:39

Dear srvaldez

Thank you for adding "gmpf-fb test.bas" to "gmp-6.1.2.zip" and adding "make-lanczos.bas" to "mpfr-3.1.5.zip".
I will translate your polite and complete comments in Japanese and introduce them to Japanese people.
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.1.2 and mpfr 3.1.5

Postby srvaldez » Feb 04, 2019 19:41

updated, first post
dodicat
Posts: 6790
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: gmp 6.1.2 and mpfr 4.0.2

Postby dodicat » Feb 06, 2019 21:24

Thanks srvaldez.
Downloaded, I'll give it a run later.
integer
Posts: 393
Joined: Feb 01, 2007 16:54
Location: usa

Re: gmp 6.1.2 and mpfr 4.0.2

Postby integer » Feb 06, 2019 23:45

Very much appreciated.
Thanks srvaldez.
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.1.2 and mpfr 4.0.2

Postby srvaldez » Jan 23, 2020 18:53

updated on first post
markwn
Posts: 2
Joined: Dec 23, 2019 21:48

Re: gmp 6.2.0 and mpfr 4.0.2

Postby markwn » Jan 28, 2020 19:00

thanks for the binaries, can i use them?
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.2.0 and mpfr 4.0.2

Postby srvaldez » Jan 28, 2020 19:55

of course, an example is included, though not exhaustive.
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.2.0 and mpfr 4.0.2

Postby srvaldez » Nov 30, 2020 22:02

updated to gmp-6.2.1 and mpfr-4.1.0, see first post
meucat
Posts: 12
Joined: Jan 20, 2014 1:53

Re: gmp 6.2.1 and mpfr 4.1.0

Postby meucat » Feb 23, 2021 7:02

Hello, I am trying install GMP lib on FreeBasic Windows 10

I uncompressed all files from gmp-6.2.1 under FreeBasic folder (it created a gmp-6.2.1 sub folder)

I verified gmp.bi is into freebasic "inc" folder

Then I compiled this comand

#Include once "gmp.bi"

and received error

ld.exe: cannot find -lgmp

I would appreciate some help to install GMP on freebasic
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.2.1 and mpfr 4.1.0

Postby srvaldez » Feb 23, 2021 11:31

hello meucat
the package is not friendly to people who are inexperienced in the order of the include files and library files, for now just copy or move all the bi files to the FB inc folder, there are 4 bi files.
then copy or move the library files to the appropriate lib folder
if your FB distribution is 32-bit then copy or move the 32-bit static lib files to your FB distribution lib/win32 folder
if your FB distribution is 64-bit then copy or move the 64-bit static lib files to your FB distribution lib/win64 folder
after that you should be able to use the libraries
meucat
Posts: 12
Joined: Jan 20, 2014 1:53

Re: gmp 6.2.1 and mpfr 4.1.0

Postby meucat » Feb 23, 2021 12:20

Hello srvaldez Thanks very much, let me try understand some things first.

Should I use the gmp-6.2.1 package to install it into FreeBasic? or else all the necessary files to run GMP are already in default FB installation for win64?

Actual content of GMP package I downloaded is this one. There is no "*.bi" nor else "lib*" or ".dll* files into folders.

c:\gmp-6.2.1

21/02/2021 19:17 <DIR> .
21/02/2021 19:17 <DIR> ..
21/02/2021 19:17 <DIR> cxx
21/02/2021 19:17 <DIR> demos
21/02/2021 19:17 <DIR> doc
21/02/2021 19:17 <DIR> mini-gmp
21/02/2021 19:17 <DIR> mpf
21/02/2021 19:17 <DIR> mpn
21/02/2021 19:17 <DIR> mpq
21/02/2021 19:17 <DIR> mpz
21/02/2021 19:17 <DIR> printf
21/02/2021 19:17 <DIR> rand
21/02/2021 19:17 <DIR> scanf
21/02/2021 19:17 <DIR> tests
21/02/2021 19:17 <DIR> tune

On the onther hand, there are already 72 "*.bi" files into FB INC folder (here first of them)

FreeBASIC-1.07.1-win64\inc

27/09/2019 06:54 169.058 allegro.bi
27/09/2019 06:54 21.937 aspell.bi
27/09/2019 06:54 33.503 bass.bi
27/09/2019 06:54 5.386 bassmod.bi
27/09/2019 06:54 202.117 bfd.bi
27/09/2019 06:54 6.283 bzlib.bi
27/09/2019 06:54 48.267 caca.bi
.....
27/09/2019 06:54 79.756 gmp.bi
....

There are also 74 "*.bi" files into FB INC/CRT folder (which also has 7 sub folders)

FreeBASIC-1.07.1-win64\inc\crt

27/09/2019 06:54 <DIR> .
27/09/2019 06:54 <DIR> ..
27/09/2019 06:54 <DIR> arpa
27/09/2019 06:54 <DIR> bits
27/09/2019 06:54 <DIR> dos
27/09/2019 06:54 <DIR> linux
27/09/2019 06:54 <DIR> netinet
27/09/2019 06:54 <DIR> sys
27/09/2019 06:54 <DIR> win32

Also there are already 1294 files into LIB\WIN64 folder (here first of them)

FreeBASIC-1.07.1-win64\lib\win64

27/09/2019 06:55 <DIR> .
27/09/2019 06:55 <DIR> ..
27/09/2019 06:55 10.943 crt2.o
27/09/2019 06:55 1.549 crtbegin.o
27/09/2019 06:55 1.226 crtend.o
27/09/2019 06:55 5.624 dllcrt2.o
27/09/2019 06:55 408 fbextra.x
27/09/2019 06:55 999 fbrt0.o
27/09/2019 06:55 1.834 gcrt2.o
27/09/2019 06:54 2.218 lib6to4svc.dll.a
27/09/2019 06:54 2.226 libaaaamon.dll.a
27/09/2019 06:54 7.448 libacledit.dll.a
...
...

So it appears to me all files are already located in right places even no taken any intervention from me on installed packages.

Thanks
dodicat
Posts: 6790
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: gmp 6.2.1 and mpfr 4.1.0

Postby dodicat » Feb 23, 2021 13:01

The easy way:
If you want to use a static lib, put libgmp.a into a working folder with your test code.
Then #include "gmp.bi" at the top of your test code.

If you use a dll then put the libgmp-10.dll into a working folder.
THEN
copy gmp.bi from your freebasic inc folder into your working folder and change

#inclib "gmp"
to
#inclib "gmp-10"

You can then perhaps rename gmp.bi to gmp10.bi (or something similar) and #include "gmp10.bi" in your testing code.
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.2.1 and mpfr 4.1.0

Postby srvaldez » Feb 23, 2021 13:30

@meucat
this thread is about pre-built gmp-6.2.1+mpfr-4.1.0 libraries + include files and basic examples
it looks to me that you downloaded the gmp source archive, it does not contain any binaries
Last edited by srvaldez on Feb 24, 2021 13:27, edited 2 times in total.
srvaldez
Posts: 2635
Joined: Sep 25, 2005 21:54

Re: gmp 6.2.1 and mpfr 4.1.0

Postby srvaldez » Feb 23, 2021 17:16

I added a batch file to copy/install the files to the respective FreeBASIC folders, just drag&drop the FreeBASIC folder onto drag&dropFBfolder.bat

Return to “General”

Who is online

Users browsing this forum: No registered users and 12 guests