1

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.

Rais Alam
  • 6,970
  • 12
  • 53
  • 84
srinivasan
  • 823
  • 1
  • 8
  • 14

1 Answers1

2

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.

jlliagre
  • 29,783
  • 6
  • 61
  • 72
  • Is there be a mingw with solaris toolchain available. – srinivasan May 27 '12 at 01:51
  • Can you rephrase and clarify that ? I don't understand what you are asking for. – jlliagre May 27 '12 at 07:40
  • sorry for poor english. I know tools like cygwin & mingw available to run the non windows libraries in windows. Can we use one of those with solaris toolchain to run solaris library in c++ program windows. – srinivasan May 30 '12 at 03:21
  • 2
    cygwin and mingw do not allow you to run non windows libraries in windows, they only provide (more or less) Unix compatible libraries and allow to recompile many of them, this is quite different. The main issue is you haven't the source code of your library. As I already replied, you can't use a Solaris library on windows given the multiple levels of incompatibility. Go the helper way if doable. If your Solaris library is x86 (which you fails to state), you might run the service on a virtualized Solaris on Windows. – jlliagre May 30 '12 at 05:20