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

cannot find -lglada #7

Open
EasonLYH opened this issue Dec 14, 2023 · 2 comments
Open

cannot find -lglada #7

EasonLYH opened this issue Dec 14, 2023 · 2 comments

Comments

@EasonLYH
Copy link

PS C:\Users\User\Desktop\c++\openGL> make run
g++ -std=c++17 -Wall -Wextra -g -Iinclude -o output\main.exe src/main.o -Llib -lglada -lglfw3dll
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lglada
collect2.exe: error: ld returned 1 exit status
Makefile:78: recipe for target 'main.exe' failed
make: *** [main.exe] Error 1

c_cpp_properties.json:
{ "configurations": [ { "name": "Win32", "includePath": [ "C:/MinGW/include/**", "${workspaceFolder}/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "compilerPath": "C:\\MinGW\\bin\\g++.exe", "cStandard": "c17", "cppStandard": "gnu++14", "intelliSenseMode": "gcc-x86" } ], "version": 4 }

@EasonLYH
Copy link
Author

但是如果在控制台中执行g++ -std=c++17 -Wall -Wextra -g -Iinclude -o output\main.exe src/main.o -Llib -lglad -lglfw3dll不会报错
屏幕截图 2023-12-14 151601

@Ziyanbackyard
Copy link

makefile文件写的不对。
使用g++命令编译时是:g++ -std=c++17 -Wall -Wextra -g -Iinclude -o output\main.exe src/main.o -Llib -lglad -lglfw3dll
使用makefile编译时是:g++ -std=c++17 -Wall -Wextra -g -Iinclude -o output\main.exe src/main.o -Llib -lglada -lglfw3dll
试试修改makefile文件与g++命令一致

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