XOP in Windows7 32bit on a 64 bit machine

Hi,
I wrote code for an XOP, to be compiled using Visual C 12. The XOP works great in a 64x machine with Windows7 64 bits, in both the 32bit and 64bit versions of IGOR (I compiled the XOP in both 32 and 64 bit versions).
I took the xop to another computer with Windows7 32bit, although the machine is 64 bit. IGOR loads the xop without any sign of issues, but crashes when trying to use the function in the XOP.

I also tried installing Visual C in the machine and compiling the xop again, but the problem remains. And I also tried telling the linker that the machine is 64x, but the rest of the compiling options set for 32 bit operation, but the compiler complains ("fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'").

Do I have to use any setting for this case?.

Thank you.

Kind regards,
-Ivan

Quote:
I took the xop to another computer with Windows7 32bit, although the machine is 64 bit. IGOR loads the xop without any sign of issues, but crashes when trying to use the function in the XOP.


The crash is most-likely due to a bug in the XOP that is asymptomatic on the other machine. An example would be an uninitialized variable bug which can cause a crash on some systems but not others. So you are on the right track to debug it on the machine on which it is crashing.

Quote:
And I also tried telling the linker that the machine is 64x, but the rest of the compiling options set for 32 bit operation

I don't understand this. You are compiling either the 32-bit version of the XOP or the 64-bit version of the XOP. There is no problem running a 32-bit XOP with the 32-bit version of Igor on a 64-bit system. You don't need to tell the linker anything about the machine. It just needs to know if you are compiling a 32-bit program or a 64-bit program.

Quote:
but the compiler complains ("fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'"


It sounds like you set the machine type to 64 bits when compiling the 32-bit version of the XOP. The term "machine type" is misleading. When you are running a 32-bit executable on a 64-bit machine, you are running in a virtual 32-bit machine and that is what the compiler and linker need to know about.

In VC, in Project Properties->Linker->Advanced, make sure that Target Machine is set to MACHINE:X86 if you are compiling the 32-bit XOP or to MACHINE:X64 if you are compiling the 64-bit XOP.

In VC, check Project Properties->Configuration Properties->Linker->Command line. Remove anything in the "Additional Options" section.

Now recompile.
Has one machine Visual Studio installed and the other not? Maybe the XOP is linked dynamically against the MSVC runtime and you are missing the vcredist package.
Quote:
Has one machine Visual Studio installed and the other not? Maybe the XOP is linked dynamically against the MSVC runtime and you are missing the vcredist package.


If that were the case, the XOP would fail to dynamically link and would not run.