FLTK 2.0, сборка и демонстрация базы кода около 2011 года для VS2019 - PullRequest
0 голосов
/ 18 февраля 2020

Я обнаружил программу, которая может удовлетворить некоторые потребности; исходный код доступен на sourceforge, но в списке зависимостей не хватает деталей. Мне удалось отследить (большинство) из них и выбрать версии на основе даты выпуска программного обеспечения. Цель состоит в том, чтобы заставить код компилироваться так же точно, как это было первоначально в 2011 году, , а затем беспокоиться об обновлении / исправлении / миграции на более новые библиотеки.

Один пакет, FLTK, использует заброшенную версию 2.0. Я нашел две разные версии. Включенные файлы проекта были «обновлены в одну сторону» до MS2019. Многие свойства и ссылки должны быть исправлены.

Я пытаюсь скомпилировать тестовую программу 'cubeview' и в итоге получаю 37 неразрешенных зависимостей.

Как показано ниже, я вошел в проект, свойства, параметры конфигурации

Severity    Code    Description Project File    Line    Suppression State
Error   LNK1120 37 unresolved externals CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\Debug\CubeView.exe    1   
Error   LNK2019 unresolved external symbol "public: bool __thiscall fltk::Widget::find(class fltk::AssociationType const &,void *)const " (?find@Widget@fltk@@QBE_NABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::add_shortcut(unsigned int)" (?add_shortcut@Widget@fltk@@QAE_NI@Z)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "public: bool __thiscall fltk::Widget::remove(class fltk::AssociationType const &,void *)" (?remove@Widget@fltk@@QAE_NABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::remove_shortcut(unsigned int)" (?remove_shortcut@Widget@fltk@@QAE_NI@Z)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "public: void * __thiscall fltk::Widget::foreach(class fltk::AssociationType const &,class fltk::AssociationFunctor &)const " (?foreach@Widget@fltk@@QBEPAXABVAssociationType@2@AAVAssociationFunctor@2@@Z) referenced in function "public: bool __thiscall fltk::Widget::test_shortcut(bool)const " (?test_shortcut@Widget@fltk@@QBE_N_N@Z) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "public: void * __thiscall fltk::Widget::get(class fltk::AssociationType const &)const " (?get@Widget@fltk@@QBEPAXABVAssociationType@2@@Z) referenced in function "public: unsigned int __thiscall fltk::Widget::shortcut(void)const " (?shortcut@Widget@fltk@@QBEIXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "public: void __thiscall fltk::Widget::add(class fltk::AssociationType const &,void *)" (?add@Widget@fltk@@QAEXABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::add_shortcut(unsigned int)" (?add_shortcut@Widget@fltk@@QAE_NI@Z)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "public: void __thiscall fltk::Widget::set(class fltk::AssociationType const &,void *)" (?set@Widget@fltk@@QAEXABVAssociationType@2@PAX@Z) referenced in function "public: void __thiscall fltk::Widget::remove_shortcuts(void)" (?remove_shortcuts@Widget@fltk@@QAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "void * __cdecl fltk::foreach(class fltk::AssociationType const *,class fltk::Widget const *,class fltk::AssociationFunctor &)" (?foreach@fltk@@YAPAXPBVAssociationType@1@PBVWidget@1@AAVAssociationFunctor@1@@Z) referenced in function "unsigned int __cdecl fltk::foreachShortcut(class fltk::Widget const *,class fltk::ShortcutFunctor &)" (?foreachShortcut@fltk@@YAIPBVWidget@1@AAVShortcutFunctor@1@@Z)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj    1   
Error   LNK2019 unresolved external symbol "void __cdecl delete_associations_for(class fltk::Widget *)" (?delete_associations_for@@YAXPAVWidget@fltk@@@Z) referenced in function "public: virtual __thiscall fltk::Widget::~Widget(void)" (??1Widget@fltk@@UAE@XZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\Widget.obj    1   
Error   LNK2019 unresolved external symbol _WSAAsyncSelect@16 referenced in function "void __cdecl fltk::add_fd(int,int,void (__cdecl*)(int,void *),void *)" (?add_fd@fltk@@YAXHHP6AXHPAX@Z0@Z) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\run.obj   1   
Error   LNK2019 unresolved external symbol __imp__glBegin@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glBlendFunc@8 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glClear@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glColor3f@12 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glColor4f@16 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glCopyPixels@20 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glDrawBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)    CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glEnable@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glEnd@0 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glFlush@0 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2001 unresolved external symbol __imp__glLoadIdentity@0  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glLoadIdentity@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2001 unresolved external symbol __imp__glOrtho@48    CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glOrtho@48 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glPopMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glPushMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glRasterPos2i@8 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glReadBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)    CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glRotatef@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glScalef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)    CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glShadeModel@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)    CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glTranslatef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)    CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__glVertex3fv@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2001 unresolved external symbol __imp__glViewport@16 CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj)   1   
Error   LNK2019 unresolved external symbol __imp__glViewport@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj  1   
Error   LNK2019 unresolved external symbol __imp__wglCreateContext@4 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)  CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj)   1   
Error   LNK2019 unresolved external symbol __imp__wglCreateLayerContext@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj)   1   
Error   LNK2019 unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl fltk::delete_gl_context(struct HGLRC__ *)" (?delete_gl_context@fltk@@YAXPAUHGLRC__@@@Z)   CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj)   1   
Error   LNK2019 unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl fltk::no_gl_context(void)" (?no_gl_context@fltk@@YAXXZ) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj)   1   
Error   LNK2019 unresolved external symbol __imp__wglShareLists@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView    D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj)   1   

Другая часть «вывода», которую мне не удалось включить:

1>------ Build started: Project: fltk, Configuration: Debug Win32 ------
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(445,5): warning MSB8004: Output Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, CubeView.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fltk_opengl.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj).  This can lead to incorrect clean and rebuild behavior.
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1455,5): warning MSB8012: TargetPath(D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\..\..\lib\fltk.lib) does not match the Library's OutputFile property value (D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\lib\fltk2d.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1457,5): warning MSB8012: TargetName(fltk) does not match the Library's OutputFile property value (fltk2d). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>fltk.lib.vcxproj -> D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\..\..\lib\fltk.lib
1>Done building project "fltk.lib.vcxproj".
2>------ Build started: Project: CubeView, Configuration: Debug Win32 ------
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (.\Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltk.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fltk_opengl.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj).  This can lead to incorrect clean and rebuild behavior.
2>cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
2>cl : command line warning D9007: '/Gm' requires '/Zi or /ZI'; option ignored
2>CubeMain.cxx
2>CubeView.cxx
2>CubeViewUI.cxx
2>Generating Code...
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(445,5): warning MSB8004: Output Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, CubeView.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltk.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj).  This can lead to incorrect clean and rebuild behavior.
2>Done building project "fltk_opengl.vcxproj".
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glBlendFunc@8 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glColor3f@12 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glColor4f@16 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glOrtho@48 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glOrtho@48
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glPopMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glPushMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glScalef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glVertex3fv@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glViewport@16
2>run.obj : error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in function "void __cdecl fltk::add_fd(int,int,void (__cdecl*)(int,void *),void *)" (?add_fd@fltk@@YAXHHP6AXHPAX@Z0@Z)
2>Widget.obj : error LNK2019: unresolved external symbol "void __cdecl delete_associations_for(class fltk::Widget *)" (?delete_associations_for@@YAXPAVWidget@fltk@@@Z) referenced in function "public: virtual __thiscall fltk::Widget::~Widget(void)" (??1Widget@fltk@@UAE@XZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glCopyPixels@20 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glDrawBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glFlush@0 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glRasterPos2i@8 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glReadBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglCreateLayerContext@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl fltk::delete_gl_context(struct HGLRC__ *)" (?delete_gl_context@fltk@@YAXPAUHGLRC__@@@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl fltk::no_gl_context(void)" (?no_gl_context@fltk@@YAXXZ)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglShareLists@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>.\Debug\CubeView.exe : fatal error LNK1120: 30 unresolved externals
2>Done building project "CubeView.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

1 Ответ

1 голос
/ 18 февраля 2020

Похоже, вам нужно добавить библиотеки Windows для ссылки. Я бы начал с добавления этих библиотек в вашу команду компоновщика: glu32.lib opengl32.lib ole32.lib uuid.lib comctl32.lib

Если вам все еще не хватает, начните добавлять эти библиотеки, если вы еще этого не сделали. kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib odbc32.lib odbccp32.lib

...