Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

How to run "make" command on a "empty directory"?

Writer Emily Wong

I'm attempting to install something, and the instructions for installation say I have to use MSYS2 to use make on a certain directory to make a .exe file in my C drive.
This directory exists: I already know where it is. However, when putting in commands like cd \MYDIRECTORY && make, (I'm not familiar with the make command yet, keep that in mind...) an error appears:
bash: cd: MYDIRECTORY: No such file or directory. Am I typing it wrong? (I followed another question to try and fix it, but I don't understand it...) If so, how can I fix it? Any correct commands I can use?

SCREENSHOT:The instructions on GitHub.

Any feedback relating to this question helps!
Thanks, Omega207

11

1 Answer

  • MSYS2 basically gives you a Unix shell (namely bash), which is different from the Windows commandline.

  • The && just allows you two execute two commands in one line. Forget the make for the moment, concentrate on the cd.

  • cd \MYDIRECTORY is expecting MYDIRECTORY directly under the "root" of MSYS2, which is not going to work.

  • Try cd /cygdrive/c, if that works, then your MSYS2 uses the Cygwin conventions (that's the equivalen of typing C: under the Windows commandline).

  • Now try cd /cygdrive/c/Users/(USER)/AppData/Local/MYDIRECTORY. If you have spaces in your directory name, this may not work.

  • You can use pwd to have a look at your current directory.

  • Once you are in the current directory, remember that you need a file called Makefile in order for the command make to work. If you don't have that, it won't work.

  • If you already used cd to get into the right directory, you can just type make (no need for &&, no need for a cd).

Also, try working through some bash/Cygwin/MSYS2 tutorial, in order to get familiar with the commandline.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy