Re: [CMake] How to link against a .dll with cmake?

2010-07-24 Thread John Drescher
> I know that target_link_libraries can be used to link a .lib ,
>
> but how to link a .dll into the project?
>
>
You do not link against a .dll in windows ever.

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to link against a .dll with cmake?

2010-07-24 Thread John Drescher
>> I know that target_link_libraries can be used to link a .lib ,
>>
>> but how to link a .dll into the project?
>>
>>
> You do not link against a .dll in windows ever.
>
When you create a .dll there is also a small import lib associated
with the dll. You link with that and when the application starts it
searches the path for each dll it needs.

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to link against a .dll with cmake?

2010-07-24 Thread andy fillebrown
mingw can link using a .dll


On Sat, Jul 24, 2010 at 11:00 PM, John Drescher  wrote:
>>> I know that target_link_libraries can be used to link a .lib ,
>>>
>>> but how to link a .dll into the project?
>>>
>>>
>> You do not link against a .dll in windows ever.
>>
> When you create a .dll there is also a small import lib associated
> with the dll. You link with that and when the application starts it
> searches the path for each dll it needs.
>
> John
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to link against a .dll with cmake?

2010-07-24 Thread John Drescher
> mingw can link using a .dll
>

I do not have much mingw experience but I have around 15 of windows
and Visual Studio experience. With Visual Studio you absolutely do not
link your application with .dlls. You use import libs with a .lib
extension the same way you do with a static lib. This import lib is
not a static lib however its much smaller. During the application load
process .dlls linked using import libraries are automatically loaded.
This is not the only way to use .dlls you can use them also without
linking but there is much more work in that.

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to link against a .dll with cmake?

2010-07-25 Thread Andreas Pakulat
On 25.07.10 00:57:14, John Drescher wrote:
> > mingw can link using a .dll
> >
> 
> I do not have much mingw experience but I have around 15 of windows
> and Visual Studio experience. With Visual Studio you absolutely do not
> link your application with .dlls. You use import libs with a .lib
> extension the same way you do with a static lib. This import lib is
> not a static lib however its much smaller. During the application load
> process .dlls linked using import libraries are automatically loaded.
> This is not the only way to use .dlls you can use them also without
> linking but there is much more work in that.

Same goes for mingw, but it has a way of extracting the import library
from a .dll, see
http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/existingDLL.html

Andreas

-- 
You are fairminded, just and loving.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to link against a .dll with cmake?

2010-07-25 Thread andy fillebrown
The documentation is not current.  Mingw can now link directly to a
.dll.  See the "direct linking to a dll" section here ...
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/win32.html


On Sun, Jul 25, 2010 at 4:35 AM, Andreas Pakulat  wrote:
> On 25.07.10 00:57:14, John Drescher wrote:
>> > mingw can link using a .dll
>> >
>>
>> I do not have much mingw experience but I have around 15 of windows
>> and Visual Studio experience. With Visual Studio you absolutely do not
>> link your application with .dlls. You use import libs with a .lib
>> extension the same way you do with a static lib. This import lib is
>> not a static lib however its much smaller. During the application load
>> process .dlls linked using import libraries are automatically loaded.
>> This is not the only way to use .dlls you can use them also without
>> linking but there is much more work in that.
>
> Same goes for mingw, but it has a way of extracting the import library
> from a .dll, see
> http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/existingDLL.html
>
> Andreas
>
> --
> You are fairminded, just and loving.
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake