Ooops
January 21, 2021, 01:56:28 AM

Author Topic: DEVC++ and glut  (Read 3861 times)

Offline cpsmith0191

  • Jr. Member
  • **
  • Posts: 73
    • caroleandcarl
DEVC++ and glut
« on: September 21, 2017, 10:29:59 PM »
As a beginner moving on from text based C++ I found GLUT easier to understand than opengl and a good place to start for ' learn ye 2d graphics'.
One slight problem, can't get past '#include <GL/glut.h>' as attempts to compile produce an error at this point.
I used the 'package manager' from 'tools' to install the glut7.6-3.devpak.
I'm running DEVC++5.10 under windows10 and c:\dec-cpp\include\GL\glut.h exists.
I've tried various solutions as described on the web, including ensuring that the correct files are linked under project/parameters/library.
Any ideas appreciated as I'm new to devc++ and feel tempted by the dark side (going back to visualC++), have fun cps.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: DEVC++ and glut
« Reply #1 on: September 21, 2017, 10:45:03 PM »
c:\dec-cpp\include\GL\glut.h exists.

Probably just some typo errors?
Code: [Select]
c:\Dev-cpp\..?
Is this your first time using MinGW and IDEs?

Offline cpsmith0191

  • Jr. Member
  • **
  • Posts: 73
    • caroleandcarl
Re: DEVC++ and glut
« Reply #2 on: September 21, 2017, 11:19:26 PM »
Thanks for the input. This is my second install (after uninstalling the first) and is in C:\Dev-Cpp\ the first was in C:\programm files(x86).
I've written (tweaked examples) using windows application, console application and openGL and all compile under this installation and under the previous installation. I've double checked and I run C:\Dev-Cpp\devcpp.exe to start the IDE.
I am an absolute beginner in C++ my only previous experience being under VisualC with a dabble in objectiveC with cocoa (mac).
Is your reply a hint? is  '-' an illegal character in a file spec? long time since I had to think of this sort of thing, have fun cps

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: DEVC++ and glut
« Reply #3 on: September 21, 2017, 11:39:58 PM »
Thanks for the input. This is my second install (after uninstalling the first) and is in C:\Dev-Cpp\ the first was in C:\programm files(x86).
I've written (tweaked examples) using windows application, console application and openGL and all compile under this installation and under the previous installation. I've double checked and I run C:\Dev-Cpp\devcpp.exe to start the IDE.
I am an absolute beginner in C++ my only previous experience being under VisualC with a dabble in objectiveC with cocoa (mac).
Is your reply a hint? is  '-' an illegal character in a file spec? long time since I had to think of this sort of thing, have fun cps

Sure thing and I see. I do suggest using CodeBlocks instead for IDE as I'm assuming that you will be relying on 3rd party libraries (SDL2, OpenAL, etc) eventually or probably sharing your work at some point and creating a build system for your projects. Most open source projects use CMake (or premake) for their build and I don't think there's enough support for Dev-Cpp as a dev environment.

Going back to your problem, I think this is just Dev-Cpp not seeing the include directories, same setup with Visual Studio.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: DEVC++ and glut
« Reply #4 on: September 22, 2017, 12:04:41 AM »
Is your reply a hint? is  '-' an illegal character in a file spec? long time since I had to think of this sort of thing, have fun cps

The '-' character is fine. Actually, I have Dev-Cpp MinGW64 version (OrwellDevCpp) installed (C:\Program Files (x86)\Dev-Cpp) as well and have used it on older projects, but haven't used it for a long time.  ;)

Offline cpsmith0191

  • Jr. Member
  • **
  • Posts: 73
    • caroleandcarl
Re: DEVC++ and glut
« Reply #5 on: September 22, 2017, 10:01:15 PM »
As I'm just starting with C++ I'll side step the problem for now, by taking your advice and using a different/better supported IDE.
I will at some point have a look at how the DEVC IDE identifies the include directory so thanks for the suggestion.
So back to installing an IDE and matching it to a third party graphics library. I seem to remember running into a similar problem with Borland C that put me right off C.
Last time I jumped ship and ran with Blitz Max, hopefully I'll stay the course this time. Many thanks for your input, have fun cps.

Offline dawlane

  • Full Member
  • ***
  • Posts: 189
Re: DEVC++ and glut
« Reply #6 on: September 22, 2017, 11:10:32 PM »
I didn't think that DevC++ was still around. If I remember it was written in Delphi 6. As for CodeBlocks, it's OK, but code completion has been known to have issues.
As for issues with not finding files, check that the required directories are set in your project and compiler options.
Another IDE is CodeLite

Just installed DevC++ and it's buggy. Tried creating glut project and it failed to set anything up.
Edit:
Quote
Just installed DevC++ and it's buggy.
It's incredibly buggy and many of the packages are not complete.

Offline cpsmith0191

  • Jr. Member
  • **
  • Posts: 73
    • caroleandcarl
Re: DEVC++ and glut
« Reply #7 on: September 23, 2017, 08:29:10 PM »
Of course I couldn't resist fiddling and I've tried using the DEVC++ environment options to manually add search directories for include and lib. This cured the original hang point  ('couldn't find glut.h')  but then another hang point occurred near the end of the compilation.
So now I'm going to try out some of the suggested IDE's. Yes I really am.. no I'm not going to have one more go at getting the glut libs recognised.  The future is bright and the future is C++ ( but not DevC++). Once again many thanks, have fun cps
PS Gone with codeblocks, installed glut, fiddled with settings (#include windows.h in basic framework) all fine... Thanks!

Offline EdzUp

  • Jr. Member
  • **
  • Posts: 88
    • EdzUp
Re: DEVC++ and glut
« Reply #8 on: September 24, 2017, 01:05:24 PM »
Dont use Dev C++ if your serious about using C++ I would get Code::Blocks and use that it has a handy basic OpenGL template that would set it up for your input. If your hellbent on using GLUT (which is deprecated now) look at FreeGLUT which is more up to date and has loads of tutorials and examples.

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: DEVC++ and glut
« Reply #9 on: September 24, 2017, 05:47:34 PM »
Dont use Dev C++ if your serious about using C++ I would get Code::Blocks and use that it has a handy basic OpenGL template that would set it up for your input. If your hellbent on using GLUT (which is deprecated now) look at FreeGLUT which is more up to date and has loads of tutorials and examples.
EdzUp, Dev C++ is one of the first C++ IDE you used to use.
I remember you mentioned that at the old Blitz forums if I am not mistaken!
It is outdated and I second your opinion.
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline cpsmith0191

  • Jr. Member
  • **
  • Posts: 73
    • caroleandcarl
Re: DEVC++ and glut
« Reply #10 on: September 24, 2017, 09:07:47 PM »
Reasons for using DEVC++: It meets ISO standard for C++ and it came free with a book I've got ' beginng C++ game programing' (dated 2004). Reasons for using GLUT: I'd prodded it a little previously and its easy to follow the syntax ( I'm sure I saw ref to it in 'blitz max' source code but I may be dreaming).
So many traps for the novice, so much goes out of date so fast. I'll take note and have a look at the openGL template in code blocks. You never know I may actually produce something other than chunks of C++ that do the maths equivalent of 'Hello World'.
Thanks for all input, have fun cps.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: DEVC++ and glut
« Reply #11 on: September 25, 2017, 01:00:45 AM »
Reasons for using DEVC++: It meets ISO standard for C++ and it came free with a book I've got ' beginng C++ game programing' (dated 2004). Reasons for using GLUT: I'd prodded it a little previously and its easy to follow the syntax ( I'm sure I saw ref to it in 'blitz max' source code but I may be dreaming).
So many traps for the novice, so much goes out of date so fast. I'll take note and have a look at the openGL template in code blocks. You never know I may actually produce something other than chunks of C++ that do the maths equivalent of 'Hello World'.
Thanks for all input, have fun cps.

Here's a curated list that can get you started, which seems popular on GitHub, so you don't stumble into outdated C++ stuff again.  ;D

The only funny thing is Dev C++ is still listed there, but I think that's for posterity reason and it's the Orwell version that I have and pointed out earlier.

Quote
A curated list of awesome C/C++ frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

https://github.com/fffaraz/awesome-cpp

Offline cpsmith0191

  • Jr. Member
  • **
  • Posts: 73
    • caroleandcarl
Re: DEVC++ and glut
« Reply #12 on: September 25, 2017, 08:16:10 PM »
Awesome.. well named. I'll try to resist it while I hone my skills, but I can feel Nivarna tugging. Thanks for the pointers, have fun cps

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: DEVC++ and glut
« Reply #13 on: September 26, 2017, 08:37:50 AM »
Awesome.. well named. I'll try to resist it while I hone my skills, but I can feel Nivarna tugging. Thanks for the pointers, have fun cps

Sure thing and glad this helped somehow. :)

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal