Author Topic: ScriptBasic Windows 64  (Read 3519 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 3558
    • ScriptBasic Open Source Project
ScriptBasic Windows 64
« on: June 06, 2020, 03:47:42 PM »
I'm looking for someone to test ScriptBasic Windows 64 bit before I create an official release. Extension modules will depend on library resouces for 64 bit Windows.

Please reply if you're interested.

Prior use of SciptBasic required for this task.

Here is a quick test of MIN/MAX INT.

Code: ScriptBasic
  1. PRINT "Min Int: ", MININT(),"\n"
  2. PRINT "Max Int: ", MAXINT(),"\n"
  3.  
  4. PRINT FORMAT("%0.f",MAXINT() + 2100000000),"\n"
  5.  


C:\ScriptBASIC\examples>sbc t_int.sb
Min Int: -2147483648
Max Int: 2147483647
4247483647

C:\ScriptBASIC\examples>


If you need unlimited math range, GMP fills the gap.

Code: ScriptBasic
  1. DECLARE SUB GMP_MUL ALIAS "mul" LIB "gmp10"
  2.  
  3. PRINT "MAXINT: ", MAXINT(), "\n"
  4. PRINT GMP_MUL(MAXINT(), MAXINT()), "\n"
  5.  


C:\ScriptBASIC\examples>sbc t_gmp.sb
MAXINT: 2147483647
4611686014132420609

C:\ScriptBASIC\examples>

« Last Edit: June 07, 2020, 04:25:48 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3558
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64
« Reply #1 on: June 09, 2020, 10:38:12 AM »
I have been struggling trying to get a ScriptBasic 64bit IUP extension module to load. Compiles fine but nm and dumpbin shows no exported functions. I'm using TDM-GCC-64 9.20 and IUP's mingw 64 build.

I was able to build an IUP .exe using TDM-GCC-64 without issue.

Has anyone else seen this problem? The makefile works fine with TDM-GCC-32.

FWIW: None of the extension modules I've built and tested show exported functions. IUP is the first not to load when calling IupOpen.

Actually this is a good example why wading in Windows 64 pool can drown you.
« Last Edit: June 09, 2020, 06:10:25 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3558
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64
« Reply #2 on: June 11, 2020, 12:35:45 PM »
Antonio sent me a link to a nice tool to verify exports and platform base.

https://github.com/lucasg/Dependencies

I reduced the ScriptBasic IUP 64bit ext. module to two calls. IupOpen and IupClose. It still fails to load yet complies without issue.

I've tried every idea I could come up with but no luck.

Not sure where to go next.