add imgui into s0beit..ERRORS?!

Blume

Active member
Joined
May 14, 2018
Messages
38
Reaction score
11
Location
China
sorry i'm a complete noob. i've been following that tutorial step by step (http://ugbase.eu/index.php?threads/tutorial-add-imgui-into-your-s0beit.19885/ )
at last it give me some errors:
Code:
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "struct ImGuiContext * __cdecl ImGui::CreateContext(struct ImFontAtlas *)" (?CreateContext@ImGui@@YAPAUImGuiContext@@PAUImFontAtlas@@@Z), the symbol is in the function Referenced in "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "struct ImGuiIO & __cdecl ImGui::GetIO(void)" (?GetIO@ImGui@@YAAAUImGuiIO@@XZ), the symbol is in the function "void __cdecl renderHandler(void )" (??renderHandler@@YAXXZ) is referenced
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "struct ImGuiStyle & __cdecl ImGui::GetStyle(void)" (?GetStyle@ImGui@@YAAAUImGuiStyle@@XZ), the symbol is in the function "void __cdecl renderHandler(void )" (??renderHandler@@YAXXZ) is referenced
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "public: struct ImFont * __thiscall ImFontAtlas :: AddFontDefault (struct ImFontConfig const *)" (AddFontDefault @ ImFontAtlas @@ QAEPAUImFont @@ PBUImFontConfig @@@ Z?), The The symbol is referenced in the function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "public: struct ImFont * __thiscall ImFontAtlas :: AddFontFromFileTTF (char const *, float, struct ImFontConfig const *, unsigned short const *)" (AddFontFromFileTTF @ ImFontAtlas @@? QAEPAUImFont@@PBDMPBUImFontConfig@@PBG@Z), the symbol is referenced in the function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "bool __cdecl ImGui_ImplDX9_Init (void *, struct IDirect3DDevice9 *)" (? ImGui_ImplDX9_Init @@ YA_NPAXPAUIDirect3DDevice9 @@@ Z), the symbol in the function "void __cdecl renderHandler (void) Quoted in (??renderHandler@@YAXXZ)
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "void __cdecl ImGui_ImplDX9_InvalidateDeviceObjects (void)" (ImGui_ImplDX9_InvalidateDeviceObjects @@ YAXXZ?), The symbol in the function "public: virtual long __stdcall proxyIDirect3DDevice9 :: Reset (struct _D3DPRESENT_PARAMETERS_ *)" Quoted in (?Reset@proxyIDirect3DDevice9@@UAGJPAU_D3DPRESENT_PARAMETERS_@@@Z)
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "bool __cdecl ImGui_ImplWin32_Init(void *)" (?ImGui_ImplWin32_Init@@YA_NPAX@Z), the symbol is in the function "void __cdecl renderHandler(void)" (?renderHandler@@ Cited in YAXXZ)
WHAT THE FUCK?!
i also searched on the internet for sure, but these error just can't be solved for me at all
 

Ayamabi

Active member
Joined
Mar 8, 2018
Messages
169
Reaction score
111
thats 'cuz u call imgui files after everything other u need to call like this boi

#include "imgui.h"
#include "imgui_impl_dx9.h"
#include "imgui_impl_win32.h"
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND wnd, UINT umsg, WPARAM wparam, LPARAM lparam);

and under that needs to be
proxygaydevice.h and other shet

and for keyhoop.cpp
you just need that extern LRESULT ImGui_ImplWin32_WndProcHandler in main.h...

now define in keyhoop like this like this
C++:
    if (g_Input != nullptr && !g_Input->iInputEnabled && GetForegroundWindow() == wnd)
    {
        if (menu_wndproc(umsg, wparam, lparam))
            return true;

        if (ImGui_ImplWin32_WndProcHandler(wnd, umsg, wparam, lparam)) //MAN THIS IS FOR IMGUI MAN  OK MAN ? OK
            return true;
    }

and you need to add in these imgui.cpp and other imgui cpp files #include "main.h"

and in renderHandler() before proxyIDirect3DDevice9_init = 1;
put

ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
ImFont* pFont = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\arial.ttf", 14);
Theme(); // YOU IMGUI THEME CODE IF YOU DON'T HAVE IT DELETE THIS LINE MAN OK MAN ? DEFAULT THEME IS LOADED MAN

ImGui_ImplWin32_Init(GetActiveWindow());
ImGui_ImplDX9_Init(origIDirect3DDevice9);

and find render->Invalidate
after that put ImGui_ImplDX9_InvalidateDeviceObjects();

now create your menu like in that tutorial

im using 1.71 wip imgui btw here link https://github.com/ocornut/imgui/archive/master.zip
 

Blume

Active member
Joined
May 14, 2018
Messages
38
Reaction score
11
Location
China
thank for helping,guys.however i've gave up on it because it's too hard to set up for me :( i hope your answers can be helpful to others who watching this thread
 

Ayamabi

Active member
Joined
Mar 8, 2018
Messages
169
Reaction score
111
thank for helping,guys.however i've gave up on it because it's too hard to set up for me i hope your answers can be helpful to others who watching this thread

NEVER EVER GIVE UP THAT'S REASON NUMBER 1. WHY PEOPLE DON'T SUCCEED, STAND UP, FACE IT, AND INCLUDE THAT SHET BOI
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
You probably didn't add the .cpp files to your project, since the tutorial you linked doesn't reference any library.
 

Blume

Active member
Joined
May 14, 2018
Messages
38
Reaction score
11
Location
China
NEVER EVER GIVE UP THAT'S REASON NUMBER 1. WHY PEOPLE DON'T SUCCEED, STAND UP, FACE IT, AND INCLUDE THAT SHET BOI
You probably didn't add the .cpp files to your project, since the tutorial you linked doesn't reference any library.
so i added them....compiler give more errors over 50:
 

Attachments

  • unname.png
    unname.png
    166.1 KB · Views: 31

Ayamabi

Active member
Joined
Mar 8, 2018
Messages
169
Reaction score
111
so i added them....compiler give more errors over 50:
ma frend you need these files
and in main.h just put

#include "imgui.h"
#include "imgui_impl_dx9.h"
#include "imgui_impl_win32.h"
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND wnd, UINT umsg, WPARAM wparam, LPARAM lparam);
 

Attachments

  • ImGui_Files.rar
    409.8 KB · Views: 29

Blume

Active member
Joined
May 14, 2018
Messages
38
Reaction score
11
Location
China
ma frend you need these files
and in main.h just put

#include "imgui.h"
#include "imgui_impl_dx9.h"
#include "imgui_impl_win32.h"
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND wnd, UINT umsg, WPARAM wparam, LPARAM lparam);


FINALLY DONE!!! The problem is they not only need to include in but also need to add into the project.
I include them and added imgui.cpp into the project, but not add other files, so that's problem...
Thank a lot everyone! :)
 
Top