Can't use functions from Windows.h
-
Tried totaly same code in VisualStudio(except stuff inside if/else block, in VS i've simple cout's), can't figure out whats wrong, in VS everything works, when in Qt dummy project from the beginning got 2 errors from those 2 functions:
-
Check out your toolchains in creator respectively Kits.
In creator V4.7 under "Tools"->"Options"->"Kits"
or previous versions under "Tools"->"Options"->"Build&Run"Go through the tabs and search for warning signs.
-
-
Tried totaly same code in VisualStudio(except stuff inside if/else block, in VS i've simple cout's), can't figure out whats wrong, in VS everything works, when in Qt dummy project from the beginning got 2 errors from those 2 functions:
-
Hi @Engelard
Try adding
LIBS += -luser32
in your.pro
file.Afterwards, run qmake and build again.
Regards
-
@aha_1980 said in Can't use functions from Windows.h:
LIBS += -luser32
Omg why i have to do such complicated stuff at the first place. Qt devs, pls fix.
Tnx btw, now there is no error.
@Engelard said in Can't use functions from Windows.h:
Omg why i have to do such complicated stuff at the first place. Qt devs, pls fix.
What should be fixed? You are using functions from an external library, so you have to link against it.
You have to do the same on the other platforms also - pretty standard behavior.
Regards
-
@Engelard said in Can't use functions from Windows.h:
Omg why i have to do such complicated stuff at the first place. Qt devs, pls fix.
What should be fixed? You are using functions from an external library, so you have to link against it.
You have to do the same on the other platforms also - pretty standard behavior.
Regards