Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: GLUT and macro redefinition errors

  1. #11
    Junior Member Newbie
    Join Date
    Nov 2007
    Posts
    11

    Re: GLUT and macro redefinition errors

    Ok, cheers Stephen.

  2. #12
    Junior Member Newbie
    Join Date
    Nov 2007
    Posts
    11

    Re: GLUT and macro redefinition errors

    Ok then, next problem that I have no idea of the source of...

    I downloaded CodeBlocks (or should I say Code::Blocks) (the version with MINGW compiler) and opened a new OpenGL application project. Then I pasted the code from this OpenGL tutorial (http://www.gmonline.demon.co.uk/cscene/CS5/CS5-03.html) which is the same code I was trying to get working in PellesC and built the project. However, it doesn't build, it says:

    Switching to target: default
    Compiling: main.cpp
    mingw32-g++.exe: installation problem, cannot exec `cc1plus': No such file or directory
    Process terminated with status 1 (0 minutes, 0 seconds)
    0 errors, 0 warnings

    which to me doesn't look like a problem with the code. But what do I know. Maybe there was something else (containing cc1plus) that I should have downloaded?

    Any suggestions?

  3. #13
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: GLUT and macro redefinition errors

    Well even is Dev-C++ is not maintained anymore, at least it works out of the box, that is not the case of all IDEs apparently ...

  4. #14
    Junior Member Newbie
    Join Date
    Nov 2007
    Posts
    11

    Re: GLUT and macro redefinition errors

    Tomorrow I shall try it in Dev-C++ (I can only hack mucking about with one new IDE per night) but only so long as a war doesn't break out between the supporters of each one.

    To be fair, as an absolute beginner in OpenGL my needs will be very simple for now as far as IDEs are concerned.

  5. #15
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: GLUT and macro redefinition errors

    Nah, I am just stuffing posts, so the number goes above nexusone with 2096

  6. #16
    Member Regular Contributor
    Join Date
    Oct 2006
    Posts
    349

    Re: GLUT and macro redefinition errors

    Quote Originally Posted by AndyCav
    Ok then, next problem that I have no idea of the source of...

    I downloaded CodeBlocks (or should I say Code::Blocks) (the version with MINGW compiler) and opened a new OpenGL application project.
    Edit: re-read your post. Maybe try updating to the latest version, found in the forums? The one with mingw bundled is over two years old. Now that you have the compiler, it should be simple to upgrade. Alternatively, search http://mingw.org for the missing file.

    True, downloading Dev-C++ might save you some hassle, but it's buggy and it uses an old version of MingW. And in any case, it's a good idea to learn how to setup the compiler toolchain - it's depressing how many people call themselves programmers and don't even know the difference between an IDE and a compiler (e.g. "I use the Visual Studio compiler", ugh!)

  7. #17
    Junior Member Newbie
    Join Date
    Nov 2007
    Posts
    11

    Re: GLUT and macro redefinition errors

    Quote Originally Posted by ZbuffeR
    then don't waste time :
    http://www.bloodshed.net/dev/devcpp.html

    Within Dev-C++, in menu Tools, Check for updates/packages, then community packs or something. I recommend the freeglut examples (modern opensource GLUT).
    Then File, new project, multimedia tab, freeglut. F9. It works.
    Righty then, I'm back for more punishment. ZbuffeR, I downloaded Dev-C++, and updated with the freeglut file. However, it doesn't compile and complains that:

    15 C:\Dev-Cpp\main01.cpp GL/glut.h: No such file or directory.

    So, obviously it can't find GLUT. So, can I ask what exactly do I do to let it find it. I can see a few places in the compiler options which look like I could add some kind of path to but I don't know EXACTLY what to do.... help!

  8. #18
    Junior Member Regular Contributor
    Join Date
    Jun 2006
    Location
    Edinburgh - Scotland
    Posts
    147

    Re: GLUT and macro redefinition errors

    Quote Originally Posted by Stephen A
    it's depressing how many people call themselves programmers and don't even know the difference between an IDE and a compiler (e.g. "I use the Visual Studio compiler", ugh!)
    Hehehe...Reminds me of 3rd year at uni. We had people trying run their source code when the moved onto a Linux system from Windows.

    As for AndyCav's problem, sorry never used Dev-c++, but I wonder what the point is in trying to get this to work....If you can't solve problems like this then what are you actually going to write? Not very helpful I know, but...

    --Stu!

    Edit: So at least there is some useful content. Another option is to install cygwin and compile all this from the command line using good old gcc/g++. Then you have total control (so -I <inc path> to tell it where to get header files etc.)

    I then use Eclipse for my IDE (with the vi plugin 8-), svn for version control and autoconf for build/packaging.


  9. #19
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: GLUT and macro redefinition errors

    Did you install the relevant 'Community Packages' ?
    How to do this :
    http://molhanec.net/devcpphelp/packages.php

    The packages you will probably need :
    - freeglut (opensource GLUT, should solve your glut.h problem)
    - sdl

    Not sure if these are in, search for matching strings :
    - glew
    - glfw
    - opengl
    - everything *gl*

  10. #20
    Junior Member Newbie
    Join Date
    Nov 2007
    Posts
    11

    Re: GLUT and macro redefinition errors

    Well, I just updated Dev-C++ with the package "glut" and that appears to have solved it for Dev-C++; I have spinning cones and spheres on the screen. Cheers for the help.

    Stu, I know what you mean but then where do I start?! I mean I want to start learning OpenGL, but first I have to get something working so I can even just run the example code you find in tutorials and the like - and I couldn't even get that running so I couldn't even start learning. It's a catch-22.

    Was anyway. It's all a bit complicated if you don't already know exactly how this stuff works. For example - I just finally got the freeglut thing to work after being advised to dowload it, but I didn't know (as silly as it may seem) that you also have to download another package just called "glut". It wasn't *obvious* to a beginner.

    I'm quite amazed that there isn't just some software you can download as one unit that'll allow you to do this stuff without having to know how to add in extra packages, tell various things like linkers, compliers and other robots where to find their necessary files, update with the latest versions etc! I realise that these IDEs are designed to have maximum potential for modification and stuff so that inevitably they are like this, but it makes it rather prohibitive to beginners. Well, beginners who are trying to pick it up on their own anyway!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •