Undefined Symbol

When I try to link a .so file I get the undefined symbol error. Though I have the library file in my system. The compile and linking commands used are as follows

g++ -m64 -g -Wall -I./include -c dxl_sample.c
g++ -o firstprogram -m64 -g -Wall -I./include -Bdynamic -L/export/home/bscsix3/lib/sun10.x -ldx dxl_sample.o 
Undefined                       first referenced
 symbol                             in file
dxl_init                            dxl_sample.o
ld: fatal: symbol referencing errors. No output written to firstprogram
collect2: ld returned 1 exit status
gmake: *** [firstprogram] Error 1

Result of uname -a

SunOS t5220x1039 5.10 Generic_147440-01 sun4v sparc SUNW,SPARC-Enterprise-T5220

It means what it says, the code is using the dxl_init function even though it's not defined anywhere.

You may be missing a library or another source file which needs to be linked with it..