При связывании общей библиотеки, как CMake узнает, следует ли связать файл *.so или файл *.dllC++

Программы на C++. Форум разработчиков
Гость
При связывании общей библиотеки, как CMake узнает, следует ли связать файл *.so или файл *.dll

Сообщение Гость »


i write a shared lib,named libTest.dll(windows) and libTest.so(ubuntu),when a executable program link the shared lib.how did i write the cmakelists.txt,just give the lib name 'Test' ,then it can automatically link to the correct shared lib like boost.

I also really want to know why, when link to the boost library, only a key name is needed, then cmake can link to the correct platform's library.


Источник: https://stackoverflow.com/questions/781 ... ile-or-a-d

Вернуться в «C++»