Subject trouble building collation driver
Author martinknappe
hi all
we've now resoved the first problem; compiling David's example
objects works now.
Next we started to tinker with the source and adapt it to our needs;
it's not yet finished but we're already running into problems: the
initialiser of our collation makes use of functions such as fopen,
fseek, and fgetc..
We don't get that compiled; the linker complains about
these "unresolved" functions

The makefile is as follows:

# -------------------------- makefile.bc -------------------------
# Makefile for Windows using Borland C

# --------------------------------------------------------------------
-
# InterBase Installation Directory
#
# CHANGE this definition to point to your InterBase installation
directory
# --------------------------------------------------------------------
-
IBASE= c:\Program Files\Borland\InterBase

# --------------------------------------------------------------------
-
# Borland C/C++ Installation Directory
#
# CHANGE this definition to point to your compiler's installation
directory
# --------------------------------------------------------------------
-
BCDIR= c:\Borland\bcc55

# --------------------------------------------------------------------
-
# General Compiler and linker Defines for Borland C/C++
# --------------------------------------------------------------------
-
COMMON_FLAGS= -u+ -c -v -w- -a4 -tWM -DWIN32 $(INCLUDE)
CFLAGS= $(COMMON_FLAGS) -tWC
LIB_CFLAGS= $(COMMON_FLAGS) -tWCD
INCLUDE= -I"C:\Borland\Bcc55\include"
LFLAGS= /c /x /ap /Tpe
LIBS= "$(IBASE)\lib\psdk\gds32.lib"
CC= "$(BCDIR)\bin\bcc32.exe"
LINK= "$(BCDIR)\bin\ilink32.exe"
IMPLIB= "$(BCDIR)\bin\implib.exe"
COPY= copy
RM= del


.SUFFIXES: .c .obj

.c.obj:
$(CC) $(LIB_CFLAGS) $<

# --------------------------------------------------------------------
-
# Specific targets to build
# --------------------------------------------------------------------
-

# Note: INTL_DEST must be .../bin for V5.x and v4.x
# but .../intl for V6.x
INTL_DEST= $(IBASE)/intl

# Object files in the international example
INTL_EXAMPLE_OBJS = ld2.obj cs_example.obj cv_example.obj
lc_example.obj

all: clean gdsintl2.dll install test

gdsintl2.dll: $(INTL_EXAMPLE_OBJS) intl2.bind
-$(RM) gdsintl2.dll
-$(RM) gdsintl2.lib
$(LINK) -m -s -Tpd -ap -c $(LINK_OPTS) -w \
$(INTL_EXAMPLE_OBJS),\
gdsintl2.dll,,,intl2.bind
$(IMPLIB) gdsintl2.lib gdsintl2.dll


ld2.obj: ld2.c cs_example.h charsets.h intlobj.h
cs_example.obj: cs_example.c cs_example.h charsets.h intlobj.h
cv_example.obj: cv_example.c cs_example.h charsets.h intlobj.h
lc_example.obj: lc_example.c cs_example.h charsets.h intlobj.h

install:
$(COPY) gdsintl2.dll "$(INTL_DEST)"

clean:
-$(RM) *.obj
-$(RM) gdsintl2.dll
-$(RM) gdsintl2.lib
-$(RM) intl2.bind

test:
isql -i cs_example.sql

intl2.bind:
-$(RM) intl2.bind
echo LIBRARY gdsintl2 INITINSTANCE > intl2.bind
echo DESCRIPTION 'InterBase International DLL #2' >>
intl2.bind
echo DATA MULTIPLE >> intl2.bind
echo EXPORTS >> intl2.bind
echo _LD2_lookup @1 >> intl2.bind



Please, can someone help?

Thanx,

Martin