Hi, i started read this book ( OpenGL superbible: Comprehensive Tutorial and reference (6th edition) ) but, at the first soucre 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);
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.”
This issue has been posted multiple times already. Apparently the sample source does not include the headers and libaries.
A few hints:
[ol]
[li]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. [/li][li]You get linker errors beacuse the functions declared by sb6.h are defined in some library that you are still missing [/li][li]A header file normally doesn’t contain function definitions, you don’t compile and run a header file. [/li][li]It is adviseable to study the C programming language that you decided to use at frist instead of immedately jumping at OpenGL® while learning C at the same time [/li][/ol]
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® platfrom SDK. You might want to install it anyway.
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?
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)
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-nTEl2G766RYRaROXtMLkeFvfxdYut0YbRlEi6k .