>>>>> "CK" == Cameron Kay <C.G.Kay@stripped> writes:
CK> gcc -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient -o
CK> demo demo.c
CK> ld: fatal: Symbol referencing errors. No output written to demo
CK> collect2: ld returned 1 exit status
CK> *** Error code 1
CK> Any idea what I'm doing wrong?
The "cc" command line is defined to be scanned once, left to right.
Try going thru that process mentally and see what happens. Libraries
are scanned to only pull out what is needed from them at the time they
are scanned.