Why does Visual FoxPro not compile a valid executable within Windows 10 64 bit? - visual-foxpro

I recently made the jump from Windows 7 to Windows 10, thankfully I retained my old Windows 7 PC.
I have a 12 year old legacy application that I wrote in Visual FoxPro 9.0 (sp2) that occasionally needs a tweak to keep the users happy.
The original executable had grown to around 23mb in size but in Windows 10 compiles to an executable of 51 bytes!
If I compile a VFP "app" the size remains the same, it is just the 32 bit executable that appears to be empty.
Running the 51 byte executable just produces a file open dialog requesting selection of an .fxp file to run.
Is there something I am missing in my setup perhaps that will allow me to compile once more?
Is this because I am operating a 64 bit OS now?
I can continue transferring code to my old PC and compiling there but I would love to keep good ole VFP running in the 21st century and beyond.

I'm using 64 bits Windows 10 and compiling without problems.
Some people report problems with Visual Foxpro 9, but I can't figure it out what could be the reason because I have near to 89 computers running VFP 9 .exe files without any failure.
Whatever your problem is, it has nothing to do with compatibility issues between VFP 9 and Windows 10. Others have complained that antivirus software have problems with VFP 9 exe files.
Just as a blind shot in the dar, try to disable your antivirus software before compiling and see what happens.

Related

Running 32 bits compiled Visual Foxpro App in Win 7 64 bit machine

Good afternoon I have a inherited (from programmer abroad) Visual FoxPro 32 bits app and I have to make it run in a Windows 7 64 bits PC, once I try to run it it displays a message that says ("The version of this program is different from the version of windows you have") . I googled and installed VisualFoxPro 9 from Microsoft page and SP 2 for Visual Fox Pro, but it seems that as longs as the App was compiled in a 32 bits platform it can not run in a 64 bits Machine, any suggestions on that problem would be very appreciated. thanks in advance.
Make sure you have the correct runtimes installed. Do you know which version of VFP it was compiled in?
VFP comes in the following versions, each with their own runtimes:
FPW 2.6a
VFP 3
VFP 5
VFP 6
VFP 7
VFP 8
VFP 9
VFP 9 SP2
If you are sure that you have the correct runtime installed, are you sure it was built in Visual FoxPro and not the older FoxPro 2.X? That would be 16-bit and you would have some trouble running those versions.
dear at first make right click on the setup or install file then go to the properties then compatibility tab and chose click on change settings for all users then select in the compatibility mode in the check box run this program in compatibility mode for select windows xp (service pack 2) and good luck its a tested and successful way

Visual Studio - Compile for 32 bit vista on 64 bit windows 7

I am having a little trouble with a small Winform program I have created that uses Sqlite.
I have developed the program on a Windows 7 64 bit machine and compiled it using the Any CPU compile option.
Program uses .NET framework version 4, Vista PC has framework version 4 on it.
The output runs fine on my 64 bit Win 7 PC but on a 32 bit Vista machine it does not run.
I also tried Mixed platforms. Am I missing anything else in my compilation options to ensure this will run on a 32 bit platform?
Regards and thanks
John

Virtual PC (Program Developed on XP Runs on W7 Problem)

I have a developed a C++ application using 32 bit and it create a executable file. This project has uses some external library like window socket 32bit, Qt GUI and boost library. The dll is located at same directory with the executable.
I wonder how can i run this application on window 7.
MY window 7 version is Home Premium 64 bit. Therefore, i cannot install the XP mode from Virtual PC but some one them reported that using Sun virtual box is functional.
I have try to troubleshoot the executable file using program compatibility but the problem doesn't solve.
Any program that can check external dependencies and identified the issues of running my program on window 7 ?
Please help.
Thanks.
64 bit editions of windows can run 32 bit applications fine. You just need to install the 32 bit versions of the needed libraries and it will work.

Using Visual Studio 2005 (32bit) on a Windows 7 64bit machine

I need to use Visual Studio 2005 (C++) on my new laptop - a Sony Vaio with Windows 7 64bit..
I don't need to develop for a 64bit environment, my work is all 32bit, so how can I be sure that I can still develop/debug/test for a 32bit target environment using VS2005 on a 64bit machine....?
What's the best option:
1) Just install VS2005 on Windows 7 64bit and carry on.. (suspect problems with 64bit runtime libs..?)
2) Dual boot the laptop with Windows XP 32bit.
3) Run some kind of Virtual Machine with Windows XP in it... (I don't have a VM yet, but would look into it)
Thanks
The answer is 1) you just need to make sure that you target processor is 32bit. You can develop for 32bit machine on a 64bit machine and vice versa.
After some looking around it looks like you must have up to date service packs. Read http://msdn.microsoft.com/en-us/vstudio/aa948853.aspx if you want to know more.
Visual Studio includes both 32-bit and 64-bit compilers and tools.
You can install VS on Windows 7 x64 and develop 32-bit applications without any problems.
(Just don't do something insane like hard-coding "C:\\Program File (x86)\\")
As the others have pointed out, both the 64 bit and 32 bit versions of VS can target both 64 bit and 32 bit runtime environments. Further you can use either the 64 or 32 bit versions of Windows 7 (obviously the 64 bit version of VS requires 64 bit Windows, but VS 32 bit runs on either).
But you have a second part to your question, debug/test on 32 bit. Depending on the kinds of applications you build, testing under Windows 7 64 bit alone may not be sufficient. You may want to test in a Windows XP virtual machine running under Windows 7, or in certain cases you may need a real 32 bit computer to test on.

App created in Visual Studio on XP 32 crashes 64 on access violation. Recompile in 64 bit environment to find bug, works fine. What?

So I've been developing on Windows XP Visual Studio 2008. I guess it is building my C++ app in 32 bit mode. When I run the program on my new Windows 7 64 bit box, it gets half way through loading a then throws an access violation error. So, I loaded all my development tool and recompiled the project on Windows 7 to find the crash site but it works perfectly! What? How do I make my app work on x64? Do I have to release two seperate versions? I know I can target 64 bit but I don't like two separate executables. I've searched but keep getting the two version solution or everything .net. This is a native C++. is there an x86 flag somewhere?
"Do I have to release two seperate versions?"
It depends on what your app does. The majority of 32bit apps work just fine in WoW mode.
"is there an x86 flag somewhere?"
Yup. Open up the configuration manager (Alt-B, O) and you will likely see a win32 in the platform selection.
Why your app crashes is going to take some debugging. You should be able to attach the debugger to the 32bit version on the 64bit OS.
Have you considered the possibility that you may be trashing memory? From the way that the application happens to be loaded into memory, it may be that the 32-bit app on 32-bit Windows and the 64-bit app on 64-bit Windows "get lucky", i.e. no important memory locations are overwritten, whereas the 32-bit app on 64-bit Windows is less lucky and crashes.
To find out if you are indeed trashing memory, you can use tools such as Purify and Valgrind.
As the others' answers already said, it is very likely that the application has bugs that are being hidden in one environment. A good tool that has a low cost of entry in terms of learning curve is Microsoft's application verifier. That along with the debugging tools can provide a very good start. Take a look at the gflags utility.

Resources