Subject Re: compile api1.c
Author vandy899
--- In firebird-support@yahoogroups.com, "nightslord"
<nightslord@y...> wrote:
>
> Note: installed firebird path ;
> /opt/firebird/
>
> --- In firebird-support@yahoogroups.com, "nightslord" <nightslord@y...
> > wrote:
> >
> > Hi all,
> > I'm installed FirebirdSS-1.5.2.4731-0.i686.tar on Fedora Core 1. And
> > compile
> > api1.c getting error ;
> >
> > [root@localhost examples]# gcc api1.c
> > /tmp/ccpkIcLV.o(.text+0x95): In function `main':
> > : undefined reference to `isc_dsql_execute_immediate'
> > /tmp/ccpkIcLV.o(.text+0xa8): In function `main':
> > : undefined reference to `isc_sqlcode'
> > /tmp/ccpkIcLV.o(.text+0x115): In function `main':
> > : undefined reference to `isc_commit_transaction'
> > /tmp/ccpkIcLV.o(.text+0x13f): In function `main':
> > : undefined reference to `isc_detach_database'
> > /tmp/ccpkIcLV.o(.text+0x15f): In function `main':
> > : undefined reference to `isc_attach_database'
> > /tmp/ccpkIcLV.o(.text+0x1a7): In function `main':
> > : undefined reference to `isc_start_transaction'
> > /tmp/ccpkIcLV.o(.text+0x1ca): In function `main':
> > : undefined reference to `isc_dsql_execute_immediate'
> > /tmp/ccpkIcLV.o(.text+0x208): In function `main':
> > : undefined reference to `isc_commit_transaction'
> > /tmp/ccpkIcLV.o(.text+0x225): In function `main':
> > : undefined reference to `isc_start_transaction'
> > /tmp/ccpkIcLV.o(.text+0x248): In function `main':
> > : undefined reference to `isc_dsql_execute_immediate'
> > /tmp/ccpkIcLV.o(.text+0x283): In function `main':
> > : undefined reference to `isc_commit_transaction'
> > /tmp/ccpkIcLV.o(.text+0x2a6): In function `main':
> > : undefined reference to `isc_detach_database'
> > /tmp/ccpkIcLV.o(.text+0x2ef): In function `pr_error':
> > : undefined reference to `isc_print_status'
> > /tmp/ccpkIcLV.o(.text+0x300): In function `pr_error':
> > : undefined reference to `isc_sqlcode'
> > collect2: ld returned 1 exit status
> > [root@localhost examples]#

Sorry, just noticed - that's an example app. You want to put a -L in
- man gcc is your friend. The command you likely want is "gcc
-L/opt/firebird/lib -I/opt/firebird/include -lfbclient api1.c"