Is 64bit
Posted: Tue Dec 02, 2014 5:05 pm
I'm creating a cross platform application and thus compiling on Windows, Mac, Linux 32bit and Linux 64bit. The windows and mac version is compiled as 32bit... and the only reason to have a linux 64bit is so i don't have to force my users to install 32bit libraries on their linux 64bit machines. Now onto my question...
In order to differentiate between my apps when i call for the version, i'm using compiler flags:
The problem is if i run my 32bit linux version on a system with a 64bit processor, it identifies as a 64bit... Is there a different flag or way to tell if my app is compiled as 32bit or 64bit at runtime?
In order to differentiate between my apps when i call for the version, i'm using compiler flags:
Code: Select all
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
vName = vName + "for Windows"
CompilerElseIf #PB_Compiler_OS = #PB_OS_Linux
CompilerIf #PB_Processor_x64
vName = vName + "for Linux 64bit"
CompilerElse
vName = vName + "for Linux 32bit"
CompilerEndIf
CompilerElseIf #PB_Compiler_OS = #PB_OS_MacOS
vName = vName + "for Mac"
CompilerEndIf