Box2d for Qt 4.7
I am using Qt4.7. I was able to build Box2d for Visual Studio. But how can I use the header & lib开发者_开发知识库rary files of the Box2d in Qt project.?
To add header file directory to your Project:
1. Right click on the project in the 'Solution Explorer' and select 'Properties'
2. Click 'C/C++'
3. Give the directory you want to include in the 'Additional Include Directories' - box, separate it from the others with a semicolon
4. Click Ok
To add library files to your Project:
1. Right click on the project in the 'Solution Explorer' and select 'Properties'
2. Click 'Linker'
3. Insert the custom import libraries into the 'Additional dependencies' Box, Note that if your paths contain spaces, you must use Quotations around the path. This is because the list is separated with spaces.
4. Click Ok
I don't remember if Box2d is a static or dll library, but in either case you need the .lib file. Unless you load it run-time, which I doubt.
If you want to know why, JGI!
精彩评论