cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.27k stars 939 forks source link

ImGui docking branch usage #2246

Closed oleg-ilechko closed 3 years ago

oleg-ilechko commented 3 years ago

I'm trying to change imgui to docking branch https://github.com/ocornut/imgui/tree/docking First I tried to do it manually and lately used dearimgui_update.py script. Cinder is building successfully but when I try to use ImGui in my app I'm getting next errors:

cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "bool __cdecl ImGui::BeginTable(char const *,int,int,struct ImVec2 const &,float)" (?BeginTable@ImGui@@YA_NPEBDHHAEBUImVec2@@M@Z) referenced in function "void __cdecl ImGui::ShowDemoWindow(bool *)" (?ShowDemoWindow@ImGui@@YAXPEA_N@Z)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::EndTable(void)" (?EndTable@ImGui@@YAXXZ) referenced in function "void __cdecl ImGui::ShowDemoWindow(bool *)" (?ShowDemoWindow@ImGui@@YAXPEA_N@Z)
cinder.lib(imgui.cpp.obj) : error LNK2001: unresolved external symbol "void __cdecl ImGui::EndTable(void)" (?EndTable@ImGui@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableNextRow(int,float)" (?TableNextRow@ImGui@@YAXHM@Z) referenced in function "void __cdecl ShowDemoWindowWidgets(void)" (?ShowDemoWindowWidgets@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "bool __cdecl ImGui::TableNextColumn(void)" (?TableNextColumn@ImGui@@YA_NXZ) referenced in function "void __cdecl ImGui::ShowDemoWindow(bool *)" (?ShowDemoWindow@ImGui@@YAXPEA_N@Z)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "bool __cdecl ImGui::TableSetColumnIndex(int)" (?TableSetColumnIndex@ImGui@@YA_NH@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableSetupColumn(char const *,int,float,unsigned int)" (?TableSetupColumn@ImGui@@YAXPEBDHMI@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableSetupScrollFreeze(int,int)" (?TableSetupScrollFreeze@ImGui@@YAXHH@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableHeadersRow(void)" (?TableHeadersRow@ImGui@@YAXXZ) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableHeader(char const *)" (?TableHeader@ImGui@@YAXPEBD@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "struct ImGuiTableSortSpecs * __cdecl ImGui::TableGetSortSpecs(void)" (?TableGetSortSpecs@ImGui@@YAPEAUImGuiTableSortSpecs@@XZ) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "int __cdecl ImGui::TableGetColumnIndex(void)" (?TableGetColumnIndex@ImGui@@YAHXZ) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "int __cdecl ImGui::TableGetRowIndex(void)" (?TableGetRowIndex@ImGui@@YAHXZ) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "char const * __cdecl ImGui::TableGetColumnName(int)" (?TableGetColumnName@ImGui@@YAPEBDH@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "int __cdecl ImGui::TableGetColumnFlags(int)" (?TableGetColumnFlags@ImGui@@YAHH@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableSetBgColor(int,unsigned int,int)" (?TableSetBgColor@ImGui@@YAXHIH@Z) referenced in function "void __cdecl ShowDemoWindowTables(void)" (?ShowDemoWindowTables@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::Columns(int,char const *,bool)" (?Columns@ImGui@@YAXHPEBD_N@Z) referenced in function "void __cdecl ShowDemoWindowLayout(void)" (?ShowDemoWindowLayout@@YAXXZ)
cinder.lib(CinderImGui.cpp.obj) : error LNK2001: unresolved external symbol "void __cdecl ImGui::Columns(int,char const *,bool)" (?Columns@ImGui@@YAXHPEBD_N@Z)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::NextColumn(void)" (?NextColumn@ImGui@@YAXXZ) referenced in function "void __cdecl ShowDemoWindowLayout(void)" (?ShowDemoWindowLayout@@YAXXZ)
cinder.lib(CinderImGui.cpp.obj) : error LNK2001: unresolved external symbol "void __cdecl ImGui::NextColumn(void)" (?NextColumn@ImGui@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "int __cdecl ImGui::GetColumnIndex(void)" (?GetColumnIndex@ImGui@@YAHXZ) referenced in function "void __cdecl ShowDemoWindowColumns(void)" (?ShowDemoWindowColumns@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "float __cdecl ImGui::GetColumnWidth(int)" (?GetColumnWidth@ImGui@@YAMH@Z) referenced in function "void __cdecl ShowDemoWindowLayout(void)" (?ShowDemoWindowLayout@@YAXXZ)
cinder.lib(imgui_demo.cpp.obj) : error LNK2019: unresolved external symbol "float __cdecl ImGui::GetColumnOffset(int)" (?GetColumnOffset@ImGui@@YAMH@Z) referenced in function "void __cdecl ShowDemoWindowColumns(void)" (?ShowDemoWindowColumns@@YAXXZ)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::EndColumns(void)" (?EndColumns@ImGui@@YAXXZ) referenced in function "void __cdecl ImGui::End(void)" (?End@ImGui@@YAXXZ)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "float __cdecl ImGui::GetColumnOffsetFromNorm(struct ImGuiOldColumns const *,float)" (?GetColumnOffsetFromNorm@ImGui@@YAMPEBUImGuiOldColumns@@M@Z) referenced in function "void __cdecl ImGui::DebugNodeColumns(struct ImGuiOldColumns *)" (?DebugNodeColumns@ImGui@@YAXPEAUImGuiOldColumns@@@Z)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableEndRow(struct ImGuiTable *)" (?TableEndRow@ImGui@@YAXPEAUImGuiTable@@@Z) referenced in function "public: void __cdecl ImGuiListClipper::Begin(int,float)" (?Begin@ImGuiListClipper@@QEAAXHM@Z)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableGcCompactTransientBuffers(struct ImGuiTable *)" (?TableGcCompactTransientBuffers@ImGui@@YAXPEAUImGuiTable@@@Z) referenced in function "void __cdecl ImGui::NewFrame(void)" (?NewFrame@ImGui@@YAXXZ)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableGcCompactTransientBuffers(struct ImGuiTableTempData *)" (?TableGcCompactTransientBuffers@ImGui@@YAXPEAUImGuiTableTempData@@@Z) referenced in function "void __cdecl ImGui::NewFrame(void)" (?NewFrame@ImGui@@YAXXZ)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableGcCompactSettings(void)" (?TableGcCompactSettings@ImGui@@YAXXZ) referenced in function "void __cdecl ImGui::GcCompactTransientMiscBuffers(void)" (?GcCompactTransientMiscBuffers@ImGui@@YAXXZ)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TableSettingsInstallHandler(struct ImGuiContext *)" (?TableSettingsInstallHandler@ImGui@@YAXPEAUImGuiContext@@@Z) referenced in function "void __cdecl ImGui::Initialize(struct ImGuiContext *)" (?Initialize@ImGui@@YAXPEAUImGuiContext@@@Z)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::DebugNodeTable(struct ImGuiTable *)" (?DebugNodeTable@ImGui@@YAXPEAUImGuiTable@@@Z) referenced in function "void __cdecl ImGui::ShowMetricsWindow(bool *)" (?ShowMetricsWindow@ImGui@@YAXPEA_N@Z)
cinder.lib(imgui.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::DebugNodeTableSettings(struct ImGuiTableSettings *)" (?DebugNodeTableSettings@ImGui@@YAXPEAUImGuiTableSettings@@@Z) referenced in function "void __cdecl ImGui::ShowMetricsWindow(bool *)" (?ShowMetricsWindow@ImGui@@YAXPEA_N@Z)
cinder.lib(imgui_widgets.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::PushColumnsBackground(void)" (?PushColumnsBackground@ImGui@@YAXXZ) referenced in function "bool __cdecl ImGui::Selectable(char const *,bool,int,struct ImVec2 const &)" (?Selectable@ImGui@@YA_NPEBD_NHAEBUImVec2@@@Z)
cinder.lib(imgui_widgets.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::PopColumnsBackground(void)" (?PopColumnsBackground@ImGui@@YAXXZ) referenced in function "bool __cdecl ImGui::Selectable(char const *,bool,int,struct ImVec2 const &)" (?Selectable@ImGui@@YA_NPEBD_NHAEBUImVec2@@@Z)
cinder.lib(imgui_widgets.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TablePushBackgroundChannel(void)" (?TablePushBackgroundChannel@ImGui@@YAXXZ) referenced in function "bool __cdecl ImGui::Selectable(char const *,bool,int,struct ImVec2 const &)" (?Selectable@ImGui@@YA_NPEBD_NHAEBUImVec2@@@Z)
cinder.lib(imgui_widgets.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::TablePopBackgroundChannel(void)" (?TablePopBackgroundChannel@ImGui@@YAXXZ) referenced in function "bool __cdecl ImGui::Selectable(char const *,bool,int,struct ImVec2 const &)" (?Selectable@ImGui@@YA_NPEBD_NHAEBUImVec2@@@Z)
Debug\motion-nodes\motion-nodes.exe : fatal error LNK1120: 33 unresolved externals
NMAKE : fatal error U1077: 'C:\Users\Adam\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\211.6693.114\bin\cmake\win\bin\cmake.exe' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

Maybe someone had same issues?

oleg-ilechko commented 3 years ago

Found solution. ${CINDER_SRC_DIR}/imgui/imgui_tables.cpp should be manually added to SRC_SET_IMGUI in libcinder_source_files.cmake file