Author Topic: How do you make the 64 bit Version of QB64?  (Read 6461 times)

0 Members and 1 Guest are viewing this topic.

Offline Calloway

  • Newbie
  • Posts: 18
  • I still have Laser Disc...
    • View Profile
    • Calloway Sutton
How do you make the 64 bit Version of QB64?
« on: July 15, 2017, 01:03:32 pm »
I was just wondering how to build the 64 bit version of qb64?
I have [banned user]s version but that doesn't really explain how to make it, it just gives you a download

FellippeHeitor

  • Guest
Re: How do you make the 64 bit Version of QB64?
« Reply #1 on: July 15, 2017, 10:59:57 pm »
Given the hacks involved to get the Windows version to use the known-to-be-buggy gcc 64bit compiler, that's not something I'd recommend personally anyway.

But that's not your question. There's a tutorial written by Steve buried somewhere in the forum archives; as soon as they're back up you may be able to read them.

Google showed this pdf coming from [banned user], but I can't attest its accuracy: http://www.thejoyfulprogrammer.com/qb64/forum/attachment.php?aid=513

Remember that in Linux QB64 natively produces 64bit binaries (for 64bit distros, of course) as well as under macOS, which is 64bit by default.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: How do you make the 64 bit Version of QB64?
« Reply #2 on: July 16, 2017, 06:35:44 am »
It's not too hard a process, but it does take some manual troubleshooting to get it to work -- and even then I don't guarantee that 100% of the commands will work exactly as they do in the 32-bit version.

1) First, download a fresh version of QB64.

2) Download a fresh version of mingw -- the 64-bit compiler which you want to use.  (Some of the older versions work perfectly well, but I don't know which one.  If you have time, patience, and bandwidth, you might download archived versions and find one that plugs in perfectly well and which won't need any modification.  I'd start by looking for a copy 2-3 years old, if I wanted to go that route.)

3) Go into your QB64 folder and remove the old version of the c-compiler.  Paste the new version in and extract it into that folder.  Look for the file called "INSTALL_MINGW_HERE.txt".  When you see it, you're in the proper folder.

Quote
Only Windows users need these files.

This is a copy of the "Mingw-w32 (i686) ToolChain" from "http://www.drangon.org/mingw/"

After extraction, the 7 (or so) folders should be manually placed directly into this folder named
"internal\c\c_compiler\"

If you don't have a folder called "internal\c\c_compiler\bin" after extraction you have
done something wrong. There should be about 6 other folders here too.

Due to the large size of the Windows C++ compiler it was not practical to distribute it uncompressed,
expecially under a source revision system.

4) Run the "setup_win.bat" in the main QB64 folder.  If all works well, CONGRATULATIONS!!  You now have a 64-bit version of QB64.  You downloaded an older version of mingw x64 which is error free and works as it should with QB64.  Sing a happy song, try everything out, and you shouldn't have any issues.

********************
********************

IF, however, the setup batch file fails to work properly, you'll have to look close at the error messages and go in and do some manual editing of a few lines inside the CPP files which mingw uses...

From what I remember, it's a simple patch, with only a few lines needing to be altered for variable declarations.  lotr and rotr are the two variables which aren't declared in scope, (if I remember correctly), and the setup script will point you towards the file which contains the error.   

All you need to do is go in, remark out a few lines. It has a few #ifdef blocks which sets different values for those commands, and whatever the heck they're doing, they're doing it wrong.  Inside the file, you should be able to see that alternative definition -- just remark those lines out or remove them and save that file.

Run setup.bat a second time and you should get a 64-bit version of QB64.exe this time around -- with one cavet:  I don't guarantee that every command will work as they should.  _MEM commands, in particular, seem completely screwy in the 64-bit version which needs modification...  So does a few more things, but I don't remember what they were.  99% of all commands work perfectly fine.  1% work, but work WRONG.  As long as you stay away from those particular commands (once you sort out what they are), you can write 64-bit programs in basic for windows.

********************
********************

Honestly, the BEST solution (since no one is supporting 64-bit windows versions), is to download an archived version of the x64 mingw compiler and use it.  Up until 2 or 3 years ago, all you had to do is plug it in, rebuild QB64, and things worked just fine.   Then mingw did several updates and it no longer worked as advertised for QB64...

The 32-bit compiler that comes packaged with QB64 is the same one that's been with it for years.  I don't even know if someone could just swap in the newest version of the 32-bit mingw and have it work, without needing to modify and tweak things first.  Who knows which commands were obsoleted, altered, removed, or replaced with newer functions??

Find the older version of the 64-bit compiler and you're golden.  Get a newer version and you'll have to manually troubleshoot things yourself to make certain they all work properly.

I'm sorry I don't remember what the last plug-in-and-go version was, which worked without needing any alterations.  If anyone takes time to test them out and finds out for us, let us know.  Maybe somebody here will host the proper version and then there'll never be any issues for anybody who wants a 64-bit version from now on.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Certina

  • Newbie
  • Posts: 2
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #3 on: July 16, 2017, 02:53:53 pm »
Hi Administrator and All of my first post on this Forum.
I recommend the 64-bit version. There is nothing to compare to the 32-bit version. In my case, the 32-bit version is useless. This does not mean that the 64-bit version is perfect and unrestricted. I need a lot of work to be able to compile my code (.bas) because it compiles to a certain limit. If you do not write great codes, then this version is enough. SMcNeill should have a 64-bit version or possibly put on Dropbox.
Regards -

Offline jcolivo

  • Newbie
  • Posts: 5
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #4 on: February 26, 2018, 11:54:54 am »
Hello,
I am having trouble compiling to the 64 bit version.
I followed the instructions provided in the QB64.org FAQ:
https://qb64.org/wiki/QB64_FAQ#Q:_How_do_I_upgrade_the_32_bit_Windows_version_of_QB64_to_64_bit_functionality.3F

However, I get this message in the Windows Command Prompt:
----------------------------------
QB64 Setup

Building library 'LibQB'
..\..\..\libqb.cpp: In function 'int func__handle()':
..\..\..\libqb.cpp:12570:27: error: cast from 'HWND {aka HWND__*}' to 'int' loses precision [-fpermissive]
             return (int32)window_handle;
                           ^~~~~~~~~~~~~
Building library 'FreeType'
Building library 'Core:FreeGLUT'
Building 'QB64'
g++: error: libqb\os\win\libqb_setup.o: No such file or directory

Launching 'QB64'
'qb64' is not recognized as an internal or external command,
operable program or batch file.

Press any key to continue . . .
-------------------------------------------------

What do I need to do to make it work?

Thank you!

FellippeHeitor

  • Guest
Re: How do you make the 64 bit Version of QB64?
« Reply #5 on: February 26, 2018, 12:01:23 pm »
Steve recently put together a version of QB64 with the 64bit compiler built-in for Windows, get it at http://qb64.freeforums.net/post/335/thread

Offline jcolivo

  • Newbie
  • Posts: 5
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #6 on: February 26, 2018, 12:13:59 pm »
Works beautifully! Thanks to you both!

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #7 on: February 28, 2018, 08:53:44 am »
Stick with the 32 bit version.  I played around with doing 64bit code.  And ran right into the differences between the two.  There are things that don't work, or don't work right.  If the old board was running, there are a couple of threads on the subject.

The coding speedup, was perceivable.  But the benefits did not match the weight of new problematic code.

Offline jcolivo

  • Newbie
  • Posts: 5
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #8 on: February 28, 2018, 09:19:48 am »
Thanks.
I remember reading about that somewhere. I'll keep both, and use one or the other depending on the program I'm developing.

Offline jcolivo

  • Newbie
  • Posts: 5
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #9 on: March 01, 2018, 11:35:52 am »
Since .net is still down, do you by any chance remember what the issues were?

Thanks!

Offline thedaemon

  • Newbie
  • Posts: 2
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #10 on: March 01, 2018, 05:36:34 pm »
Wait, I'm confused. QB64 is not 64bit?

edit: Sorry I read the thread. Windows is the one with issues.
« Last Edit: March 01, 2018, 05:50:20 pm by thedaemon »

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #11 on: March 01, 2018, 07:28:56 pm »
Wait, I'm confused. QB64 is not 64bit?

edit: Sorry I read the thread. Windows is the one with issues.
You have to appreciate the irony though. The project was called QB32 in the old days, but I guess the 64 sounded better (and hey, it's true for the Unix versions).

We'll probably get around to working out an official Windows 64-bit version some time, but as people have evidenced it sounds like there's going to be some issues to sort out.

Offline superloach

  • Newbie
  • Posts: 3
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #12 on: August 20, 2018, 09:18:40 pm »
Sorry for the slight necropost, but are you saying that Unix only supports 64-bit now? We're having issues running QB64 on Chrome OS i686 over at https://github.com/skycocker/chromebrew/issues/2569.

FellippeHeitor

  • Guest
Re: How do you make the 64 bit Version of QB64?
« Reply #13 on: August 20, 2018, 09:30:15 pm »
All of the above is Windows-specific. For macOS QB64 is 64bit natively; For Linux, it'll be 32bit or 64bit depending on the distro it's being compiled on.

Offline PMACKAY

  • Forum Regular
  • Posts: 188
  • LIFE is Temporary
    • View Profile
Re: How do you make the 64 bit Version of QB64?
« Reply #14 on: August 20, 2018, 10:50:14 pm »
qb64 on Mint 19 cinnamon installs and Runs Flawless... Thank you for the great Package Guys. Awesome work.
MackyWhite