Subject | Multiple Definition of Database Handle and Transactions |
---|---|
Author | Lester B. Cuevas |
Post date | 2005-09-27T13:46:23Z |
Hi Ann
Anyone who can help me with my problems in Embedded SQL using
Linux C.. Im having trouble dealing with multiple *.e files in my
project with different database connections. When Im trying to
compile my project using gcc compiler the compiler complains about
multiple definitions of gds_database and gds_trans. Below are the
codes, what or where do i made an error?
.e.c:
$(GPRE) $< -d $(DB01)
.c.o:
$(CC) $< $(CFLAGS) $@
.o:
$(LINK) -o $@ $< $(LINK_FLAGS)
$(EC).c: $(EC).e
$(GPRE) -d $(DB01) $<
******* End of Rmake file *******
I hope you give some example to solve my problems
thank you very much.
Anyone who can help me with my problems in Embedded SQL using
Linux C.. Im having trouble dealing with multiple *.e files in my
project with different database connections. When Im trying to
compile my project using gcc compiler the compiler complains about
multiple definitions of gds_database and gds_trans. Below are the
codes, what or where do i made an error?
> Hi Ann,codes we are using. Please see below:
>
> With regards to your question I'm includes the RMake file
>directory
> ******* Start of RMake file ********
>
>
> # CHANGE this definition to point to your InterBase installation
>---
> # ------------------------------------------------------------------
>---
> IBASE= /opt/firebird
>
> # ------------------------------------------------------------------
>---
> # General InterBase Defines for Linux
>
> # ------------------------------------------------------------------
>---
> GPRE= $(IBASE)/bin/gpre -c -n -m
>
> ISQL= $(IBASE)/bin/isql
>
> DB02= CIFHOST
>
> DB01= $(FRONTIER)/database_files/$(DB02).GDB
>
> EC2 = s_asm_ssm001
>
> EC= $(FRONTIER)/esql_files/$(EC2)
>
> # ------------------------------------------------------------------
>---
> # General Compiler and linker Defines for Linux
>
> # ------------------------------------------------------------------
>.SUFFIXES: .o .c .e
> CC= gcc
>
> LINK= gcc
>
> LIB_LINK= ld
>
> CFLAGS= -c -w -I$(IBASE)/include -DDEBUG
>
> #CFLAGS= -c -w -I$(IBASE)/include
>
> LIB_CFLAGS= -fPIC $(CFLAGS)
>
> LINK_FLAGS= -lgds -ldl -lcrypt
>
> LIB_LINK_FLAGS= -shared -lgds
>
> RM= rm -f
>
> # ------------------------------------------------------------------
.e.c:
$(GPRE) $< -d $(DB01)
.c.o:
$(CC) $< $(CFLAGS) $@
.o:
$(LINK) -o $@ $< $(LINK_FLAGS)
$(EC).c: $(EC).e
$(GPRE) -d $(DB01) $<
******* End of Rmake file *******
I hope you give some example to solve my problems
thank you very much.