I got the precompiled code to work correctly. The code was compiled on a 64bit system (Mac), but when it's loaded on a 32bit system (Win), it fails due to the size of SQInteger being different. Is there a "trick" or setting to remove this? Are there also going to be byte order issues? I'd like one version of the compiled scripts to work across all platforms.

Right now Squirrel's bytecode is architecture dependent. This means if you compile with a 64bits build you can only load the bytecode with a 64bit build and vice-versa. This is mostly because the 32bit builds cannot represent 64bit numbers(the same goes for 32bit float builds vs 64bit floats builds). If you have multi architecture requirements it would be trivial to customize the serialization function to make it work, however keep in mind that you'll not be able to correctly represent 64 bits numbers on a 32 bits build. Personally I recompile per platform if needed.

I have no need for 64bit numbers, so that is not an issue. I noticed you can just unset _SQ64 and it will use 32bit SQInteger. If I did this on the 64bit systems, would that fix the issue? Would there be a significant performance hit in doing that?

I need to have precompiled squirrel bytecode that run on both 32 and 64 bit computers. I was hoping that compiling squirrel using 32 bit ints would fix my issue. Is there a better way to do what I need (common pre-compiled scripts running on 32 and 64 bit machines)?

I have also noticed that pre-compiled squirrel bytecode is not byte-order safe, so that is a bridge I might need to cross down the road. Even if I was going to compile different code for different architecture, I'd need to do it some a single machine.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.