943,685 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 5209
  • C++ RSS
Mar 4th, 2006
0

OpenGL in VC++ 2005

Expand Post »
I had been studying OpenGL in DevCPP all the time. Using DevCPP you link OpenGL library files libopengl32.a and libglu32.a adjusting project options. But I dont know how to do this in VC++.
Can you help me what files to link and how to link in Visual Studio 2005 for OpenGL?
Similar Threads
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
AhmedHan is offline Offline
71 posts
since Apr 2005
Mar 4th, 2006
0

Re: OpenGL in VC++ 2005

Install the Win32 platform SDK, and link in OpenGl32.lib
I don't think you need to do anything else.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Mar 4th, 2006
0

Re: OpenGL in VC++ 2005

though you may also want Glu32.lib
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Mar 5th, 2006
0

Re: OpenGL in VC++ 2005

It is well explained in MSDN :

Quote ...
To add .lib files as linker input in the development environment

Open the project's Property Pages dialog box. For details, see -Setting Visual C++ Project Properties.
-Click the Linker folder.
-Click the Input property page.
-Modify the Additional Dependencies property.
To programmatically add .lib files as linker input
Thanks everybody!
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
AhmedHan is offline Offline
71 posts
since Apr 2005
Mar 5th, 2006
0

Re: OpenGL in VC++ 2005

And also,
C++ Syntax (Toggle Plain Text)
  1. #pragma comment(lib, "opengl32.lib");
  2. #pragma comment(lib, "glu32.lib");
may be added at the beginning of the program code as an alternative.
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
AhmedHan is offline Offline
71 posts
since Apr 2005
Mar 5th, 2006
0

Re: OpenGL in VC++ 2005

yes, but that makes your sources compiler dependent, something you should if possible try to avoid
Better let the linker config handle such details.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Constructor Error
Next Thread in C++ Forum Timeline: Intel OpenCV





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC