Page 1 of 1

Make 64-bit compiler executable 32-bit?

Posted: Fri Feb 03, 2017 1:11 am
by Lunasole
Hi, recently I've encountered with problem -- sitting on 32-bit system was unable to compile 64-bit executables. Without access to 64 bit PC I had to quickly search someone who will compile it remotely ^^

After that thinked it would be nice to keep compiler exe always 32-bit for compatibility.
I don't know is it possible with PB and how much efforts might take, but it looks like a good idea. VC for example compiles both 64 and 32 bit files using 32-bit compiler, and that matters if having to build something on older or just 32-bit OS.

Maybe it would be even simpler to develop only 32-bit compiler? Also, as for me 64-bit is generally useless, as it only takes more RAM, without noticeable performance bonus on any modern CPU (2012+) and it doesn't seems that PB compiler [which is nicely coded and relatively simple/single-pass] can ever require more than 2GB of RAM granted for 32-bit process

Re: Make 64-bit compiler executable 32-bit?

Posted: Fri Feb 03, 2017 1:45 am
by skywalk
Actually, I struggle to find x86 pc's today. They are heading to the 16-bit pc closet.

Re: Make 64-bit compiler executable 32-bit?

Posted: Fri Feb 03, 2017 5:25 pm
by Lunasole
skywalk wrote:Actually, I struggle to find x86 pc's today. They are heading to the 16-bit pc closet.
I still have one old machine in addition to main, and many ppl I know having notebooks with Windows XP 32-bit, etc [because those notebooks getting slow and shitty if you put Vista or Seven on them]. At least for few years more systems with 32-bit only will remain, as for me. Also, on virtual machines typically 32-bit OS are used and that's prevents from compiling 64-bit on them with PB.

But well in USA it should be really rare case, unlike China and others.

Re: Make 64-bit compiler executable 32-bit?

Posted: Fri Feb 03, 2017 5:48 pm
by ar-s
I think you can't... A 64bits app can't be execute in a 32 bits machine so i don't see how the x64 compiler could be used with an x86..
the best way is to install PB x64 and x86 on your 64bits machine then make 2 versions of your codes
You will be able to compil for both systems with the same IDE.

Re: Make 64-bit compiler executable 32-bit?

Posted: Fri Feb 03, 2017 8:08 pm
by infratec
Under special circumstances VirtualBox can run a 64bit OS on a 32bit host.
You can try this.

Look also here:
http://askubuntu.com/questions/180761/c ... 2-bit-host

Then you can use PB x64 inside for compilation.

Bernd

Re: Make 64-bit compiler executable 32-bit?

Posted: Fri Feb 03, 2017 8:16 pm
by Lunasole
ar-s wrote:I think you can't... A 64bits app can't be execute in a 32 bits machine so i don't see how the x64 compiler could be used with an x86..
It can't be executed/debugged, but can be compiled (if 64-bit compiler executable will be 32-bit).

infratec wrote:Under special circumstances VirtualBox can run a 64bit OS on a 32bit host.
You can try this.

Look also here:
http://askubuntu.com/questions/180761/c ... 2-bit-host

Then you can use PB x64 inside for compilation.

Bernd
Interesting, I didn't seen such abitility earlier. However it's not a solutionl because you simple can't run Virtual box on 32-bit PC (which HW is often too weak to emulate something without stuff like AMD-V implemented in CPU)