What should a Unix programmer know about how to use Microsoft Tools?

I came from the UNIX world, I am well acquainted with Linux, Solaris, Cygwin and MinGW development. I recently ported one of my large projects ( cppcms ) to support MSVC, including creating static and dynamic libraries using CMake.

And I get absolutely strange problems all the time:

  • I had problems with the release of CMake , because Windows programming does not have a naming convention for import and static libraries.
  • Now I found that I have to use different versions of ICU (debug / release builds) according to the actual build I do (Debug / RelWithDebInfo - I have to use ICU debugger, release release of ICU) and therefore I have to change the actual conventions to find libraries to match with debug / release mode only in MSVC. Otherwise, the application simply will not start giving an error when skipping the DLL.

    I have no such problems in Mingw or Cygwin with GCC, Open Solaris with Sun Studio or Linux with gcc or intel compilers.

  • And I still have numerous wiring-related problems and wiring-related errors and strange behavior very much - even some trivial things do not work when building MSVC, when everything works absolutely fine on Solaris / Linux / Cygwin / Mingw using GCC from 3.4 to 4.4, Sun Studio and Intel Compilers). But not under MSVC.

    Honestly, I have no idea how to deal with the latter! Because it looks to me more like environmental problems.

I know that the issue is not well defined. I think I am a very experienced developer, and I know how to write portable and good C ++ code. But using Microsoft's native language, the tools drive me crazy about problems that I just don’t know how to solve.

: Unix- Win32 API , Microsoft?

P.S.: - , "Release With Debug Info" MSVC? ?

P.P.S.: : Win32 API, Windows GCC build .

:

, , Unix, .

, Linux Solaris , -mt -pthreads , -lpthread .

+3
4

P.S.: - , ? Debug Info Debug MSVC?

.

?

.

- MSVC,

* What am I doing wrong?

, " ".

* Where should I start?

, .

* What do I miss?

.

: " , Windows?" : , .

+6

, Windows. Windows - Unix. , , . - . . " ", , . Windows .

Windows, SO, - . p >

+2

DLL , . - DLL- , , .

, /dll. , , -.

+1

, , . , IMHO, Visual Studio Microsoft, , IDE, make, , IDE make ( ).

, , dll . " ", , DLL /OUT dll /LIB . /OUT, lib. , lib DLL , /LIB dll, MyCrossPlatformCode.lib /OUT, MyCrossPlatformCode.dll, , lib /OUT MyCrossPlatformCode.lib... ; ( OpenSSL), , (IMHO), , MyCrossPlatformCode.lib/.dll MyCrossPlatformCode_static.lib( STLPort).

, ( ) Microsoft ( stlport_vc8_x64d_static.5.1, ).

, , , , , Windows Unix; , OpenSSL STLPort .

+1

Source: https://habr.com/ru/post/1730163/


All Articles