Results 1 to 6 of 6

Thread: Opening Program elsewhere

  1. #1
    Member Newbie
    Join Date
    Mar 2002
    Posts
    34

    Opening Program elsewhere

    I'm writing an opengl program in an MDI application using visual C++ version 6.0
    When I work on the program at work and then take it home, it works fine. But when I work on it at home and then try to run it again at work, I get errors when I compile.

    Here's some of the errors:
    :\Windows\Desktop\Heart Program newest\TestGLView.cpp(227) : error C2065: 'glEnable' : undeclared identifier
    C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(229) : error C2065: 'glClearColor' : undeclared identifier
    C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(231) : error C2065: 'glClearDepth' : undeclared identifier
    C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(234) : error C2065: 'glLightfv' : undeclared identifier
    C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(271) : error C2065: 'glBegin' : undeclared identifier

    In fact, every error I get is of this sort. That the OpenGL commands are undeclared identifiers. I checked if the headers files were included and they were. I also checked if the appropriate libraries were linked and they were. Its the exact same program, works fine at home but screws up at work after it has been run at home. Its also the exact same version of visual C++. Anybody know what the problem is and how I could fix it?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: Opening Program elsewhere

    I checked if the headers files were included and they were.
    you checked that the headers were included in TestGLView.cpp? did you also check in VC98/include/GL for the headers?

    Note: headers are in GL subfolder under the include dir. make sure you have:
    #include <gl/gl.h>

    b

  3. #3
    Member Newbie
    Join Date
    Mar 2002
    Posts
    34

    Re: Opening Program elsewhere

    Yup...
    already checked for all that. The thing thats getting me is that it works fine at work, then fine at home, but when it comes back to work after being used at home, only then do these errors come. I'm not sure what the problem is.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Holland
    Posts
    179

    Re: Opening Program elsewhere

    What I usually do is just take the cpp and h files back and forth between work and home and leave the M$ Project related files on both installations (do not exchange these). You do have to duplicate all the file additions to the project and other project setup though.
    Another thing that may help is to clean up the intermediate files and do a complete rebuild, or you could get rid of the precompiled stuff (and the stdafx or whatever - not just the include, but it has to be removed from the project properties too!).

    If that does not work then it probably has something to do with the general properties of M$ Visual Studio, not the project related stuff. Compare the setups on the worksite and at home to try and find the differences

    Good luck,

    Jean-Marc.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Opening Program elsewhere

    This is just a thought, but did you put the #include <GL/gl.h> into stdafx.h? Maybe you are running into a problem related to precompiled headers, or some such thing. Try to use Build->Clean, and then attempt compiling.

    Other than that all I can say is that it really just sounds like #include <GL/gl.h> isn't in that cpp file.
    Deiussum
    Software Engineer and OpenGL enthusiast

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: Opening Program elsewhere

    I agree with JML and Deiussum. Clean intermediate files then do a build. Also only transfer your C/CPP and H files (and your resource files if you have any).

    Just a thought. Do your paths to files at home and at work match? It could be that your home version of M$ VC is playing around with some path in the files you transfer.

Similar Threads

  1. Opening door...
    By gamerixe in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-04-2003, 04:41 AM
  2. Windows opening everywhere. :/
    By in forum OpenGL: Linux
    Replies: 0
    Last Post: 03-19-2003, 08:28 AM
  3. Opening 3ds files in Mac OSX, using CFM
    By in forum OpenGL: macOS
    Replies: 1
    Last Post: 12-16-2002, 11:09 AM
  4. Job Opening
    By Brian Lenihan in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 07-23-2002, 07:28 AM
  5. problem opening gl with w2k pro
    By in forum OpenGL: User Software
    Replies: 2
    Last Post: 01-27-2002, 05:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean