Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ld: fatal: symbol referencing errors

JustHowardNov 2 2016 — edited Nov 9 2016

Greetings,

I have a  C program (not C++) using the <ldap.h> library.  The program is apparently choking during the link step and giving symbol reference errors to my object file.  I have looked at the <ldap.h> file and each of these entries are in the file, so it would seem that linking should not fail.  (and yes, I do have the #include <ldap.h> directive in my code.  These are the ONLY link errors I see, so I suspect something is either not acceptable to the linker, or there perhaps is an 'error' in the <ldap.h> file itself.

I have included a clip from the build output window below.

The system is an M6-32 running Solaris 11.2 with Solaris Studio 12.4

Again, the code is "C", not C++

Many thanks to all in advance for your help and consideration

Howard

dmake: defaulting to parallel mode.

See the man page dmake(1) for more information on setting up the .dmakerc file.

"/opt/solarisstudio12.4/bin/dmake" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf

"/opt/solarisstudio12.4/bin/dmake"  -f nbproject/Makefile-Release.mk dist/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd

mkdir -p build/Release/OracleSolarisStudio-Solaris-Sparc

cc   -c -fast -g -s -o build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o chkpwd.c

mkdir -p build/Release/OracleSolarisStudio-Solaris-Sparc

cc   -c -fast -g -s -o build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o chkpwd.c

mkdir -p dist/Release/OracleSolarisStudio-Solaris-Sparc

cc    -o dist/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

mkdir -p dist/Release/OracleSolarisStudio-Solaris-Sparc

cc    -o dist/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

Undefined                               first referenced

symbol                                    in file

ldap_first_entry                    build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ldap_err2string                     build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ldap_perror                          build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ldap_init                               build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ldap_search_s                     build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ldap_simple_bind_s             build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ldap_set_option                   build/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd.o

ld: fatal: symbol referencing errors

*** Error code 2

dmake: Fatal error: Command failed for target `dist/Release/OracleSolarisStudio-Solaris-Sparc/chkpwd'

Current working directory /export/home/howard/SolStudioProjects/chkpwd

*** Error code 1

dmake: Fatal error: Command failed for target `.build-conf'

Current working directory /export/home/howard/SolStudioProjects/chkpwd

*** Error code 1

dmake: Fatal error: Command failed for target `.build-impl'

This post has been answered by Peter.Damron-Oracle on Nov 3 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2016
Added on Nov 2 2016
2 comments
1,302 views