Advertisement

Q) Compiling opengl in Visual .net

Started by October 30, 2002 09:03 AM
5 comments, last by choesh 22 years, 4 months ago
HI, I was trying to run the Lesson 1 in C++ .net, and I can''t find or how to link the OpenGL32.lib GLu32.lib and GLaux.lib into the project. So I am getting some type of _main bla bla bla errors. It worked fine in Visual C++ 6.0 , but not in C++ .net. Does anybody know about this ? Please help~!! Song, choesh
choesh
use

#pragma comment(lib, "OpenGL32.lib");
#pragma comment(lib, "GLu32.lib");
#pragma comment(lib, "GLaux.lib");

in your source code. this way is much better than including these libs by setting up the project options.
Advertisement
Thank you~!!

choesh
choesh
I didnt know you could use 6.0 projects and workspaces in .NET

You can also right-click the project name in solution explorer, then go to Properties...

Click the Linker folder on the left hand side, and go to the Input tab in that folder.

You can add your libraries to link with under "Additional Dependencies"

Yes, it''s more complicated... :-)
6.0 Projects and Workspaces will be converted to 7.0 format when you load them, but nearly everything I''ve tried can then be compiled without alteration. To start a new non .NET C++ project just create a new Win32 Project under Visual C++ Projects. You can then choose either console or windows (they were separate options in 6.0 IIRC).
Advertisement
THANK YOU ALL~!!!!!!!!!!!!!!!

choesh
choesh

This topic is closed to new replies.

Advertisement