0

I am using the Coin 4.0.0 library (https://github.com/coin3d/coin) for a certain project. When building that library using CMake, I get amongst others the following files:

bin
|-- Coin4d.dll
`-- Coin4d.pdb
lib
|-- Coin4d.lib

Which looks fine to me. Then, we are using qmake to build our final executable. In my qmake .pro file I have

LIBS += -lCoin4d

However, when the final .exe is linked together using the Visual Studio 2015 linker, then I see that it first searches for (and finds) Coin4d.lib:

Searching D:/SVN/simcad/trunkd/ThirdParty/Coin/install/lib\Coin4d.lib:

However, a bit later, I get the linker error

LINK : fatal error LNK1104: cannot open file 'Coin4sd.lib'

Mind the extra 's' in the library file name here!

I have no idea why the linker is also looking for Coin4sd.lib after it found Coin4d.lib. I would like to systematically find this out, but don't know where to start.

So my question is: what tools/commands can I use to systematically find out why my linker is also searching for Coin4sd.lib after it apparently first found Coin4d.lib? Should I investigate the libraries that are used to build the final executable too, and check if any of those somehow refer to Coin4sd.lib?

  • As you are using `MSVC` linker you can add the `/VERBOSE` option to find out what function /translation unit is requesting the debug version of the static Coin library `Coin4sd.lib`. – vre Feb 24 '20 at 10:47

1 Answers1

1

I found out that I was using COIN_DLL as define, which apparently caused me to have the Coin4d.* filenames. When I use COIN_NOT_DLL then if I understand things correctly, the static version of the library (which has filename Coin4sd.*) gets built and then my linker no longer complains.