I'm having some serious issues with my C program that is trying to use the MySQL API. I created an example program that just connects to a mysql database and that works fine. On the other hand when I drop that same code into a more complicated program. The program compiles fine and when I try and run it , it looks like it exits immediately. The MySQL functions don't return any errors and my program won't even produce any output. For example with the MySQL code in my more complicated program if I put a printf statement at the top it doesn't even output when I try and run it. Anyone have any ideas?
Just to make sure this is what I'm compiling it with (I use the pcre library as well):
Code:
gcc complicate_prorgam.c -o complicated_programd -I/usr/local/include -L/usr/local/lib/mysql -lmysqlclient -lpcre
I produce no errors when I compile it using that command.
Any insight? I need to use the C MySQL API to complete this program and I don't understand why it doesn't work when I paste known working code into my program. Thanks.