Subj Compiling with gcc no longer finds included defines
Compiling / linking c code with the gcc compiler began to have a problem. Although the process worked 48 hr. earlier, now it does not - - even on the same code file as before. The command, then the beginning of error messages, follows below.
$> gcc prog1.c -o porg1
/tmp/ccbPLX4E.o: In function ‘main’:0
/tmp/ccbPLX4E.o: (.text+0x72) undefined reference to ‘SQLAllocHandle’
/tmp/ccbPLX4E.o: (.text+0xc3) undefined reference to ‘SQLSetEnvAttr’
/tmp/ccbPLX4E.o: (.text+0x103) undefined reference to ‘SQLAllocHandle’
I then checked and found that those definitions can still be read inside /usr/include/sql.h, cited in the c code file as #include <sql.h>, prior to start of the function block for int main().. The references are function names in the API for unixODBC. Operating system is Suse 8.0 Linux.
How should this situation be resolved?
- - pipemole - - 4/15/2005;
Compiling / linking c code with the gcc compiler began to have a problem. Although the process worked 48 hr. earlier, now it does not - - even on the same code file as before. The command, then the beginning of error messages, follows below.
$> gcc prog1.c -o porg1
/tmp/ccbPLX4E.o: In function ‘main’:0
/tmp/ccbPLX4E.o: (.text+0x72) undefined reference to ‘SQLAllocHandle’
/tmp/ccbPLX4E.o: (.text+0xc3) undefined reference to ‘SQLSetEnvAttr’
/tmp/ccbPLX4E.o: (.text+0x103) undefined reference to ‘SQLAllocHandle’
I then checked and found that those definitions can still be read inside /usr/include/sql.h, cited in the c code file as #include <sql.h>, prior to start of the function block for int main().. The references are function names in the API for unixODBC. Operating system is Suse 8.0 Linux.
How should this situation be resolved?
- - pipemole - - 4/15/2005;