C:\...\Temp\ccX1BkzX.o: in function `main': C:\...\main.cpp:39: first defined here #8748
GustavoRamos112
started this conversation in
New Users Build/Link/Run issues ONLY!
Replies: 1 comment
-
|
After struggling with two other GUI libraries, I learned and fixed it. I uninstalled and reinstalled MSYS2, ran the Makefile, and resolved the four dependencies it asked for: mingw-w64-x86_64-gcc
mingw-w64-x86_64-glfw
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-makeIn my project dir I run: mingw32-makeChange this lines in Makefile: ifeq ($(OS), Windows_NT)
ECHO_MESSAGE = "MinGW"
LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
CXXFLAGS += $(pkg-config --cflags glfw3) #<------- this
CFLAGS = $(CXXFLAGS)
endifAnd voila, it compiled without problems. 10/10 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version/Branch of Dear ImGui:
Version 1.92, Branch: master (master/docking/etc.)
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 10 + MinGW + MSYS2
Full config/build information:
Project:
│ glfw3.dll
│ imconfig.h
│ imgui.cpp
│ imgui.h
│ imgui_demo.cpp
│ imgui_draw.cpp
│ imgui_impl_glfw.cpp
│ imgui_impl_glfw.h
│ imgui_impl_opengl3.cpp
│ imgui_impl_opengl3.h
│ imgui_impl_opengl3_loader.h
│ imgui_internal.h
│ imgui_tables.cpp
│ imgui_widgets.cpp
│ imstb_rectpack.h
│ imstb_textedit.h
│ imstb_truetype.h
│ main.cpp
│
├───.vscode
│ tasks.json
task.json
{ "tasks": [ { "type": "cppbuild", "label": "C/C++: g++.exe build active file", "command": "C:\\msys64\\mingw64\\bin\\g++.exe", "args": [ "-fdiagnostics-color=always", "-std=c++11", "-Wall", "-Wformat", "-g", "${fileDirname}\\*.h", "${fileDirname}\\*.cpp", "${file}", "-lglfw3.dll", "-o", "${fileDirname}\\out\\${fileBasenameNoExtension}I.exe", "-lglfw3", "-lgdi32", "-lopengl32", "-limm32" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": ["$gcc"], "group": { "kind": "build", "isDefault": true }, "detail": "Task generated by Debugger." } ], "version": "2.0.0" }Install in msys2:
Details:
When I compile main.cpp (which is the same example file as examples\example_glfw_opengl3\main.cpp), I get the error:
I've already investigated what I might be doing wrong, and even reinstalled all of imgui, but I haven't been able to fix it.
I hope you can help me solve it.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
Beta Was this translation helpful? Give feedback.
All reactions