LINUX.ORG.RU

История изменений

Исправление af5, (текущая версия) :

oglpg-8th-edition/04/ch04_shadowmap$ make g++ -g -I../../include ch04_shadowmap.cpp LoadShaders.o -lglut -lGLEW -o ch04_shadowmap In file included from ch04_shadowmap.cpp:8:0: ../../include/vapp.h: In member function ‘virtual void VermillionApplication::Initialize(const char*)’: ../../include/vapp.h:33:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] /tmp/ccxM8cB5.o: In function `ShadowMapExample::Initialize(char const*)': /home/af5/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:170: undefined reference to `VBObject::LoadFromVBM(char const*, int, int, int)' /tmp/ccxM8cB5.o: In function `ShadowMapExample::DrawScene(bool)': /home/af5/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:259: undefined reference to `VBObject::Render(unsigned int, unsigned int)' /tmp/ccxM8cB5.o: In function `ShadowMapExample': /home/af5/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:23: undefined reference to `VBObject::VBObject()' /tmp/ccxM8cB5.o: In function `~ShadowMapExample': /home/af5/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:23: undefined reference to `VBObject::~VBObject()' collect2: ld returned 1 exit status make: *** [ch04_shadowmap] Error 1

Исходная версия af5, :

oglpg-8th-edition/04/ch04_shadowmap$ make
g++ -g  -I../../include ch04_shadowmap.cpp LoadShaders.o   -lglut -lGLEW -o ch04_shadowmap
In file included from ch04_shadowmap.cpp:8:0:
../../include/vapp.h: In member function ‘virtual void VermillionApplication::Initialize(const char*)’:
../../include/vapp.h:33:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/tmp/ccxM8cB5.o: In function `ShadowMapExample::Initialize(char const*)':
/home/a2/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:170: undefined reference to `VBObject::LoadFromVBM(char const*, int, int, int)'
/tmp/ccxM8cB5.o: In function `ShadowMapExample::DrawScene(bool)':
/home/a2/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:259: undefined reference to `VBObject::Render(unsigned int, unsigned int)'
/tmp/ccxM8cB5.o: In function `ShadowMapExample':
/home/a2/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:23: undefined reference to `VBObject::VBObject()'
/tmp/ccxM8cB5.o: In function `~ShadowMapExample':
/home/a2/Downloads/oglpg-8th-edition/04/ch04_shadowmap/ch04_shadowmap.cpp:23: undefined reference to `VBObject::~VBObject()'
collect2: ld returned 1 exit status
make: *** [ch04_shadowmap] Error 1