Compiling PDCurses into ".a", error with mingw command

301 views Asked by At

I'm following this tutorial: https://www.youtube.com/watch?v=mYnfix8ruAo for compiling PDCurses and linking it to a CodeBlocks project, but I keep getting an error ('mingw32-make' is not recognized as an internal or external command, operable program or batch file.)

The thing is, I definitely have mingw installed properly, and have a path pointing to it in the system environment variables. http://puu.sh/id6nC/3ab670cbdc.png In the terminal, I tried the command twice without specifying a target file to make sure it's recognized, and it is. It's not until after I get to the point that I want to build the library that it stops recognizing it as a command for some reason. I'd really appreciate any help.

1

There are 1 answers

0
William McBrine On

This isn't a PDCurses issue, it's a PATH issue. The PATH is an environment variable that the command-line shell uses to locate the executables you type as commands, if they aren't in the current directory, or shell built-ins. It's a list of directories, separated by semi-colons. Each directory is checked in turn, until a match is found.

Specifcally, your problem is this line:

path=c:\CodeBlocks\mingw\bin

Apparently, mingw32-make is not in that location. But, since it was found without that line, you clearly don't need the line -- at least not for that. So, just take it out.

Now, if it later turns out that you do need to add \CodeBlocks\mingw\bin to your PATH for some other reason, then the way to do it is like this:

path=%PATH%;c:\CodeBlocks\mingw\bin

This appends your new path to the existing PATH, instead of wiping out the existing PATH and replacing it with that directory alone.