A pretty newbie question linking openGL library

Started by
6 comments, last by daviangel 15 years, 9 months ago
Ok, believe me I have been researching to try to avoid posting such a newbie question, but I can't seem to find the answer. This is my first post on GamveDev.net, so this is my hello too. After a couple years of soul searching and research I finally decided to dive head first into trying to build a portfolio and get into the game industry. My first step been trying to teach myself OpenGL. Seems like a good place to start. My school (I'm a senior Bachelor in CS) does not really teach graphics OR development environments (VI and Emacs only; builds character), so I'm teaching myself. I bought some books and have found a lot of tutorials. For my last internship as a QA tester we used Visual Studio 2008, which I loved (wow, an actual debugger, instead of manual breaks and cout's. Still blows my mind). I've also been dabbling in Visual C++ express. So here is my problem (questionable teaching paradigms aside): The first stem is almost any OpenGL tutorial I have found is linking the library. The instructions are very clear. Open the project menu, click settings, go to the link tab. My problem? I see no settings option in the project menu. I've tried in VS2008 and Visual C++. The closest thing I could find is properties, but that doesn't have what I'm looking for. I first thought maybe I set up the project wrong in the first place, but that makes no sense to me, it seems you ought to be able to link a library no matter how you set it up. Like I said, this is my FIRST dabbling in openGL (or any visual library outside of your basic java window stuff), and my FIRST post on gamedev.net. I hate sounding ignorant, and hate bugging people. :) But maybe that is why I am where I am, I feel uncomfortable asking questions, and need to get over it. Any one have any idea what I'm doing wrong?
Advertisement
Visual Studio:

right click in the Solution Explorer on your project.
properties
Configuration Properties
Linker

On the General section fill in "Additional Library Directories"
these are the directories in which your OpenGL libs appear

On the Input section fill in "Additional Dependencies"
these are the names of your actual additional libraries.

You can also find this information on msdn somewhere or in the built in help. Its going to be slightly different for each edition of Visual Studio. Mine are from VS2005 which is what we use at work. But, in short, RTFM [smile]

-me

I think school should start teaching some real world IDE, maybe just one session. When I was in school we also use emacs with gcc and gdb, but we use some Visual Studio.
Ok, I'm going to go back through the manual. Maybe I just am not looking for the right thing.

As for what has been said so far, I can get to Configuration Properties, but the only thing in that drop down is configuration. I'm going to keep researching though. But if anyone else knows where to go from here, let me know. Like I said, I'm worried I might have set something up wrong.

P.s This is the free version of VS that students can get. Don't know if that matters.
Your solution tree should be something like this

Solution ... (number of project)
+ Project A
+ Project B
.
.
.



did you right click on the project? Visual studio let you configure on a solution level and project level, linking belong in the project level.
Here's how I do it in Visual C++ 2008 Express. This assumes you've already added the directories (Tools->Options->Projects and Solutions->VC++ Directories). Since my drawing is incredibly sloppy, here's what those three steps say:
1. Right click (project).
2. Click (properties).
3. Navigate (Configuration Properties->Linker->Input) & Add (opengl32.lib, glu32.lib, etc.).

Here are those steps semi-visually: http://i353.photobucket.com/albums/r384/sotsilent/AddingDependencies.jpg

[Edited by - sotsilent on July 14, 2008 5:25:07 PM]
Aaand...there was the problem. Ugh. Looking too deep again.

Thank you, thank you, thank you. I hate making dumb little mistakes like that. But thanks for indulging my inexperience. :)

Yea, I was looking at the solution instead of the project. Thanks again, that was getting discouraging.
Here's some nice screenshots for future reference:
OpenGL with Visual C++ 2008 Express Edition
And common errors newcomers make here
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

This topic is closed to new replies.

Advertisement