I am working on one migration project from x32 bit to x64.
Here I am using this code:
{$L com_1.obj}
{$L com_is1.obj}
{$L com_2.obj}
But while compiling code I am getting error as
[dcc64 Error] XXX.dpr(919): E2045 Bad object file format: 'E:\MyProj\com_sha.obj'
I am not able to trace why it is happening.
Is it due to 32 bit obj file used for compiling x64 bit delphi project?
If it is I have also tried to create a obj file with x64 bit environment.
Can anyone please help me on this?
I am using Delphi 10 Seattle.
You cannot use a 32 bit object with the 64 bit compiler. You must recompile your code with a 64 bit compiler.
You can use a number of different compilers to do this. Although I have heard of people succeeding with gcc I have never managed to do that. I believe that the modern Clang based Embarcadero compiler can be used, but I personally have no experience of that. I have always used the Microsoft compiler to create 64 bit objects. And certainly this is how Embarcadero themselves have done it for libraries like zlib that they link to their RTL.
Yes you need to convert those .obj files to 64 bit.
Converting 32-bit Delphi Applications to 64-bit Windows states:
64-bit External .obj Files: If you expect your 64-bit Windows application to link to an external .obj file, keep in mind that you will need a 64-bit version of the .obj file to link with a 64-bit Windows application.
Related
I am building an operating system that supports both 32 and 64 bit, using the Meson build system. I have just started adding support for 64 bit, but I came accross a problem. When I use the 64 bit C compiler, both the kernel and stage2 gets compiled using that compiler. Which is the problem, the stage2 folder, has to be compiled with the 32 bit C compiler, not the 64 bit compiler. Is there any way I can achieve this in meson? Should I switch to CMake?
Which is the problem, the stage2 folder, has to be compiled with the 32 bit C compiler, not the 64 bit compiler.
Neither build system will let you do this in a single build... both CMake and Meson have a deeply held assumption that there is one compiler per language1. If you need to use multiple compilers, you will need to split your build into multiple independent projects. How you orchestrate building them is up to you... with CMake, I would suggest using a superbuild with ExternalProject. With Meson, I'm not sure what the standard approach is.
1. Technically Meson allows you to define a host/native compiler, too (for compiling build-time tools), but it is not suitable for this case since the host might not be either target and you might well end up wanting three or more compilers in use (e.g. for ARM).
Should I switch to CMake?
Probably not, since you already have something working with Meson. But if your build rules get complex enough, you might find CMake's ability to write functions and abstractions to be a greater benefit than a liability.
I'm developing a few programs on my pc, that runs Ubuntu 64bit.
I'd like to run these applications on another pc, that runs on 32. Is possible to compile on my machine or do I need to recompile the applications on the other?
In general you need to provide the compiler an environment similar to the target execution environment. Depending on how similar or different one environment is to another, this may be simple or complicated.
Assuming the compiler is GCC, you should only need to add -m32 to your compilation flags to make them work on a 32 bit system; assuming all other things are equal. Ensure you have the necessary 32-bit dependencies installed on your system (this means the base C library dependencies as well as a 32 bit version for each library your application links against).
Since you are only compiling for x86 on a 64 bit host, the path to this is generally simple. I would recommend however setting up a dedicated environment which you can use to compile -- typically some kind of chroot (See pbuilder, schroot, chroot, debootstrap and others).
There are compiler settings/flags that should allow you to do this on your machine; which specific ones you need would depend on the compiler you are using.
My problem is about trying to compile a C dll and its dependency to 64bits and to use it in LabVIEW.
To start with the beginning, I'm using a 32 bit LabVIEW toolkit to use XML files (downloaded from here ). This toolkit is using 32 dll dlls that works fine (libxml, libxslt, iconv, zlib, and a wrapper dll IXMLWrap)
Now, I want to use it with 64 bits version of LabVIEW. The LabVIEW part of that migration should not be a problem, but first of all, I have to get 64 bits version of the dlls.
I downloaded the 64 bits versions, except for IXMLWrap (specific one). But I have the .c file of that wrapper.
So I tried to compile it with visual studio, and successed ... almost !
I get a home compiled 64bit IXMLWrap dll, but impossible to load it with LabVIEW 64 bits...
When reading the dll with "Dependency Walker" 64bits, I get some errors about missing export functions.
Indeed, when I compare the 32 and 64 bits dlls with Dependency Walker, I do have the same functions in the dlls, but do not have the same exported functions ... (sorry I'd like to post images of that but not enough reputation...
Does someone have some hint about what is the problem with my IXMLWrap dll : incorrect downloaded dlls, problems in the configuration of my Visual studio project, ... ?
OK, it's all my fault...
I did the link with .lib files ... coming from linux (not windows)!!
No problems then to compile and use the 64bits dll
I want to create a 16 bit Dos application and want it to run using the NTVDM.exe on my 32bit windows 7 machine. How do I do it?
I basically want my application to do the file operations through the NTVDM and for that I think I'll need a 16 bit application first, Is there any other way?
I don't need an Emulator, I need to create an 16-bit app
A couple free C/C++ compilers that claim 16-bit (MS-DOS and Win16) support are the Digital Mars compiler and the Open Watcom Compiler.
The Open Watcom webpage is unresponsive at the moment... There's a SourceForge download page though.
The last Microsoft Visual C++ compiler for 16-bit was 1.52c, available on MSDN Subscriber Downloads.
For free ones, see Looking for 16-bit x86 compiler.
For many years we have been using xp_pcre for regular expressions in sql server:
xp_pcre - Regular Expressions in T-SQL
I've just migrated to a new 64 bit vista development machine and have installed xp pcre. Unfortunately when i try to use the sprocs I get the following error: Could not load the DLL xp_pcre.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).
Has anyone had any success installing xp_pcre on a 64 bit machine running vista? Any advice? Thanks in advance,
Shane
Since it's a compiled DLL, you would probably have to recompile it to get a 64 bit DLL, that could be run on your 64 bit machine. Since nothing at that page has been updated since 2005, it's unlikely there is an already a prebuilt version for 64 bit. However, since the source code is included, you could, if you have VS for C++, with a 64 bit compiler, compile it yourself and try to get it working that way.