Closed mkgrgis closed 1 year ago
Not sure why or when this started happening, but for whatever reason gcc does not consider libraries specified before the object files when linking; previously this was being generated:
gcc -g -O2 -lfq -lfbclient -lreadline -lm -o fbsql main.o common.o input.o inputloop.o tab-complete.o command.o command_test.o query.o strlcpy.o pgstrcasecmp.o fbsqlscan.o
Fixed so it builds with this invocation:
gcc -g -O2 -o fbsql main.o common.o input.o inputloop.o tab-complete.o command.o command_test.o query.o strlcpy.o pgstrcasecmp.o fbsqlscan.o -lfq -lfbclient -lreadline -lm
Thanks, @ibarwick ! fbsql
works fine. I'm going to debug https://github.com/ibarwick/fbsql/issues/1.
Now there is only some code-style warnings like https://github.com/ibarwick/fbsql/issues/4.
Ubuntu, gcc, make
output
make
orsudo make install
outputmany errors about
undefined reference to FQ...
In this environmentlibfq
andfirebird_fwd
have been successfully compiled with no errors and no warnings and works in PostgreSQL.find /usr -iname "*libfq*"
output