gcc compile error (-lmysql: command not found)
hello everyone,
i have a program that uses pcap and mysql libraries. i have a makefile; Code:
all: Code:
LIBS=-L/usr/include/mysql -lmysqlclient -lpcap Code:
gcc -o main -L/usr/include/mysql -lmysqlclient main.c now how can i compile the source code that uses two libraries? |
In Makefiles, inside rules tab-indented sections are interpreted like shell commands, and this can include a var=value prefix to a command.
Instead, move the assignment to the LIBS variable out of the rule: Code:
LIBS = -L/usr/include/mysql -lmysqlclient -lpcap |
thanks for your answer.;)
|
All times are GMT -5. The time now is 02:27 AM. |