[CMake] Lnk 1104 with nmake, and the lib prefix

Alain Leblanc aalebl at gmail.com
Wed Sep 23 15:24:04 EDT 2009


2009/9/20 Philip Lowman <philip at yhbt.com>:
> On Sun, Sep 20, 2009 at 9:33 PM, Alain Leblanc <aalebl at gmail.com> wrote:
>>
>> Thanks for the reply. I'm experienced with GCC, but just really
>> starting with VC++, and I should probably spend more time learning it.
>>
>> I am using FindBoost and I know it  finds my boost installation ok
>> otherwise cmake would fail. Since I sent my email, I noticed that my
>> boost lib directory contained all the boost_XXX.lib files, but not the
>> libboost_XXX.lib. Both versions of the files come with boost. So I
>> installed them but still no luck.
>
> The libboost_* are static libraries.  You will need them if you want to link
> against boost statically.  Also make sure your Boost_USE_STATIC_LIBS is set
> accordingly before you call find_package() (see FindBoost documentation).
> However if in the add_library() call
>
>>
>> I used the STATIC option instead of SHARED then the library would
>> build without problems.
>
> Static libraries often build just fine if they depend on other libraries
> because linking is deferred until an executable is built.
>
> Shared libraries on MSVC require some preprocessor statements to work
> properly to export functions/classes.  The following page might be useful.
> http://www.itk.org/Wiki/BuildingWinDLL
>
>
> --
> Philip Lowman
>

Thanks for the link. I was looking for something like this.

a


More information about the CMake mailing list