Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation errors #31

Open
introcosmo opened this issue Sep 16, 2019 · 9 comments
Open

Compilation errors #31

introcosmo opened this issue Sep 16, 2019 · 9 comments

Comments

@introcosmo
Copy link

  			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
Copy link
Owner

Don't update ImGui

@introcosmo
Copy link
Author

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
Copy link
Owner

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

@introcosmo
Copy link
Author

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
Copy link
Owner

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

@introcosmo
Copy link
Author

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
Copy link
Owner

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

@thennequin
Copy link
Owner

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

@introcosmo
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants