Subject Multiple Definition of Database Handle and Transactions
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?

> Hi Ann,
>
> With regards to your question I'm includes the RMake file
codes we are using. Please see below:
>
> ******* Start of RMake file ********
>
>
> # CHANGE this definition to point to your InterBase installation
directory
>
> # ------------------------------------------------------------------
---
>
> 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
>
> # ------------------------------------------------------------------
---
>
> 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
>
> # ------------------------------------------------------------------

.SUFFIXES: .o .c .e

.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.