Answer the question
In order to leave comments, you need to log in
Why does the link error occur in this case?
Good afternoon!
You have to compile your project from the command line with g++
g++ main.cpp -lglfw3 -lgdi32 -lopengl32 -lglew32 -lopengl32
'memset' was not declared in this scope
inline void PropVariantInit (PROPVARIANT *pvar) { memset (pvar, 0, sizeof (PROPVARIANT)); }
TARGET = learning
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
CONFIG += c++11
LIBS += -lglfw3 -lgdi32 -lopengl32 -lglew32 -lopengl32
SOURCES += \
main.cpp
Answer the question
In order to leave comments, you need to log in
Why does the link error occur in this case?
This is a compilation error, not a linking error. Because there isn't enough#include <cstring>
See what Makefile qmake generates. Extra paths or flags from the spec file may be added there.
Check if g++ is actually used when compiling and linking, and not, say, gcc (this can be seen in the Compile output window).
Check if the cstring file is included wherever needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question