I made a project on the lazarus IDE, I run it on my machine win 7 x84_64 and it was executed well, then my client tested it on his machine and it run too(win 7 x84_64), but after that he tried on a Windows XP but it did not run. He didn't catch the error, so I don't know what is the specific problem but I wonder it's about "window compatibility" Is there some way to compile my project for XP platforms?
You are probably creating 64bit applications with your 64bit Lazarus. You can also install 32bit Lazarus, and it's generated applications will run on both 32bit and 64bit Windows. You can also cross compile from 64bit Lazarus to 32bit Windows, but that is not trivial. For Lazarus cross compilation you can start here. If you want easy cross compilation, then take a look at Lazarus CT edition (also known as CodeTyphon). It is packed with tons of components, 8 OS/CPU host layers (Win32, Win64, Linux32, Linux64, FreeBSD32, FreeBSD64, Solaris32, Solaris64), and 25 OS/CPU target layers. More info here.
Related
I'm developing and compiling on a Windows 10 64-bit machine. We've discovered an issue that seems to be related to machines running 32-bit machines. If I compile the most current code from a 32-bit machine, the issue goes away.
I'd rather not have to develop on one machine and compile from another if I don't have to. I'd rather not set up a VirtualMachine running a 32-bit version of Windows, just to compile, if I don't have to. So, how are people in the "real world" handling this? I'm using Visual Basic 6 (I know, I know. But "Just upgrade to .NET" is not the answer I'm looking for. I'm working on it. It will take some time. A lot of time.).
I downloaded, what i thought, would be the 64-bit version of Lazarus:
Although it downloads a 32-bit build:
And after installing it, the IDE is 32-bits:
And it builds 32-bit binaries:
Changing the targeting options to win64, win64, win64:
Gives an error that Lazarus doesn't support 64-bit:
Reading the somewhat dated Cross compiling Wiki page gives the instructions on how to make the 64-bit Lazarus work on 64-bit machines:
From win32 to win64
If you are compiling the 2.1.1 or greater branch of fpc you can just do:
$ make all OS_TARGET=win64 CPU_TARGET=x86_64
and then
$ make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64
which, if you follow, just gives a few thousand errors:
The common suggestion is to abandon the Lazarus IDE, altogether, and use a fork known as CodeTyphoon. Downloading that 500 MB, and installing it, i couldn't find an IDE anywhere:
Which is confusing, because i thought CodeTyphoon was a Pascal Visual Programming Environment.
Before i go on
Before i go randomly stumbling around, downloading gigabytes of stuff, let me just ask straight out:
Can Lazarus 64-bit for Windows compile to 64-bit for Windows?
Is there a 64-bit Lazarus for Windows, that can create 64-bit Windows binaries? Am i missing something, or is that functionality not in there yet?
And if the ability is in there, at least could someone commiserate that my confusion is understandable?
The following is from README.txt files on the SourceForge download pages (http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%201.2/ and http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.2/). However, those readme.txt files are apparently not included in the actual installation.
I have verified that installing the plug-in allows you to build a 64-bit application.
Two things:
there is an add-on for building Win64 applications in the 32-bit Lazarus IDE:
Add-On for building 64bit Windows applications:
lazarus-1.2.0-fpc-2.6.2-cross-x86_64-win64-win32.exe
This file can be installed as add-on to the 32 bit Lazarus IDE (on Systems with Windows 32 or 64 bit), if you wish to develop for
64bit Windows too. If you install this on a 64bit Windows PC together
with the 32 bit Lazarus IDE, you will also able to debug 64 bit
applications.
the link to the 64-bit Lazarus IDE on the Lazarus homepage is incorrect (it points to the Win32 version). The link should be:
http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.2/lazarus-1.2.0-fpc-2.6.2-win64.exe/download
If you use the 64-bit IDE you'll need a similar (but different) plugin to build 32-bit binaries.
I have a problem related to this question. Two players:
C# application
Mixed assembly used by 1)
The application has to support anything from Windows XP (32bit) to Windows 7 (32 & 64bit). The assembly is complicated in different ways. It contains managed C++/CLI code and some native C++ classes dancing with native DirectX. It also is linked to a few 32bit native dll's w/o source access (containing C++ classes with import libraries).
Things are working well in 32bit environments (XP and 7 tested) including the 32bit subsystem on Windows 7. Havoc happens, as soon as "Any CPU" is used on 64bit systems in order to build the complete solution. The 32bit assembly is unusable than - but seemingly only in debug mode ("cannot load, wrong format" etc.). It seems to work in release. A 64bit assembly build is prevented by the implicit dependencies to the mentioned 32bit third-party dll's.
Is there any way to provide a real native 64bit application able to use the assembly?
Requirement for the assembly isn't that strict. It could be both - 32 or 64bit - but as said above, should be be usable from the application one way or the other.
You are running into a rock hard limitation in the 64-bit version of Windows, a 64-bit process cannot execute any 32-bit machine code in-process. You certainly have a dependency on machine code when you use C++/CLI and work with DirectX. Although it doesn't sound like you could not execute in 64-bit mode, both C++/CLI and DirectX can be compiled/are available in 64-bit.
This then boils down to a build and deployment issue. You have to build the C++/CLI project(s) in 64-bit mode and deploy only 64-bit components on a 64-bit operating system. The main EXE must be built to AnyCPU. Similarly, on a 32-bit operating system you must build and deploy only the 32-bit compiled version. You solve the build issue by adding the x64 configuration to the solution so you build the 32-bit and 64-bit version separately. You solve the deployment issue by creating two installers.
Since you have to support a 32-bit operating system anyway, the simple solution is to change the Target platform setting on your EXE project to x86. Now everything always runs in 32-bit mode and you don't have to bother with the build and deployment headaches. The only thing you miss out on is the larger virtual memory address space that's available in the 64-bit version.
Forget about the C++/CLI project for a minute.
You have third-party 32-bit DLLs. These CANNOT load in a 64-bit process. So your main application will have to be 32-bit. This restriction has nothing to do with the C++/CLI middleman.
The only way you can make use of these DLLs from a 64-bit application is to load them in a separate (32-bit) process and marshal data back and forth.
I have seen that some programs which were written by me and assembled for x86 using ml.exe run fine on my Win 7 x64. I believe this is because of Wow technology.
However, there are some programs (not written by me) which don't run. They give the error that:
The version of this file is not compatible with the version of Windows you're running. Check you computer system infromation to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher
Is there any way I can modify the EXE of these programs to make it run on Win 7 x64. What is the fundamental difference in these programs which make it different from other programs which run transparently.
They're actually 8- or 16-bit programs. Windows x64 runs in Long Mode, which does not support Virtual 8086 Mode, required for such programs. There is no way to make them work short of recompiling them from source or running them in a virtual machine.
One reason can be combination of .NET and native libraries. .NET libraries are compiled in runtime as x64 (if you don't specify explicitly x86) and native libraries run in x86 mode. it cannot run togehther.
Another reason is access to registry. Depending on used API, x86app in wow64 mode can be forwarded to another part of registry. If the registry access API is inconsistent, it can make a 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.