I'm following the steps in HOWTOBUILD.txt
. I have the necessary files for glfw built already. For the first time, the linker is complaining about glfw. After searching, it seems I need to link against gl3w
see this link. I've generated the static libs for gl3w
. Now, I've opened a new project and included the path to include
, see the below picture.
For the linker, I've linked against glfw3dll.lib gl3w.lib opengl32.lib
and included their path. If I run the sample from the first chapter,
main.cpp
#include "sb7.h"
class my_application : public sb7::application
{
void render(double currentTime)
{
static const GLfloat red[] = { 1.0f, 0.0f, 0.0f, 1.0f };
glClearBufferfv(GL_COLOR, 0, red);
}
};
DECLARE_MAIN(my_application);
I get linker errors.
1>main.obj : error LNK2019: unresolved external symbol "int __cdecl sb6IsExtensionSupported(char const *)" (?sb6IsExtensionSupported@@YAHPBD@Z) referenced in function "public: virtual void __thiscall sb7::application::run(class sb7::application *)" (?run@application@sb7@@UAEXPAV12@@Z)
1>main.obj : error LNK2019: unresolved external symbol "private: static void __stdcall sb7::application::debug_callback(unsigned int,unsigned int,unsigned int,unsigned int,int,char const *,void *)" (?debug_callback@application@sb7@@CGXIIIIHPBDPAX@Z) referenced in function "public: virtual void __thiscall sb7::application::run(class sb7::application *)" (?run@application@sb7@@UAEXPAV12@@Z)
1>main.obj : error LNK2001: unresolved external symbol "protected: static class sb7::application * sb7::application::app" (?app@application@sb7@@1PAV12@A)
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
I'm using Visual Studio 2013. I've traced one of these functions that the linker is complaining about (i.e. sb6IsExtensionSupported()
), the below picture shows how this function is being called in sb7.h
while its body actually is implemented in sb7.cpp
.
Is this actually correct?