Results 1 to 2 of 2

Thread: Compilation Error - OpenGL Superbible 4th Edition

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2008
    Posts
    1

    Compilation Error - OpenGL Superbible 4th Edition

    H, I am new to both VC++ and OpenGL. I bought the book "OpenGL Superbible (4th Edition)" and tried to compile the examples under Window Vista - MSVC++ 2008 (v9) using the project files provided. While simple exmaples compiled and run successfully, I am stucked with with example which use gltools.cpp. Compilation error

    For example, while compiling "SphereWorld" in chapter 11, i get the following compilation error:

    21 errors found while compiling gltools.cpp (example: error C3861: 'glDeleteObjectARB': identifier not found)

    The source code for this particular project is too long to be posted here. Please kindly find the source here in
    SB-AllSource.zip at http://www.starstonesoftware.com/OpenGL/.

    Please help ....

    The error message is posted below:


    ------ Rebuild All started: Project: SphereWorld, Configuration: Release Win32 ------
    Deleting intermediate and output files for project 'SphereWorld', configuration 'Release|Win32'
    Compiling...
    cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
    GLee.c
    ..\..\..\..\src\shared\GLee.c(9306) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(74) : see declaration of 'strcpy'
    ..\..\..\..\src\shared\GLee.c(9374) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(366) : see declaration of 'sprintf'
    Compiling...
    cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
    math3d.cpp
    gltools.cpp
    ..\..\..\..\src\shared\gltools.cpp(431) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : see declaration of 'fopen'
    ..\..\..\..\src\shared\gltools.cpp(474) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : see declaration of 'fopen'
    ..\..\..\..\src\shared\gltools.cpp(565) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : see declaration of 'fopen'
    ..\..\..\..\src\shared\gltools.cpp(597) : error C3861: 'glShaderSourceARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(616) : error C3861: 'glCreateShaderObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(617) : error C3861: 'glCreateShaderObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(622) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(623) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(629) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(630) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(635) : error C3861: 'glCompileShaderARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(636) : error C3861: 'glCompileShaderARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(639) : error C3861: 'glGetObjectParameterivARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(642) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(643) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(647) : error C3861: 'glGetObjectParameterivARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(650) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(651) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(656) : error C3861: 'glCreateProgramObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(657) : error C3861: 'glAttachObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(65 : error C3861: 'glAttachObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(659) : error C3861: 'glLinkProgramARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(662) : error C3861: 'glDeleteObjectARB': identifier not found
    ..\..\..\..\src\shared\gltools.cpp(663) : error C3861: 'glDeleteObjectARB': identifier not found
    sphereworld.cpp
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(149) : warning C4305: 'argument' : truncation from 'double' to 'GLfloat'
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(149) : warning C4305: 'argument' : truncation from 'double' to 'GLfloat'
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(186) : warning C4244: '=' : conversion from 'GLfloat' to 'GLint', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(186) : warning C4244: '+=' : conversion from 'GLfloat' to 'GLint', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(191) : warning C4244: '=' : conversion from 'GLfloat' to 'GLint', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(191) : warning C4244: '-=' : conversion from 'GLfloat' to 'GLint', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(195) : warning C4244: 'argument' : conversion from 'GLint' to 'GLfloat', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(195) : warning C4244: 'argument' : conversion from 'GLint' to 'GLfloat', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(199) : warning C4244: 'argument' : conversion from 'GLint' to 'GLfloat', possible loss of data
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(25 : warning C4305: 'argument' : truncation from 'double' to 'GLfloat'
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(25 : warning C4305: 'argument' : truncation from 'double' to 'GLfloat'
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(324) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(366) : see declaration of 'sprintf'
    ..\..\..\..\src\chapt11\sphereworld\sphereworld.cp p(326) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(366) : see declaration of 'sprintf'
    Generating Code...
    Build log was saved at "file://c:\Users\SonySty\Desktop\examples\projects\microso ft\chapt11\SphereWorld\Release\BuildLog.htm"
    SphereWorld - 21 error(s), 20 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

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

    Re: Compilation Error - OpenGL Superbible 4th Edition

    I am not used to MSVC9 messages, but it looks like you miss the headers for GL 2 :
    http://www.opengl.org/registry/api/glext.h
    http://www.opengl.org/registry/api/wglext.h

    If this does not help, then you have to fix how the extended GL functions are retrieved. You can have a look to glee or glew to make it easy.

    Some background on the subject :
    http://www.opengl.org/wiki/index.php...and_extensions

Similar Threads

  1. OpenGL SuperBible 7th Edition Source Code
    By yarivatias25 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-05-2016, 07:50 PM
  2. superbible edition 5 triangle move with keys error
    By superbible exsplorer in forum OpenGL: User Software
    Replies: 1
    Last Post: 05-31-2011, 05:02 PM
  3. OpenGL Superbible 5th edition example woes
    By SteveBuscemi in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 02-13-2011, 06:20 AM
  4. OpenGL SuperBible 1st edition
    By pkirk in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-20-2003, 10:37 AM
  5. OpenGL Superbible 2nd Edition
    By lobstah in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 02-26-2002, 02:21 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