Thread creation, the CRT and DLL's how is it meant to be done?

后端 未结 2 563
终归单人心
终归单人心 2021-02-10 14:54

So I understand that CreateThread and the CRT can result in memory leaks, signal doesn\'t work, and one should use the _beginthread or _beginthreadex functions.

That is

2条回答
  •  没有蜡笔的小新
    2021-02-10 15:18

    There are two options:

    1. Do not use CRT from the DLL.
    2. Ship multiple DLLs, one for every supported tool-chain version.

    Where 1 is not an acceptable solution, 2 is chosen. Note that you have to ship multiple DLLs anyway, e.g. if your users compile for 32-bit and 64-bit architecture.

提交回复
热议问题