Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: problem with OpenGL superbible book (6th edition)

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2014
    Posts
    11

    problem with OpenGL superbible book (6th edition)

    Hi, i started read this book ( OpenGL superbible: Comprehensive Tutorial and reference (6th edition) ) but, at the first soucre code:
    Code :
    // Include the "sb6.h" header file
    #include "sb6.h"
    // Derive my_application from sb6::application
    class my_application : public sb6::application
    {
    public:
    // Our rendering function
    void render(double currentTime)
    {
    // Simply clear the window with red
    static const GLfloat red[] = { 1.0f, 0.0f, 0.0f, 1.0f };
    glClearBufferfv(GL_COLOR, 0, red);
    }
    };
    // Our one and only instance of DECLARE_MAIN
    DECLARE_MAIN(my_application);

    i have an error in sb6.h it doesnt exists. so, i have downloaded a sb6 folder ( https://github.com/openglsuperbible/sb6code ) but i dont know, how to install it? I tryed to move all includes to my include folder (C://Microsoft VisualStudio 2010//VC//include

    but now, iam getting about 20 link errors.

    btw. i tried to start the sb6 in visual studio and click "F7" but, 1 suceeded, 73 failed. the error for that is "Specified platform toolset (v120) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected."
    Last edited by Kalir44; 08-08-2014 at 12:40 PM.

  2. #2
    Junior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    153
    This issue has been posted multiple times already. Apparently the sample source does not include the headers and libaries.

    A few hints:

    1. You don't move header files to the visual studio include directoy. Also, you don't move libraries to system32. The header files go to a subdirectory in the project directory. MSVC and other IDEs have compiler include directory configurations. Same goes for libraries.
    2. You get linker errors beacuse the functions declared by sb6.h are defined in some library that you are still missing
    3. A header file normally doesn't contain function definitions, you don't compile and run a header file.
    4. It is adviseable to study the C programming language that you decided to use at frist instead of immedately jumping at OpenGL(R) while learning C at the same time

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2014
    Posts
    11
    So, which one libraries are still missing? I dont know :/

    Is there anyone, who rode that book?

  4. #4
    Junior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    153
    The sb6 library. Compiling the sb6 solution should generate the sb6 library along with the book samples (is that the one that sb6 that you tried to compile?). If so, the error message above propably referes to the Windows(R) platfrom SDK. You might want to install it anyway.

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2014
    Posts
    11
    I can build only a sb6. So, ok, i have "fixed" it, that linkers errors are there only when iam using a empty project(new project->emptyproject) but, if i am using win32 project, it works, without errors.

    but, i released that program, and on another PC, i can not start that program. why?

  6. #6
    Junior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    153
    msvcrtXX.dll missing?
    wrong architecture?

    My crystal ball is cloudy today. Would you mind posting an error message?

  7. #7
    Junior Member Newbie
    Join Date
    Aug 2014
    Posts
    11
    There is not an error message. If you start that programm, on your screen will appear for about 1-2 seconds a window with title: GLFW window, its empty window, and after 1-2 seconds, it disappears. On my PC the GLFW window appears too, but for about 10-20ms and after that the prgoramm window appears.

    btw. it looks like a all bugged for me i downloaded some examples, and when i am debugging them, that programm is only black, there is not that example what i choosed (tunnel, or startfield)
    Last edited by Kalir44; 08-10-2014 at 04:46 AM.

  8. #8
    Junior Member Newbie
    Join Date
    Aug 2014
    Posts
    11
    I dont know, but GLFW means something with a OpenGL window maybe its a problem in a drivers. On anothers PC i have very old components. Is here anyone, who have updated his graphic card, and its compatible with OpenGL 4.3? If yes, Can you try if that program works for you? the link is https://mega.co.nz/#!a9hSnTAB!3dQq-n...xdYut0YbRlEi6k .

  9. #9
    Junior Member Newbie
    Join Date
    Aug 2014
    Posts
    11
    So? noone wants to try that for me..?

Posting Permissions

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