ProcessIdToSessionId undeclared?
-
Hello!
I have this problem when I try to compile...
@error: undefined reference to `ProcessIdToSessionId(unsigned long, unsigned long*)@8'@It is declared on winbase.h which is included in windows.h and I'm like wtf? is it the linker? I need some help with this please, I can't seem to go back to visual studio after using this sexy library + IDE :D
-
If this is a windows API cal, you must add the needed library to your pro file. In mSVS, some of the libs are linked automatically, but that is not done with mingw.
-
thanks, now I have been trying to add the lib to the pro file but when I choose the lib file the "next" button stays "disabled"...
-
for some weird reason adding extern "C" fixed the issue? I have no idea why though...
-
Because C and C++ mangle functions different (the same functions result in different symbol names).
See How to mix "C and C++":http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html.
-
Oh that makes sense :S thanks man.