Author Topic: How to modify the common.h file for Pi and ARM cpu?  (Read 3337 times)

0 Members and 1 Guest are viewing this topic.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
How to modify the common.h file for Pi and ARM cpu?
« on: May 13, 2021, 07:45:00 pm »
Hello the QB64 Team,

I'm trying to help doppler to install QB64 smoothly on his Pi using my multi lingual installation script.

His main problem is the use of the floating point that does'nt work (fails on the compil of libqb).

As of July 31, 2019 Jack posted: https://www.qb64.org/forum/index.php?topic=1550.msg107663#msg107663

Quote
Did you edit the file common.h and add #define QB64_NOT_X86

Since I'm not a C++ developper, can someone please help me and tell where exactly to add this "#define QB64_NOT_X86" declaration in the common.h file (at the top, at the end, somewhere else)?

Then, I'll be able to modify my multi lingual installation script to make it run on a Pi by checking the machine and the OS used then providing a modified common.h (e.g. common.raspbian) file just for this specific purpose.

Now, a better solution would be later to modify the common.h file with a define block keyed on for exemple "QB64_RASPBIAN" so that the statement "#define QB64_NOT_X86" would only get included as required.

But for now, my proposed work arround (two use a specific common.h file) would be enough to make tests. 

TIA.

Kind regards.
Fifi
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: How to modify the common.h file for Pi and ARM cpu?
« Reply #1 on: May 14, 2021, 09:23:47 am »
So it’s easier to #DEFINE QB64_RASPBIAN than it is to #DEFINE QB64_NOT_X86?  Am I missing something here?
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: How to modify the common.h file for Pi and ARM cpu?
« Reply #2 on: May 14, 2021, 03:17:52 pm »
Fifi, I would put the define at the top
I like the idea of a QB64_RASPBIAN block

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: How to modify the common.h file for Pi and ARM cpu?
« Reply #3 on: May 14, 2021, 06:52:46 pm »
More like changing the install script for all versions of Linux (ready) not just Raspian version.  FIFI is moving in the right direction.  With correcting the install script to handle Raspberry pi stuff.  Any future questions will be stopped.  And the script could be merged as an official supported script used in QB64 make process.

I have the script change done by hand on my end.  And made a Qb64 V1.4 that works for raspberry pi.  It's the new people who want to try too.  That would need the changes to the script.

Fifi, I would put the define at the top
I like the idea of a QB64_RASPBIAN block

Me too. (block)
« Last Edit: May 14, 2021, 06:55:08 pm by doppler »

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Re: How to modify the common.h file for Pi and ARM cpu?
« Reply #4 on: May 15, 2021, 04:54:08 am »
Hi doppler,

I have the script change done by hand on my end.  And made a Qb64 V1.4 that works for raspberry pi.
Me too. (block)

Please send me (at pckb @ wanadoo.fr without spaces) your hand made script and I'll include right away your modifications with a conditional test in my script.

Looking forward.

Cheers.
Fifi

It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Re: How to modify the common.h file for Pi and ARM cpu?
« Reply #5 on: May 16, 2021, 04:24:25 pm »
Hi,

For doppler; I just made some modifications in my multi lingual script needed for QB64 to be used on a Pi Raspberry with the Raspbian OS.

BTW, I don't have a Pi (nor plan to get one) to make tests.

So, here is my question : since on a Pi with Raspbian the issue of the floating point during the compilation of qblib.ccp is solved when adding "#DEFINE QB64_NOT_X86" at the top of "/qb64/internal/c/common.h", is this the best place or would it be sufficient to add it only in "/qb64/internal/c/libqb.h"?

TIA for your response.

Looking forward.

Cheers.
Fifi
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.