より良いエンジニアを目指して

1日1つ。良くなる!上手くなる!

未解決の外部シンボル __imp____glewBindBuffer 〜エラー

LNK2019 未解決の外部シンボル impglewBindBuffer が関数 "public: thiscall VertexArray::VertexArray(float const ,unsigned int,unsigned int const ,unsigned int)" (??0VertexArray@@QAE@PBMIPBII@Z) で参照されました

f:id:rimever:20210211153559p:plain

以下の記事に助けられました

atelier-xwe.blogspot.com

GL/glew.hを宣言する前に#define GLEW_STATICを実行する。

#define GLEW_STATIC
#include <GL/glew.h>

プリプロセッサで定義してもいいようです。

f:id:rimever:20210211154137p:plain