Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Lode

NeHe tutorials and devc++

This topic is 5986 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

Please help me, I''d like to be able to use the NeHe tutorials with devc++. I know VC++ exists and I know it''s better, but I''m not going to buy it. I don''t even manage to compile tutorial #1 under devc++! I did everything I read in old posts, and I still get linker errors. Some day I''m gonna @|#*!§ this linker! I added in the code: #ifndef CDS_FULLSCREEN #define CDS_FULLSCREEN 4 #endif And I added in Further object files: -lopengl32 -lglu32 -lglaux And acording to older posts supposed to work then, but I STILL get 3 linker errors! d:\programmeren\devcpp4\myprojects\ogltest\ogltest\main.o(.text+0x854):main.cpp: undefined reference to `ChoosePixelFormat@8'' d:\programmeren\devcpp4\myprojects\ogltest\ogltest\main.o(.text+0x898):main.cpp: undefined reference to `SetPixelFormat@12'' d:\programmeren\devcpp4\myprojects\ogltest\ogltest\main.o(.text+0xc2f):main.cpp: undefined reference to `SwapBuffers@4'' So that''s ChoosePixelFormat@8, SetPixelFormat@12 and SwapBuffers@4. Am I the only one getting this? I''m using Devc++ 4.

Share this post


Link to post
Share on other sites
Advertisement
looks pretty much like you didn''t use a Win32 project. You must build it as Win32 App(not Console)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I just want to add that yesterday I also tried to get those Nehe´s first tutorial with Dev-C++ and i got the same errors than Lode...

Share this post


Link to post
Share on other sites
That is strange. That shouldn''t happen. I have the same setup and it works fine. I did a search on MSDN and found that these are the required files:

Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.

Your problem may be that you didn''t create the project correctly. When you are doing the tutorial, do you create a new project? if so, do you create an OpenGL or Windows project?

I choose the OpenGL template. I think this automatically includes those files above.

Also you can open your project file in a text editor(the .dev file) and see if it is set up correctly. Here is mine:

[Project]
FileName=Lesson6.dev
Name=Lesson6
Type=0
Ver=1
ObjFiles=
Includes=
Libs=
Resources=
Compiler=
Linker=-lopengl32 -lglu32 -lglaux
IsCpp=1
Icon=
UnitCount=1

[Unit1]
FileName=Lesson6.cpp
Open=1
Top=1

[Views]
ProjectView=1


---
Make it work.
Make it fast.

"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home

Share this post


Link to post
Share on other sites
quote:
Original post by t0bi
looks pretty much like you didn't use a Win32 project. You must build it as Win32 App(not Console)


Heh, that's it! I just turned on "Do not create a console" and it works.

Thanks.

BTW I had started with an "Empty project", I hadn't even seen the opengl temlate yet, good to know it exists!



[edited by - Lode on May 30, 2002 8:52:45 AM]

Share this post


Link to post
Share on other sites
I am appraently missing something here.
What''s the distiction between VC++ and devc++ ?
To me, Microsoft Developer''s Studio is just an environment, it''s not a language. However, I know in practice people see the developer''s studio as one product with many components (including VB, SourceSafe et al) , and they often use VC++ and MSDEV interchangibly.

Is devc++ refering to the student edition of Developer Studio?

Never speak in absolutes.
-me

Share this post


Link to post
Share on other sites
quote:
Original post by Eric_Conspiracy
I am appraently missing something here.
What''s the distiction between VC++ and devc++ ?

Is devc++ refering to the student edition of Developer Studio?

Never speak in absolutes.
-me


Yeah, you are missing something. DevC++ is a free compiler.
A search in google reports the first hit as:

http://www.bloodshed.net/devcpp.html

quote:
To me, Microsoft Developer''s Studio is just an environment, it''s not a language.


MS Dev Studio is an enviroment, that includes Visual C++, that is a compiler of the C++ language.

quote:

However, I know in practice people see the developer''s studio as one product with many components (including VB, SourceSafe et al) , and they often use VC++ and MSDEV interchangibly.



Yes, DevStudio is a product with many components but from my knowledge, is not possible to buy VC++ without MSDEV, so that''s why people use their names interchangibly.

Share this post


Link to post
Share on other sites
Sweet, this topic helped clear up my problems. Dev C++ is awesome! It''s amazing how a program like this can still be free.

Also, has anyone noticed the difference in file sizes between VC++ 4.0 and Dev-C++ 4.0? With VC++, the code from lesson 1 compiled into a 97 KB executable file, while Dev-C++ compiled the same code into an 8 KB file!

Share this post


Link to post
Share on other sites
Yup, none is better or worse, they're just different, its just a matter of learning how to use em.
now regarding size it is true Mingw makes smaller executables if you compile "right out of the box" on both, but if you tweak the compiler options a little you will get smaller exes from MSVC, compiling on debug mode (the default on msvc) always generates bigger exes, this is true for Mingw too, but you have to turn on debugging mode with the -g flag.

I advocate and use Mingw for my personal projects.



[edited by - kwizatz on June 3, 2002 11:15:43 AM]

Share this post


Link to post
Share on other sites

  • 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!