Problem:
Call of the "make all" (Make-File see below) returns the following error:
Undefined
first referenced
symbol
in file
SQLADR sample1.o
SQLBEX sample1.o
SQLADRVC sample1.o
ld: fatal: Symbol referencing errors. No output written to sample1
make: Fatal error: Command failed for target 'sample1'
#
# AUTOMATICALLY GENERATED MAKEFILE - DO NOT MODIFY
#
# Makefile created using Micro Focus NetExpress UNIX Option
# from project: DbMigration
#
#
# Build Environment
#
COBDIR=/opt/microfocus/cobol
COPYDIR=/wirbank/whome/piguet/cobol/cob_src/sample
SYSCOPYDIR=$(COBDIR)/cpylib
# NetExpress Project Directives: %FILENAME COBIDY(%TARGETDIR) WB3 WB CSI EDITOR(MF2) ENSUITE(3) FOLD-COPY-NAME"LOWER" p(cobsql) CSQLT=ORACLE8;
PROJ_DIRECTIVES=WB CSI EDITOR(MF2) FOLD-COPY-NAME(LOWER) p(cobsql) CSQLT=ORACLE8
# ----------------
# Source File List
# ----------------
#
# sample1.cbl
#
# RULES: "all" will make everything
#
all:
cleanmfenv mfenv.sh Release
@touch .scp.make
cleanmfenv:
@rm -f mfenv.sh
mfenv.sh:
@echo "#!/bin/sh" > mfenv.sh
@echo "COBDIR=$(COBDIR)" >> mfenv.sh
@echo "export COBDIR" >> mfenv.sh
@echo "LD_LIBRARY_PATH=\\$$COBDIR/lib:\\$$LD_LIBRARY_PATH" >> mfenv.sh
@echo "export LD_LIBRARY_PATH" >> mfenv.sh
@echo "PATH=\\$$COBDIR/bin:\\$$PATH" >> mfenv.sh
@echo "export PATH" >> mfenv.sh
@echo "COBCPY=.:$(COPYDIR):$(SYSCOPYDIR):\\$$COBCPY" >> mfenv.sh
@echo "export COBCPY" >> mfenv.sh
@echo "COBOPT=\\"-C directives=dbmigration.dir\\"" >> mfenv.sh
@echo "export COBOPT" >> mfenv.sh
@echo "eval \\$$*" >> mfenv.sh
@chmod x mfenv.sh
@echo "Updated mfenv.sh"
@echo "$(PROJ_DIRECTIVES)" > dbmigration.dir.tmp
@if cmp -s dbmigration.dir dbmigration.dir.tmp ; \\
then \\
rm dbmigration.dir.tmp ; \\
else \\
mv dbmigration.dir.tmp dbmigration.dir ; \\
echo "Updated directives file: dbmigration.dir" ; \\
fi
sample1:
sample1.o
./mfenv.sh cob -x -o sample1 sample1.o
sample1.o:
sample1.cbl dbmigration.dir
./mfenv.sh cob -cx sample1.cbl
Release:
sample1
clean:
rm -f mfenv.sh dbmigration.dir sample1 sample1.o
Resolution:
The error is returned due to cobsqlintf.o and libclntsh.a (or .so) not being included in the build (These are Oracle supplied modules).
When building Oracle applications, we recommend unchecking the 'build on server' option within the UNIX publish setup. Once migrated, build the application based on the command-line shown by the Oracle sample programs, under $ORACLE_HOME/precomp/demo/procob2 . Note that if you are using Oracle 10, the sample programs are only available from the Oracle Companion CD.
For more information on building Pro*COBOL applications on UNIX, see Micro Focus Database Access Manual and Knowledgebase article 22062.



