Author Topic: ScriptBasic Windows 64 Bit  (Read 1029 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #30 on: August 27, 2021, 06:00:22 pm »
Hi AIR,

I hope you are still interested in seeing a 64 bit build of SB.

I have tried just about everything I could think of to get the pui.dll (IUP extension module) to load. If you have a spare moment can you try it on your end? At least we know IUP 64 bit libraries work with TDM-GCC-64. All my Makefile seem to compile without error. Getting the module to load in SB is the problem.

I have attached my iup64 directory which may save you some time from downloading IUP.

 
« Last Edit: August 27, 2021, 06:09:48 pm by John »

Offline AIR

  • BASIC Developer
  • Posts: 817
Re: ScriptBasic Windows 64 Bit
« Reply #31 on: August 27, 2021, 06:43:51 pm »
Your problem is with sbc/sbw.

The 64bit scriba I built previously works with the statically built pui.dll I created (no need for all the silly IUP dll's, another reason why I don't use it).

You're going to have to figure out what you changed that is causing the issue.

Attached is the 64bit scriba I built and tested with, and the pui.dll I built.



Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #32 on: August 27, 2021, 06:51:36 pm »
We are thinking alike. Before reading your post I tried a really old SB Windows 64 build and the PUI extension module worked.

I'll give your build a try.


Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #33 on: August 27, 2021, 06:58:59 pm »
Your scriba.exe and pui.dll worked. Only problem is there is no Windows style / theme support like sbc.exe and sbw.exe provided.

Is it possible your sb64gui.o was causing the issue not loading? I believe I used the IUP resource for the 32 bit sbgui.o.

Can you post your pui Makefile so I can generate a static linked IUP and not have to include IUP DLLs with the distribution?

« Last Edit: August 27, 2021, 07:47:09 pm by John »

Offline AIR

  • BASIC Developer
  • Posts: 817
Re: ScriptBasic Windows 64 Bit
« Reply #34 on: August 27, 2021, 07:55:05 pm »
Attached.

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #35 on: August 27, 2021, 07:57:56 pm »
THANK YOU!

We now have what I call a core distribution of SB Windows 64. I don't see a need for MySQL as that is mostly used on Linux. The cURL, ODBC and IUP modules were key to getting people to try / use the BASIC. My next task is to get true callbacks working with IUP. My attempt at callbacks works but very limited and slow.

« Last Edit: August 27, 2021, 08:00:19 pm by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #36 on: August 27, 2021, 08:10:29 pm »
That was it. I recompiled my sbc.exe and sbw.exe with your new sb64gui.o.

I'm assuming you sent in your PUI.zip everything that is needed to static link IUP? I don't need to download the static library from SourceForge?

Offline AIR

  • BASIC Developer
  • Posts: 817
Re: ScriptBasic Windows 64 Bit
« Reply #37 on: August 27, 2021, 08:48:41 pm »
The static libs you get from sourceforge do NOT allow you to build a dll of any kind.  They are for static linking when creating EXE files.



Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #38 on: August 27, 2021, 09:01:09 pm »
I just replaced my PUI extension module folder with yours. I recompiled the module and it works.

Quote from: AIR
The static libs you get from sourceforge do NOT allow you to build a dll of any kind.  They are for static linking when creating EXE files.

Good to know. Thanks for clarifying that for me.

Code: Bash
  1. C:\sbgcc\sbw64_src\extensions\pui>mingw32-make -B -f Makefile
  2. gcc -w -D_WIN32 -m64 -c -I.\IUP-330\include -o ..\..\bin\mod\obj\pui\s_interface.o interface.c
  3. ar -r ..\..\bin\mod\lib\pui.a ..\..\bin\mod\obj\pui\s_interface.o
  4. gcc -w -D_WIN32 -m64 -c -I.\IUP-330\include -o ..\..\bin\mod\obj\pui\interface.o interface.c
  5. gcc  -shared  -s -O2 -Wl,--output-def,"..\..\bin\mod\dll\pui_imp.def",--out-implib,"..\..\bin\mod\dll\pui_imp.a",--export-all-symbols,--enable-auto-image-base  -o ..\..\bin\mod\dll\pui.dll ..\..\bin\mod\obj\pui\interface.o -L.\IUP-330 -I.\IUP-330\include     -liup -liupcontrols -liupimglib   -liupcd -lcd -lfreetype6 -lz    -lmingw32 -lws2_32 -ladvapi32 -lgdi32 -lcomctl32 -lcomdlg32 -luuid -lole32
  6.  
  7. C:\sbgcc\sbw64_src\extensions\pui>
  8.  

Dave Zimmer with his COM extension had callbacks working from his DLL so I know it can be done and I have an example to work from.

I noticed the -lole32 reference in the Makefile. I thought COM/OLE is only supported under 32 bit.
« Last Edit: August 27, 2021, 09:08:29 pm by John »

Offline AIR

  • BASIC Developer
  • Posts: 817
Re: ScriptBasic Windows 64 Bit
« Reply #39 on: August 27, 2021, 09:20:12 pm »
I noticed the -lole32 reference in the Makefile. I thought COM/OLE is only supported under 32 bit.

It depends on the COM interface you're interacting with.  If a system has both 64 and 32 bit COM interfaces for a given task, 64bit Windows will try using the 64bit interface by default.  If all you have is 32 bit, it will try to use that.

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #40 on: August 27, 2021, 09:29:18 pm »
Made my day. I thought COM was lost going to 64 bit. .NET is your new friend

32 and 64 bit COM Servers
« Last Edit: August 27, 2021, 11:00:16 pm by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #41 on: August 28, 2021, 05:29:50 pm »
I just tried the dyc extension module and SB said the module can't be loaded. If I remember correctly DYC uses ASM. Is this a Windows 32 bit only extension?

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #42 on: August 31, 2021, 12:13:28 am »
AIR,

I can't seem to get the 64 bit version SBHTTPD to connect. It seems to load fine but when I try run a script it says the server can't be found. The 32 bit version works fine.

Offline John

  • Forum Support / SB Dev
  • Posts: 3115
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 64 Bit
« Reply #43 on: October 23, 2021, 02:03:26 am »
The 64 bit version of SBHTTPD for Linux runs find. It looks like this is a 64 bit Windows issue.