Compiler Error - cannot find -lpsapi

BlitzMax Forums/BlitzMax Programming/Compiler Error - cannot find -lpsapi

SimonasQu(Posted 2016) [#1]
This is what I get when I'm compiling the project. Any ideas?
I've installed minGW, everything should work.

Have anyone encountered with this error?


Xerra(Posted 2016) [#2]
May I suggest a bit more information on what kind of error you're actually getting? And what platform you're running on?


Hotshot2005(Posted 2016) [#3]
You need installed minGW first then BlitzMax then rebuild it then do programming then run it and it work ok :-)


SimonasQu(Posted 2016) [#4]
Window 8. I have MinGW installed, I've set paths and everything.


Brucey(Posted 2016) [#5]
Have anyone encountered with this error?

Yes, but usually it gives you more useful information too. (like the error message)


SimonasQu(Posted 2016) [#6]
Oh it seems title doesn't like ":" and deleted half the title of this topic.
utput:
Building MainSource
Compiling:getos.c
Compiling:MainSource.bmx
flat assembler version 1.69.14 (1907572 kilobytes memory)
10 passes, 0.9 seconds, 2541934 bytes.
Linking:CounterStrike2D.exe
D:/BlitzMax/bin/ld.exe: cannot find -lpsapi
Build Error: Failed to link D:/Users/UserName/Documents/Project/MainSource.exe
Process complete


kfprimm(Posted 2016) [#7]
Which MinGW distro?

I ran into the same issue recently when I was playing around with mingw-w64 and msys.

Try TDM-GCC.


SimonasQu(Posted 2016) [#8]
As usually I followed installation instructions and download links from here: http://www.blitzbasic.com/Community/posts.php?topic=90964

I'm checking out TDM-GCC right now.

Edit: Still have the same problem.


Brucey(Posted 2016) [#9]
The standard BlitzMax requires you to have a bunch of lib files in BlitzMax/lib - but they are not all in there. You may need to copy extra ones you need from your MinGW distro (for example libpsapi.a).


SimonasQu(Posted 2016) [#10]
It would be great that someone could help me to set it up. I know that bmax doesn't lack any files, because I have the same build on another computer with same files, and it's working.


Brucey(Posted 2016) [#11]
Your error message indicates that you are trying to link to libpsapi.

Well, libpsapi.a isn't in the BlitzMax/lib folder. If you want to use it with the standard BlitzMax, you will need to copy it from your MinGW distro into the BlitzMax/lib folder.

This whole MinGW thing has always been one of BlitzMax's flakier things. (Which is why I built my own version of bmk and made it much easier to set up BlitzMax with MinGW - I suppose, since BlitzMax is now open source, we should try to get a package (with MinGW) built so that it becomes a no-brainer to use on Windows)