C++ and Java 64 bit migration challenges from 32 bit - visual-c++

Any set of guidelines or pointers to compile and run existing applications that use Java 32 bit version for linking native code in C++ and Java, as from Java9(JDK9) only 64 bit versions of java will be available.
Any ways to migrate JNI layer(32 bit) and C++ code to 64 bit architecture.
Note: Using Visual Studio 2012 IDE for C++ code compile and execution.
Did update the configuration parameters(Linker properties, VC++ directories, C/C++ properties), in VC++ to point to 64bit JDK version. This did get compile but while debugging giving access violation errors on access to built-in C++ methods.

Related

Cannot use a C++/CLI DLL unless Windows 10 SDK is installed

We have developed a C++ library that does a little bit of data interpretation, mostly converting raw byte streams into JSON strings and also collecting raw data packages and returning the collection as a binary file (byte stream).
This library is written with pure C++ STL without any other libraries as dependencies and is used successfully in Android and iOS projects.
For a new C# project for Windows Desktops, developed by external partners we have built, a PIMPL class in C++/CLI that enables easy integration of the already existing code base. In Visual Studio we compile the C++ library into a static library with clang/LLVM and use it in the Visual C++/CLI Wrapper project as a dependency to build a DLL that we provide for our partner.
This setup took a little time but it works now fine and we are really happy about the development.
But when we tried to get a Demo running on a different PC we encountered serious problems: It is not possible to load this DLL on a "clean" system. When trying to load it in our application (or a DLL Dependency Walker for that matter) it throws a
After some hours of experimenting I've narrowed it down to the Windows 10 SDK that seems to be necessary to load this DLL.
My guess is that it has something to do with some compiler/linker setting in Visual Studio, but I have no idea which one...
Edit:
All VC++ redistributables (2010-2017, x86&x64 just to be sure) as well as the .Net Framework 4.7 and .Net Core Redistributable are installed.

Protocol buffer in 64 bits vs2013

HiI want to build my solution with VS 2013 64 bits, do I have to rebuild the latest version in 64 its or I can use the 32 ???thanks
What matters is the target. If you have a project for Platform Win32, all referenced libraries must be compiled for Win32 and if you have a project for Platform x64, all referenced libraries must be compiled for x64 (and with compatible compiler settings; visual studio has several project options that when changed make the libraries incompatible). Particular variant of VS 2013 does not matter.

How to compile C# code to 64 bit in Xamarin Studio on OS X?

I'm dealing with a large single text file (1.5 GB).
I have a machine with 16 GB memory, but Xamarin Studio only allows me to compile things into 32-bit executables. So my 16 GB memory could not me utilized fully.
So my question is, how do I compile my code into 64-bit programs in Xamarin Studio in OS X? Are there other ways to break this memory limit set by mono for each process?
Thanks.
You can't yet compile to 64bit or use 64bit native libraries with Xamarin.Mac unfortunately, it's still 32bit only, they are apparently working on it though.
Xamarin announced the Unified API 32/64 bit for Mac and iOS back in 8/19/2014, so the answer is now: yes.
Assuming you have a installed a 64-bit Mono (& compiler) framework on OS-X as the default install is still 32-bit in order to support GTK# applications. Within Xamarin studio you can change the Mono framework SDK to your 64-bit version that is being used to compile/run.

recompile VC++ 6 code for X64 plateform

I have an old VC++ 6 code compiled as DLL, I used it for many years without problems, now i need it in a x64 application, can i recompile the old code to produce a X64 DLL?
Am I need the same VC++ 6 IDE or another compiler?
Unfortunately, the answer to both of your questions is: maybe.
I have had good luck taking VC++ source code for old 32-bit DLLs and recompiling it for 64-bit. Sometimes it is a simple recompile. Other times, minor adjustments have to be made. My biggest concern would be if the 32-bit DLL relies on other 32-bit DLLs that you may not have source code for. In that case, unless you have 64-bit copies of the other DLLs, you are probably out of luck.
Now, I have never tried to do this with VC++ 6. I've done it with Visual Studio 2010. However, the windows platform SDK used to support compiling for 64-bit with VC6. My understanding is that the last version of the SDK that supported this was the February 2003 version. I just checked MSDN and I do not see this available for download. That doesn't mean you cannot get a copy (and you may already have one). It does mean that getting a copy won't be as easy as going to MSDN and downloading it.
Now, having said that, my recommendation is to use a newer compiler to make your 64-bit DLL. Assuming Windows, all recent Visual Studio compilers (2008, 2010, 2012) will do 64-bit, provided you've installed the 64-bit tools.

32-bit VC++ redistributable on 64 bit OS?

Using Visual Studio, I have built an C++ application running in 32bit. It will be deployed both to 32-bit and 64-bit Windows servers. It won't be run in 64-bit mode (but rather under WoW).
Should I include both the 32-bit and 64-bit Visual C++ redistributable, and install 32bit on 32bit Windows and 64bit on 64 bit Windows, or is it enough to just install the 32bit redistributable?
It is enough to install the 32bit redistributable.
EDIT: I commented below on a misleading answer, but the answer is you only need the 32-bit redistributables, as Karel Petranek answered first.
This is not an answer. It should only be a comment, but since I don't have the required reputation for that...:
I just wanted to warn people against Ruel's provided information. No, the 64-bit Visual C++ redistributable packages don't also include the 32-bit DLLs.
I have even tested that (his) theory. I tried to run an application that requires Visual C++ 2010 32-bit redistributables and it prompted me that it needs that. I then installed the 64-bit one, and it still prompted it needed the 32 bit version of Visual C++ 2010. After installing the 32 bit one, it worked.
Why people come up with theories and provide them as answers beats me. Or maybe he was also "encouraged" by the reputation system to give not only superfluous, but also false information. Or maybe he just confused C++ with DirectX 9 redistributables (that one does install both 32-bit and 64-bit DLLs).
Both are Microsoft products, but don't let that fool you.
Your C++ application creates a 32 bits EXE, linking to 32 bits DLLs. As it happens, one or two of those DLLs are Microsoft CRT DLLs, but the OS still uses the same rules. Therefore, you don't need the 64 bits DLLs.
Compile it using /MT option and VC++ runtime library will be compiled into your exe, so you don't have to worry about distributing it.
Project > Properties > Configuration Properties > C/C++ > Code Generation > Runtime Library > Multi-threaded (/MT).
The 64-bit Visual C++ redistributable package includes both 32-bit Visual C++ redistributable and 64-bit Visual C++ redistributable.

Resources