mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-16 19:11:13 +00:00
Linking errors in a fresh project going by the instructions in FAQ #4413
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#4413
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version: 1.8.3
Branch: just grabbed the Releases source
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Using GLFW 3.34 and the newest version of GL3W.
Compiler: default Visual Studio Community 2019 compiler, C++17
Operating System: Windows 10 21H1
My Issue/Question:
Just dropping the necessary source and header files into a project causes a lot of linking errors to pop up.
The files are compiled as per the build output:
The files are included in the project as per screenshot below.
Screenshots/Video
Standalone, minimal, complete and verifiable example: (see https://github.com/ocornut/imgui/issues/2261)
Note: also tried suggestions in #4328, none of them worked.
Beware of not using erroneous statements that perpetuate convincing yourself that you didn't make a mistake.
Learning to debug programs is about making sure your assumption are valid.
You state "just dropping the necessary source [...] files" and yet you did NOT drop the necessary source files.
ImGui::Separator()listed in the log extract you provided) and realize those symbols are implemented in source files that you have omitted.Rude, considering there is only one mention of what are considered "necessary files" in the main README which I only just found and there's literally nothing about that in the FAQ (which SHOULD actually be the first place to go to for this), only to "go to several other files which don't mention anything". A direct line "drop all the files in the root ImGui directory to your project file" would have helped a lot, especially to somewhat dense people like me.
Anyway, resolved by dropping in the other two files (imgui_tables.cpp, imgui_widgets.cpp).
There are 22 examples applications (including vsproj, Makefiles, cmakefile, batch files) all linking in *.cpp files.
You are right the README mention "They are ALL the files in the root folder of the repository" following by a partial list of files made this ambiguous of some sort (changed it now with
c7529c8e). It is also programming literacy to be able to solve issues like that. Linking errors are the most asked C++ questions for any library, and as those questions come often to us (you have noticed this is issue number 4413) we get impatient and frustrated about it.