Link to home
Start Free TrialLog in
Avatar of formadmirer
formadmirerFlag for United States of America

asked on

VFP9 Error Compiled In a Different Version

Hello all. I have an exe that is generating the following error:
Object file ***.exe was compiled in a different version of FoxPro.

This error is only appearing when running the exe on Windows 8 64 bit. Not sure about Vista, as I don't have a PC available with Vista

It does not appear on W2K, XP or 7.

The project is several years old, with the oldest code originating from within VFP 6.
Most of that code has been replaced over the past several years with code generated inside VFP 9. The exe was compiled in VFP 9.

The exe is then Re-Foxed, so it's compiled again, and then Inno Setup is used, so it's compiled once more. Don't know if this would have anything to do with the error message generated or not, since the error seems to be indicating that it's the VFP compiler that's different.

Just looking for some help or suggestions to try.
SOLUTION
Avatar of Olaf Doschke
Olaf Doschke
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of formadmirer

ASKER

I recompile all everytime I build, just always have.

But based upon some tips I found elsewhere about this problem I've even tried Rebuild Project and Regenerate Component IDs. Neither of which did anything.

Another suggested rebuilding the fpw file, but I'm not using one.

As far as how I start the exe, I'm not sure what you mean (my ignorance is showing!). The prog gets installed, the desktop icon is clicked and it starts. The main.prg is really pretty minimal with little more than SET SCREEN OFF and SET RESOURCE OFF followed by calls to about four small prgs that setup the environment before the main form is called.

All of the PCs were VFP virgins, none had ever had FP code installed before.
And it's not clear from my post, but there are two different Win 7 machines, one 32 bit and one 64 bit, the error shows on neither.

It really puzzles me that on Win8 it initially shows the error and stops the exe, but when you restart the exe the second time the prog runs just fine.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I did quite a bit of research when I was building the installer, which is handled with Inno Setup, which I run in 32 bit install mode regardless of the OS/architecture.

I found two different Runtime Files installers, but opted instead to find out what files are needed and to place them where they need to be myself, while registering those that need to be registered.

I'm pretty sure the issue is somehow tied to the Win 8 64 bit architecture, although I'm not sure why I don't see the error on Win 7 64 bit.  I say this because I am still a little confused as to where to place various dlls in a 64 bit install.

Here's what I'm doing now:

Source: "C:\myapp\msvcr71.dll"; DestDir: "{sys}"
Source: "C:\myapp\msvcr71.dll"; DestDir: "{cf}\Microsoft Shared\VFP"
Source: "C:\myapp\gdiplus.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\myapp\gdiplus.dll"; DestDir: "{cf}\Microsoft Shared\VFP"
Source: "C:\myapp\vfp9r.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\myapp\vfp9r.dll"; DestDir: "{cf}\Microsoft Shared\VFP"; Flags: regserver 32bit
Source: "C:\myapp\vfp9t.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\myapp\vfp9t.dll"; DestDir: "{cf}\Microsoft Shared\VFP"; Flags: regserver 32bit
Source: "C:\myapp\vfp9renu.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\myapp\vfp9renu.dll"; DestDir: "{cf}\Microsoft Shared\VFP"
Source: "C:\myapp\msxml3.dll"; DestDir: "{sys}"; Flags: regserver 32bit
Source: "C:\myapp\msxml3r.dll"; DestDir: "{sys}"
Source: "C:\myapp\msxml4.dll"; DestDir: "{sys}"; Flags: regserver 32bit
Source: "C:\myapp\msxml4r.dll"; DestDir: "{sys}"

Open in new window


{sys} is system32. I believe that when a 64bit system is detected they are placed instead into syswow64
{cf} is common files
{app} is my app's directory
the regserver flag registers the dll, in this case as 32 bit

I am installing no other exe, only the exe for my app. I had read a forum post elsewhere about this problem being caused by re-foxing and including more than one exe. So that's not the cause.

It's still very puzzling, and it's difficult to tell people to just ignore the error message and restart the program a second time to get it running. Doesn't look all that good...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I wasn't able to resolve this and had to move on. At some point in time I'll have to revisit the issue, but for now I'm closing this. Thanks for the help.