Add a library to project

Psmm
Posts: 6
Joined: Wed Dec 30, 2009 10:38 am

Add a library to project

Post by Psmm »

Dear forum,

I have a question concerning the libraries in Microsift Visual C++. Usually I work on Unix, but now I'm working on Windows and I want to start a Bullet project from scratch. The problem is that now, I add a library by doing:
1. Properties->Linker->General->Additional Library Directories->"C:\path\to\bullet\msvc\8"
2. Properties->Linker->Input->Additional Dependencies->libbulletmath.vcproj libbulletdynamics.vcproj libbulletcollision.vcproj

The problem is that I get an error in the linking stage (LNK1107), which tells me that the vcproj-files are corrupted or invalid. I have search the internet, but I think I'm not linking right, is the above method the correct one?

Psmm

Edit:
I have tried pragma comment, additional dependencies, drop and drag, but nothing helped. When I dragged the file, it says 25 times: unresolved external symbol. What is the problem?
mako90
Posts: 28
Joined: Tue Jan 05, 2010 12:41 pm

Re: Add a library to project

Post by mako90 »

Hi,
if you link the libraries this way, you need them to be built. Don't link the projects, but link the libraries (.lib files).

But you may include the projects into your solution (in VS) and set the build dependencies so it will be built OK.

BR.
Psmm
Posts: 6
Joined: Wed Dec 30, 2009 10:38 am

Re: Add a library to project

Post by Psmm »

Thx for the reply!
I thought I needed the projects, because I couldn't find the libraries, but I've found them now, so everything works nice.