thennequin / ImWindow

Window and GUI system based on Dear ImGui from OCornut
MIT License
827 stars 119 forks source link

Compilation errors #31

Open introcosmo opened 4 years ago

introcosmo commented 4 years ago
            m_pContext = ImGui::CreateContext( pGlobalContext->IO.MemAllocFn, pGlobalContext->IO.MemFreeFn );

1>D:\Coding\Code\ImWindow-titlebar\ImWindow\ImwPlatformWindow.cpp(23,68): error C2039: 'MemAllocFn': is not a member of 'ImGuiIO' 1>D:\Coding\Code\ImWindow-titlebar\ImWindow\ImwPlatformWindow.cpp(23,68): error C2039: m_pContext = ImGui::CreateContext( pGlobalContext->IO.MemAllocFn, pGlobalContext->IO.MemFreeFn ) 1>D:\Coding\Code\ImWindow-titlebar\ImWindow\ImwPlatformWindow.cpp(23,68): error C2039: ^ 1>D:\Coding\Code\ImWindow-titlebar\ImWindow\imgui.h(1324): message : see declaration of 'ImGuiIO' 1>D:\Coding\Code\ImWindow-titlebar\ImWindow\imgui.h(1324): message : struct ImGuiI 1>D:\Coding\Code\ImWindow-titlebar\ImWindow\ImwPlatformWindow.cpp(23,99): error C2039: 'MemFreeFn': is not a member of 'ImGuiIO' 1>D:\Coding\Code\ImWindow-titlebar\ImWindow\ImwPlatformWindow.cpp(23,99): error C2039: m_pContext = ImGui::CreateContext( pGlobalContext->IO.MemAllocFn, pGlobalContext->IO.MemFreeFn )

thennequin commented 4 years ago

Don't update ImGui

introcosmo commented 4 years ago

Don't update ImGui Could you send me ImGui files that can be built successfully in ImWindow? I dont know which version of ImGui I should use.

thennequin commented 4 years ago

Use the ImGui submodule include in ImWIndow repo. Actually it's the version 1.50

introcosmo commented 4 years ago

Thanks! But another error: 1>------ Build started: Project: ImWindowDX11, Configuration: Debug Win32 ------ 1>ImwPlatformWindowEasyWindow.obj : error LNK2019: unresolved external symbol "public: static class EasyWindow __cdecl EasyWindow::Create(char const ,int,int,bool,class EasyWindow ,enum EasyWindow::EWindowStyle,int)" (?Create@EasyWindow@@SAPAV1@PBDHH_NPAV1@W4EWindowStyle@1@H@Z) referenced in function "public: virtual bool __thiscall ImWindow::ImwPlatformWindowEasyWindow::Init(class ImWindow::ImwPlatformWindow )" (?Init@ImwPlatformWindowEasyWindow@ImWindow@@UAE_NPAVImwPlatformWindow@2@@Z) 1>....\Output\ImWindowDX11_d.exe : fatal error LNK1120: 1 unresolved externals 1>Done building project "ImWindowDX11.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

thennequin commented 4 years ago

First, explain what you do, I don't known the context. And after I be able to help you.

introcosmo commented 4 years ago

OK,My IDE is VS2019(Professional). After checking out the code, there is just the declaration of EasyWindow::Create but there is no definition of EasyWindow::Create in EasyWindow.cpp. But EasyWindow::Create is defined in class EasyWindowWin32 : public EasyWindow. So error LNK2019: unresolved external symbol "public: static class EasyWindow * __cdecl EasyWindow::Create

thennequin commented 4 years ago

You need to include the file EasyWindowWin32.cpp in your solution.

thennequin commented 4 years ago

Have you to try to read the wiki? https://github.com/thennequin/ImWindow/wiki/How-to

introcosmo commented 4 years ago

I am so grateful for you to helping tackle this problem. Whatsoever, I would not image to include "***.cpp" (Although I know ccp can be included). I certainly do the same as the wiki before.