I'm try to compile a .c file from the terminal using gcc. The file includes a personal library where a function is defined. This library.h and the .c file are in the same directory.

I get the following message error 

```
undefined reference to `function'"

```

Should I use another argument as: 

```
gcc -o nameoutput filename

```

or should I place the library.h in another directory?