FBComplex - complex number library - 64bit?

General FreeBASIC programming questions.
cbruce
Posts: 136
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

FBComplex - complex number library - 64bit?

Postby cbruce » May 17, 2019 2:49

.
Has anyone used jdebord's "FBComplex: complex number library" with FB 64bit?
viewtopic.php?f=8&t=19115

http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbcomplex.zip

I'm attempting to run his "mandel.bas" demo program as 64bit.

I'm able to compile and static link the fbcomplex library with FB 32bit ... and there are no problems compiling and running mandel.bas as 32bit.

And I can compile and link the fbcomplex lib with no errors with FB 64bit ... but when I try to compile mandel.bas as 64bit I get:

Code: Select all

...
D:\FB_WinFBE\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\ld.exe: skipping incompatible ./libfbcomplex.a when searching for -lfbcomplex
D:\FB_WinFBE\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\ld.exe: skipping incompatible .\libfbcomplex.a when searching for -lfbcomplex
D:\FB_WinFBE\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\ld.exe: skipping incompatible ./libfbcomplex.a when searching for -lfbcomplex
D:\FB_WinFBE\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\ld.exe: cannot find -lfbcomplex
linking failed: 'D:\FB_WinFBE\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\ld.exe' terminated with exit code 1

Note: When I unzipped the folder, I copied "mandel.bas" out of "\demo" up to the same directory as the lib files - just so they were all together and easy to work with.
Tourist Trap
Posts: 2768
Joined: Jun 02, 2015 16:24

Re: FBComplex - complex number library - 64bit?

Postby Tourist Trap » May 17, 2019 11:16

cbruce wrote:.
Has anyone used jdebord's "FBComplex: complex number library" with FB 64bit?
viewtopic.php?f=8&t=19115

I didn't try this for the moment. But just in case, there is this there that does also complex numbers computations:
viewtopic.php?f=8&t=27024&p=252296&hilit=complex%2A#p252296
srvaldez
Posts: 2134
Joined: Sep 25, 2005 21:54

Re: FBComplex - complex number library - 64bit?

Postby srvaldez » May 17, 2019 11:27

looks to me that you are attempting to use a 32-bit lib with a 64-bit program, that won't work, you need to build a 64-bit lib.
cbruce
Posts: 136
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: FBComplex - complex number library - 64bit?

Postby cbruce » May 17, 2019 15:20

.
@srvaldez ... the lib source code is included and I built it for 32bit and tested ok ... and then I rebuilt it for 64bit, which the mandel program finds incompatible when I try to compile it for 64bit.

@TouristTrap ... Thanks! but the console program I'm writing will need to run on Linux as well. I am looking for 100% FreeBASIC code if possible.
srvaldez
Posts: 2134
Joined: Sep 25, 2005 21:54

Re: FBComplex - complex number library - 64bit?

Postby srvaldez » May 17, 2019 15:35

hello cbruce
I just compiled the lib to 64-bit and the mandel program compiles and runs ok, may I suggest that you place the lib in the proper lib folder in the FB installation.
or you could just include the fbcomplex source in mandel.bas
cbruce
Posts: 136
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: FBComplex - complex number library - 64bit?

Postby cbruce » May 17, 2019 16:06

Thanks srvaldez! I must have been copying the 32bit version to the 64bit lib directory. I deleted everything and started over and it works good now.

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests