Jump to content
  • Advertisement
Sign in to follow this  
Techx

NeHe tutorials in Visual C++ 2005

This topic is 4828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I've been reading over the forums for a while and wanted to try out the Nehe tutorials. I have Visual C++ 2005 (beta) and according to the first tutorials instructions it says: "After you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the OpenGL libraries" Well when I go to 'New project' the ONLY option under Win32 is 'Console Application (Win32)'. How do I create a regular Win32 Application if it is not listed for me? Maybe I missed something? Help? Thanks :) -Techx

Share this post


Link to post
Share on other sites
Advertisement
Correct me if I'm wrong, but Win32 is slowly being phased out. One option is for you to bite the bullet and learn some Managed Cpp and do a Windows Forms Application.

I think I have found a workaround, though. I'm not 100% sure this works...I've got some casting errors that I don't have time to work out (I'm on lunch atm). You might want to install a compiler that has the Win32 SDK with it (like any other version of VS or Dev-C++). Then just look for "windows.h" on your hard drive and add that directory to the include directory in VS 2005 beta. (Project->Properties->Additional Include Directories). As I said, I'm not sure this works, but it will at least include the correct files. Let me know if you get it up and running.

HTH.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alpha_ProgDes
well i don't think they'll phase out Win32, GDI, or GDI+ until Longhorn comes out and they start making compilers that target that OS.
edit: sorry for being unhelpful.
edit2: i excuse my unhelpfulness, with a helpful and informative link.



hah, I followed that blog page , installed the sdk, set the paths, edited the cfg file, and it STILL doesn't work.. all i get under win32 is console application.. SIGH :/

Share this post


Link to post
Share on other sites
IIRC, after you select Win32 Console Application and click Next, you will have an option to specify the application type. Also, after you create the project, you can go into Properties and change the application type there.

Share this post


Link to post
Share on other sites
I did that and your right, i was able to select windows application, but for some reason i was not able to compile any of the sample code in the sdk or nehe.. this is why i hate coding sometimes, it's not the process of programming, it's the difficulty of setting up these damn applications that are supposed to make things easier.. Hell I'd rather use notepad and a command line compiler at this point

Share this post


Link to post
Share on other sites
Ok...the next problem im having is with this part of the tutorial:

Quote:
After you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the OpenGL libraries. In Visual C++ go to Project, Settings, and then click on the LINK tab. Under "Object/Library Modules" at the beginning of the line (before kernel32.lib) add OpenGL32.lib GLu32.lib and GLaux.lib. Once you've done this click on OK. You're now ready to write an OpenGL Windows program.


In vc++05 there is no project->settings->link tab, etc. The closest to this i can find is under project menu->(project name) properties->linker->general->additional library directories, then I add the MS SDK Lib directory to that. I compile and get this mess:

------ Build started: Project: NEHE1, Configuration: Debug Win32 ------
Linking...
Lesson1.obj : error LNK2019: unresolved external symbol _gluPerspective@32 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glHint@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glDepthFunc@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z)
Debug/NEHE1.exe : fatal error LNK1120: 14 unresolved externals
Build log was saved at "file://c:\Documents and Settings\xxx\My Documents\Visual Studio\Projects\NEHE1\NEHE1\Debug\BuildLog.htm"
NEHE1 - 15 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Share this post


Link to post
Share on other sites
I am getting the same type of errors, and I did pretty much what you did. I'll keep at it to find any fix. Let me know if you got it working.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!