F# build 32-bit executable from command line - f#

I need to run an F# program from another 32-bit executable. I don't have any access to source code of this one. How do I build 32-bit F# executable file under 64-bit OS from command line?

So, I've finally found an answer just after I asked the question on SO. (This somehow helps, you know). The answer is here:
Running a 32-bit C# application on a 64-bit machine
You need to run corflags /32BIT+ situated at \Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\corflags.exe, so that the executable runs with 32bit on 64bit OS.

Related

electron-builder is not calling x64 installer [win10]

electron-builder is calling 32bit installer causing paths point to WOW64 equivalents instead of the real x64 paths.
Process that calls installer is 64bit, then 32bit installer is called and eventually application that is "runAfterFinish" is 64bit.
How can I overcome this issue and force installer to call x64 version?
Tested on Windows 10, electron-builder 19.16.3
Builder ran with --x64 option gives output:
Building NSIS installer
Packaging NSIS installer for arch x64
Calling installer with ... /D=path argument would also solve the problem, but it is not taking this into account.
I don't know anything about electron builder but I do know that a 32-bit NSIS installer can install 64-bit programs.
Use SetRegView to change to the 64-bit registry view and use the macros in x64.nsh to turn filesystem redirection on and off.

Is there a 64-bit version of iZ3 for Linux?

At How to install iZ3? there was a link provided to Z3 4.1 for Linux. In this archive, Z3 itself is 64-bit, but iZ3 unfortunately not.
I can not run the 32-bit iZ3 executable on my machine, because it is missing 32-bit shared libraries, which i can not install (they would replace my regular 64-bit libraries).
So, is there a 64-bit version of iZ3 for Linux?
Currently, the interpolating version of Z3 can only be built from source. Get the branch "interp" source from z3.codeplex.com. The file README contains build instructions, including how to get the external library that is required.

Packaging F# program for Mono

I am currently learning F# and preparing to write my first program. I will be using Visual Studio 10 in Windows 7 to write the code, because the F# support for MonoDevelop is a few versions behind.
My normal day-to-day development environment is Mac Os X 10.7. I have Mono and MonoDevelop installed. After I finish writing my masterpiece, how do I package it for running on Os X? What DLLs do I need to send to other Windows users so that they can run my .exe file? How do they install those DLLs?
In the Java world (where I usually live), I just package my Java code with any dependencies into a monolithic UberJAR that I can send to anyone who has the appropriate version of Java (usually 6) and they can run my code by typing
java -jar MyUberJar.jar
I routinely write code in Scala and include the Scala library, along with any other dependencies.
Is there any easy way to do something similar for .NET, and specifically for F#?
One alternative is to use the --standalone flag to fsc which will statically compile all the DLL's you need into a single large EXE. The people you send it to will still need to install Mono, but there are no other dependencies.
I think this is what most people use:
http://wix.sourceforge.net/
I say "I think" because at work we've got a release team that builds the installer package for us.

What is the difference between the x64 and x86 library files in DirectX?

I recently got Visual Studio on a new computer, and to set up DirectX on it, I went to Tools>Options>Projects and Solutions>VC++ Directories and under Library Files made a new entry C:\Program Files\Microsoft DirectX SDK (August 2009)\Lib\x86
and now ran a test program (essentially just initialized DirectX) and it worked fine. However, if I change ...\Lib\x86 to ...\Lib\x64, than I get a linker error that Direct3DCreate9 is undefined:
1>main.obj : error LNK2019: unresolved external symbol _Direct3DCreate9#4 referenced in function "void __cdecl init(void)" (?init##YAXXZ)
The x86 libraries are for 32-bit applications, and the x64 libraries are for 64-bit applications.
You can see which platform you are targetting in Visual Studio's Configuration Manager. Unless you have a good reason, you should be writing 32-bit applications, since 64-bit apps will require the 64-bit version of Windows to run.
The x64 folder contains the library files for the AMD64 platform (Windows 64 Bit). You need to compile your application for 64 bit, too. Also, you need the 64 bit version of Windows to run the produced executable.
Well the simple answer is that the x86 libraries are for 32 bit operating systems and the x64 libraries are for 64 bit operating systems.
Simply changing the DirectX library linked to will produce an error as you are (in all probability) trying to link your 32 bit code to the 64 bit library. You will need to compile your code to target 64 bit operating systems to get this to link successfully.

Compiling with Delphi 2009 from a command line under Windows Vista 64-bit

Has anyone succeeded to compile a Win32 GUI app with the command line dcc32.exe compiler, under 64-bit Windows Vista, without installing Delphi 2009? On our system it fails, with a message that the DFM files contain unknown 16-bit resources. This is usually an indication that the DFM files cannot be read. It works perfectly on all 32-bit Vista and Windows XPs, that we tried.
I am asking, because we want to ensure that we can rebuild our current exe files later, if needed, so even if we all switch to 64-bit OSes in the future, we want to be able to rebuild the old 2009 versions.
With Delphi 2009 you should use msbuild to commandline compile your projects (msbuild YourProject.dproj). Be sure to do this from the RAD Studio commandprompt. This ensures some environment variables are set. Does this solve your problem?
Adding lnkdfm120.dll solved the problem.
Yes, we are performing console builds via dcc32 through nant in both Vista 64-bit and Windows 2008 64-bit. You may have to deal with some path issues the (X86) if you installed to the default location (we do not to remove these types of dependencies).

Resources