solaris library in windows - eclipse

We have got a solaris shared object(.so) compiled using sun studio creator[Sun C++ 5.10] (no access to source code).
I have to develop c++ application based on that solaris library in windows using ide's eclipse cdt/visual studio.
Preferably eclipse cdt.
Tried using Mingw not woring.
Can g++ from MinGW link to sun studio library.

I hope you aren't expecting something as simple as a linker flag ...
You have here incompatible formats (ELF vs PE), incompatible ABIs (Solaris vs Windows) and possibly incompatible machine code (SPARC vs x86 vs x64).
If the library is suitable for that, the "simplest" solution would be to create a helper service running on a Solaris server that expose the library function as RPCs, and consume them on Windows.

Related

Is it possible to compile Linux runnable fmus from Dymola on Windows machine?

I am trying to export a FMU from windows machine using Dymola, to be used on both Linux and Windows OS. I guess such fmu will have linux64 and linux32 binaries along with win32 and win64 ones. However, I am not sure how to trigger Dymola to generate binaries for Linux runnable fmu (if it possible to do that).
The Dymola (2020X) installation is using Visual Studio 2019 compiler with both 'Desktop development with C++' and 'Linux development with C++' options. My assumption was that 'Linux development with C++' would make Dymola to compile .so files, however I see only dlls included in the fmu.
Unfortunately you cannot create Windows and Linux binaries for FMU:s in one operation. Great suggestion, though.
Are you using a network or nodelocked license? Maybe a dual boot/virtual machine could help.

Linking a C (C++) application with the PostgreSQL client library libpq.lib

I am trying to build an application in Visual Studio 2013, linking with the libpq.lib library downloaded with the binary installer for PostgreSQL version 9.4 for Windows. I get this error:
LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in ...
My assumption is that the downloaded library has been built with an earlier version of the MSVC compiler (Visual Studio 2010?).
I would like to know which MSVC compiler was used to build the various versions of libpq, from version 9.4, 9.5, .... 10.0.
My compile error indicates that the modern MSVC compilers / linker will check for consistency (value of _MSC_VER). Will that prevent linking with libpq.lib in VS2015 and VS2017? (Provided libpq.lib was built with VS2013).
I assume that you are talking about the PostgreSQL binaries for Windows provided by EnterpriseDB.
All versions from 9.4 to v10 were built with Visual Studio 2013, and I have successfully used the Express Edition to build server extensions for Windows.

Matlab Mex file compile

I'm trying to compile a mex file to use socket connection within matlab. The problem is that it is always saying that I don't have sdk or compiler installed. But I have installed visual studio 2010 express, visual studio 2012 express, visual studio 2012 professional and nothing is changing the error. Also I have installed the sdk. Is there anything that I could try? The matlab version is R2012b and I'm using windows 7, 64 bits.
Thanks!
You can try gnumex, which lets you access the mingw compilers on Windows. It works with mingw-w64 which is the 64 bit version of mingw. You have to install the mingw compiler suite, then run gnumex in Matlab to tell it where mingw is and set it up.
I believe that Visual Studio 2012 is only supported on the latest R2013a. Use VS2010 for your MATLAB version.
In addition, the Express editions of VS do not contain 64-bit compilers. You need to either get the Professional edition, or download the free Windows SDK.
See the list of supported compilers for more information
You are asking how to compile the mex-file directly on the Matlab's command line.
An alternative would be to compile the mex-file from Visual Studio. You might be interested in my answer to
No C++ compiler found in MATLAB using mex
Have you run mex -setup to tell MATLAB which compiler you want to use?
See this page on Building MEX-Files for more information
May be this link wil be useful for you
http://support.brainvoyager.com/available-tools/52-matlab-tools-bvxqtools/339-how-to-get-a-64-bit-compiler-under-windows-to-use-with-matlab.html

Deploying linux CUDA app

I've compiled a cu program on my laptop, using NVIDIA CUDA 5 toolkit. A very basic interface, using only terminal output. Then I went on to test how it runs on my desktop PC (both have Ubuntu 12.04 LTS installed).
On the desktop PC I get this error message:
error while loading shared libraries: libcudart.so.5.0: cannot open shared object file: No such file or directory
Ok, I get it, some libs are not installed. But do I really need to install CUDA toolkit on every PC where I'd want my compiled code to run?
To deploy a CUDA runtime API application on linux you only need to do two things:
Make sure that the machine in question has a CUDA compatible card and a minimum driver version which matches the CUDA Toolkit you used to build the application (you can find information regarding both of these in the release notes of the toolkit)
Distribute the runtime library (so cudart.so) that you built the application against with the executable. If you used any other libraries from the toolkit (like CUBLAS, CUFFT, CUSPARSE, etc) you need to inlcude those too. The CUDA runtime library is versioned and you have to have the libraries which match the toolkit you are building with. You may need to use the LD_LIBRARY_PATH environment variable to ensure that the correct versions of the libraries are found by the link loader. Often a simple shell script which acts the canonical application, settings LD_LIBRARY_PATH variable and running the built executable is the best way to do this.
If you get those two things right, it should just work.

Connecting oracle from c++ .. MSVCR90.dll is missing from your computer

I am trying to connect to oracle database from c++ using OCCI, I am following these instructions from Mark Williams, But when I run my program it gives error as MSVCR90.dll is missing from your computer. I suppose its problem related to vc compiler maybe its trying to use vc10 and oracle dll searches for vc9 dll? The oracle version I am trying to connect to is 10g.
Is it possible to configure VS2010 to use VC9 instead of VC10?
I am using Visual Studio 2010 under Windows 7.
Indeed, the client application requires a different version of the MSVC runtime from what is installed on your computer. Msvcr90.dll is the Common Runtime library for Microsoft Visual C++ 2008. You will need to install this. (Note that for this version, it is no longer considered a shared system directory, so it installs as a Windows side-by-side assembly.)
You can install it by downloading the installers here or here: