Reputation: 28
Trying to compile some programs from source i've been running into the same issue multiple times. maybe I'm doing something wrong but every time I use Make I get "Error 1" and "no such file or directory".
root@Linda:/home/ulysses/Downloads/alsaequal# make
GCC pcm_equal.c
pcm_equal.c:21:28: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^
compilation terminated.
make: *** [pcm_equal.o] Error 1
Similarly,
root@Linda:/home/ulysses/Downloads/ele_project# make
g++ `gtk-config --cflags` -D_REENTRANT -c -Wall -O main.cpp
/bin/sh: 1: gtk-config: not found
main.cpp:1:21: fatal error: gtk/gtk.h: No such file or directory
#include <gtk/gtk.h>
^
compilation terminated.
make: *** [main.o] Error 1
Error 1 means that there was a problem with the Makefile itself right? but then why am I getting that error returned on everything I try? Maybe they're different problems. the second seems like an issue with GTK but i have no experience with that. Any interpretations are greatly appreciated.
Thanks, G
Upvotes: 0
Views: 4074
Reputation: 100856
See my answer to another similar question just posted this morning:
Makefile error that works fine in console
The error you see does not mean an error in the makefile. If there were, make
would give information on what was wrong with your makefile and the linenumber in the makefile where it happened.
The problem you have in both the above examples is you're trying to compile code that requires some development libraries (alsa in the first one, GTK in the second one) and you don't have them. You'll need to use your package manager to install them; exactly what commands you need and what package names you need depends entirely on which distribution of Linux (if you're using Linux) you have, and you don't give this information.
Once your compile operations work, then you won't get this error from make.
Upvotes: 1