[CMake] FindLibrary only looks for lib under Windows

John Drescher drescherjm at gmail.com
Wed Sep 15 12:50:21 EDT 2010


> Am Wednesday 15 September 2010 schrieb David Cole:
>> find_library always looks for *.lib files on Windows. Those are the ones
>> that need to be passed to the linker. The *.dll files are the ones that
>> need to be there at runtime in order to run correctly.
>>
>> This behavior is intended, by design, and is working correctly.
>
> IIRC at least newer versions of MinGW can link directly against dll's.
>

MinGW can do this however all versions of Visual Studio require an
import library. In VS linking to the .lib is necessary even though the
executable code is in the .dlls

John


More information about the CMake mailing list