Re: UDF unter DB2 V6.1 /Windows NT
[ ruban.de ] [ Antworten ] [ Forum ]
Geschrieben von Axel Pürner am Oktober 30, 2001 um 11:43:
Als Antwort auf UDF unter DB2 V6.1 /Windows NT geschrieben von Roland on Oktober 29, 2001 um 20:56:
Ich benutze z.B. eine angepaßte Version der mitgelieferten Übersetzungsprozedur für SQL Stored Procs. Aufruf als xxx.bat; Inhalt: set SQLROUTINE_FILENAME=%1 set db2path=D:\SQLLIB nmake /f D:\programme\sqlproc.mak sqlproc.mak hat folgenden Inhalt # Note: The default compiler options are set for the Microsoft Visual C++ # compiler. If you use the IBM VisualAge C++ compiler, remove the # "COMPILER=MS" below and uncomment "COMPILER=IBM" that follows. COMPILER=MS #COMPILER=IBM # Note: The default is to build with no DEBUG options. If you want to # build with DEBUG options, remove "DEBUG=NO" below and uncomment # "DEBUG=YES" that follows. DEBUG=NO #DEBUG=YES CFLAGSDEB= LINKFLAGSDEB= !IF "$(COMPILER)" == "MS" # Microsoft Visual C++ compiler CC=cl !IF "$(DEBUG)" == "YES" CFLAGSDEB=-Z7 LINKFLAGSDEB=-debug:full -pdb:none -debugtype:cv !ENDIF CFLAGS=-Od -W2 -TC -D_X86_=1 $(CFLAGSDEB) -I"$(DB2PATH)\include" LINKFLAGS=/link -dll $(LINKFLAGSDEB) /out:$(SQLROUTINE_FILENAME).dll !ENDIF !IF "$(COMPILER)" == "IBM" # IBM VisualAge C++ compiler CC=icc !IF "$(DEBUG)" == "YES" CFLAGSDEB=-Ti LINKFLAGSDEB=/DEBUG !ENDIF CFLAGS=-Ge- -Gm+ -W0 $(CFLAGSDEB) -I"$(DB2PATH)\include" LINKFLAGS=/B"/ST:96000 /PM:VIO /DLL $(LINKFLAGSDEB)" !ENDIF LIBS="$(DB2PATH)\lib\db2api.lib" {$(SQLROUTINE_FILENAME)}.dll: !IF "$(COMPILER)" == "MS" $(CC) $(CFLAGS) $(SQLROUTINE_FILENAME).cpp $(LINKFLAGS) -def:$(SQLROUTINE_FILENAME).def $(LIBS) !ELSE ilib /GI $(SQLROUTINE_FILENAME).def $(CC) $(CFLAGS) $(SQLROUTINE_FILENAME).cpp $(LINKFLAGS) $(SQLROUTINE_FILENAME).exp $(LIBS) !ENDIF Bitte anpassen an individuelle Umgebung und den jeweiligen C-Compiler. MfG Axel Pürner
Schreibe eine Antwort
|