Search code examples
visual-c++mingwgtkmm

using libraries generated with gcc with msvc toolset


after painfull strugling for days, I somehow managed to build latest gtkmm 3.10 libraries under windows with MinGW tools. The output generated has gcc extensions, ie.(*.a *.dll.a *.la) this all works fine, I'm using code::blocks with MinGW to link to the libraries, but I wonder if it is possible to link those libraires with MSVC++-12.0 toolset withing visual studio 2013? so I don't have to use gnu tools any more then. if yes, then how should this be done? thank you.


Solution

  • Beware, gtkmm is a c++ library, and c++ does not have a stable abi(application binary interface). This means that static libraries compiled under different versions of the same compiler may not work. This is why its recommended to recompile c++ libraries for your c++ app/lib so everything has the same compiler building it.

    If you're building your app in VS2012, you need to compile gtkmm with the version of VS2012 that you'll use.

    But not all is lost forever! Herb Sutter has put forward creating a stable abi. https://isocpp.org/files/papers/n4028.pdf