I come from UNIX world, I'm quite familiar with Linux, Solaris, Cygwin and MinGW development. Recently I ported one of my big projects (cppcms) to support MSVC, including building static and dynamic libraries with CMake.
And I get all the time absolutely weird issues:
- I had CMake build issues because Windows programming lacks naming convention for import and static libraries.
Now I discovered that I should use different versions of ICU (debug/release builds) according to the actual build I do (Debug/RelWithDebInfo -- should use Debug ICU, Release release ICU) and so I should change actual conventions for searching libraries according to debug/release mode only under MSVC. Otherwise application just would not start giving a error on missing DLL.
I don't have any such issues under Mingw or Cygwin with GCC, Open Solaris with Sun Studio or Linux with gcc or intel compilers.
And I still have numerous wired issues and wired bugs and very strange behavior -- even some trivial things do not work under MSVC builds, when everything works absolutely fine under Solaris/Linux/Cygwin/Mingw using GCC from 3.4 up to 4.4, Sun Studio and Intel compilers). But not under MSVC.
To be honest, I have no idea how to deal with Last one! Because it looks like for me more like environment issues.
I know that the question is not really well defined. I think I'm quite experienced developer and I know how to write portable and good C++ code. But using Microsoft native tools drives me crazy with issues I just don't know how to solve.
Question: What should experienced Unix programmer with quite good base in Win32 API should know when it starts using Genuine Microsoft Tools?
P.S.: Can someone explain why "Release With Debug Info" requires Debug version of MSVC runtime? And why there two versions of runtime exist at all?
P.P.S.: Please note I don't have issues with Win32 API, in fact Windows GCC build works absolutely fine.
Clarifications:
I'm looking for pitfalls that programmer that come from Unix world would may fall into.
For example, when moving from Linux to Solaris: make sure you compile code with -mt
or
-pthreads
when using multi threaded programs, linking with -lpthread is not enough.