stupid makefile question
i dont know why this is doing this. i have a makefile setup to run...
compiler = /usr/bin/g++ compilerflags = -ansi -Wall OBJECTS = driver.o driver: driver.o $(compiler) $(compilerflags) -o driver driver.o driver.o: driver.c /usr/include/driver.h $(compiler) $(compilerflags) -c driver.c it compiles and i get driver as the executable. but how do i run it? it's been a while for me and i get bash: driver: command not found when i type in driver any ideas? :( |
./driver . (the current directory) usually isn't in your $PATH, so you have to specify it explicitly.
|
im not sure what you mean...
|
How about the command: make driver
|
that gives me the same thing, i already have the target as driver
|
What btmiller means is that instead of typing
driver<enter> you should use ./driver<enter> because in Linux by default executables are only picked when they can be found in the directories that the path variable points at echo $PATH for a test ... alternatively, you can use a qualified filename to run it, e.g. /home/user/src/mypackage/driver or a shorthand that contains a reference to a directory, e.g. ~/mypackage/driver or, as suggested above, ./driver [edit] For more detail have a look at the output of ls -la in a not too full directory... at the top of the listing you'll see something like Code:
[tink@diggn:/tmp]$ ls -la to the current directory (.) and the parent directory (..) [/edit] Cheers, Tink |
All times are GMT -5. The time now is 04:41 PM. |