2
Good afternoon, I am setting up my fpc here for cross-Pilation and would like to make sure that it is working properly, I want to do a test program and compile on each platform, soon after checking that each executable has been compiled to the correct platform.
In C++ I used the result of sizeof(void*)
(as the comments of that question) as a basis, but I do not know if there is a precise equivalent in Pascal.
So, what is the best way to programmatically detect under which type of CPU the executable is running (not what type of OS)?
In the compilation process, the word size is already set. There is no way the program can adapt after it has been compiled.
– Jefferson Quesado
According to that reply from Soen, Pascal has no types dependent on machine architecture
– Jefferson Quesado
Well, the example above the sizeof I used as an example, it wouldn’t have to be that way. So there’s really no way to detect whether the program is 32 or 64 in the pascal?
– Vico
From what I’m interpreting, no. It’s your concern to ensure that you built the x86 in the right place, as well as the x86_64. Maybe even your Pascal build runs on a VM... but I’m working on it even better
– Jefferson Quesado
Okay then, thank you
– Vico
SizeOf(pointer)
? https://stackoverflow.com/q/18771293/4438007– Jefferson Quesado