Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
i want add #include<gl\glut.h> in visal studio
Posted
Comments
Mohibur Rashid 24-May-12 21:11pm    
well, in project property you can assign your extended header and extended .lib files as required.
Anderso0on 24-May-12 21:40pm    
how i do that pleace tell me step by step
Mohibur Rashid 24-May-12 23:05pm    
I tried to avoid telling you all the steps, google is your friend. and when you reply to a comment use the reply button associate with the comment otherwise it wont send me any notification

This is a misconception. You never install anything in Visual Studio when you do it. You need to understand what is linking a library:
http://en.wikipedia.org/wiki/Linker_%28computing%29[^],
http://en.wikipedia.org/wiki/Library_%28computing%29[^].

—SA
 
Share this answer
 
Stick the .h, .lib and .dll (if there is one) somewhere. I'd suggest somewhere parallel to where your code is so you find the files with a relative path

EITHER

- Extend the environment for path (for finding the DLL), LIB and INCLUDE to include the path to where you've dumped the files, then add the library to project properties->Input->additional dependencies or make it part of the project

- Use project properties->VC++ Directories to do the same thing, then add the library to project properties->Input->additional dependencies or make it part of the project

- Use project properties->C++->general->Additional Include Directories to specify where the .h is, project properties->Input->additional dependencies to specify the path to the library or make it part of the projects. Then you'll have to manually copy the DLL to your release/debug directory to be able to run it

Another option is to download the source and add a project to your solution. If you do that you'll have to tell the compiler where the includes are but not have to fiddle around with the library path.

That's enough options for now, without knowing what the project's for it's hard to recommend a configuration.
 
Share this answer
 
 
Share this answer
 
Comments
Anderso0on 24-May-12 22:13pm    
thanks alot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900