How to get psapi.h working?
How to get psapi.h working?
Include it and make sure to link with the library associated with it.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
How to link the library?
>How to link the library?
How to give details about your compiler and operating system when asking a question that depends on such information?
My best code is written with the delete key.
Os= Windows XP
Compiler= Visual Studio 6.0
prog language= C++
Under the Projects menu there's a Properties (or Settings, I can't quite remember) dialog where you can specify what libraries to link with.
My best code is written with the delete key.
Aye...it's "Settings". Under the "Link" tab where it says "Object/library modules," type in the name of the library file.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
even after entering the psapi.lib, i get the following error message:
fatal error C1083: Cannot open include file: 'psapi.h': No such file or directory
I have just installed the latest SDK, but still it is not resolved!
Does your compiler know to look to the SDK for includes & Libraries. Cant remember how to set this in Version 6, but with NET it's something like Tools->Options->Projects Directories. There you can set include folders and lib folders for the SDK
the process is the same in VC++ 6.0 but which folder/files should i specify?
OK, i have specified the include and lib folders of the SDK, added psapi.lib to the settings, now i am getting this following error only:
LINK : fatal error LNK1104: cannot open file "psapi.lib"
Error executing link.exe.
Any helpful comments?
Make sure to add the path to the library file to the paths under the "Link" tab, "Input" category.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Having done that, got the following errors:
Linking...
EnumProcesses.obj : error LNK2001: unresolved external symbol "void __cdecl setrgb(int,int)" (?setrgb@@YAXHH@Z)
EnumProcesses.obj : error LNK2001: unresolved external symbol "void __cdecl gotoxy(int,int)" (?gotoxy@@YAXHH@Z)
EnumProcesses.obj : error LNK2001: unresolved external symbol "void __cdecl clrscr(int)" (?clrscr@@YAXH@Z)
Debug/EnumProcesses.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
EnumProcesses.exe - 4 error(s), 0 warning(s)
That has nothing to do with psapi. Those are non-standard console screen manipulation routines. The correct way to do these things on a Windows box with the Console API is covered in my 6 part Windows Console Programming Tutorial .
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Thanks for all ur inputs!