Hi Conrad:

Just to conclude this thread which I started by mistake on this list,
want to say that I was able to isolate the problem. I am using GCC 2.96,
and in that for some reasons, if i compile the generated .c/.h files
using g++ compiler and then link with other source also compiled with
g++ compiler, the linking fails saying that the function in question
could not be resolved. instead of that, if i compile the generated
.c/.h files with gcc compiler (instead of g++), this problem goes away.

Frankly, I could not find the explanation behind this, and this behaviour
is definitely not exhibited in GCC3.2.x series of compiler, i.e. in that
case i could successfully compile & link with g++ compiler alone.

In future, if I need support, I'd definitely write to the tool vendor for
support, i.e. OSS in this case.

Thanks for your explanation and response Conrad.

Regards,
Banibrata Dutta.

> -----Original Message-----
> From: OSS Technical Support CS [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 14, 2004 7:10 PM
> To: Banibrata Dutta
> Cc: [EMAIL PROTECTED]
> Subject: Re: [ASN.1] problems due to OSS_SPARTAN_AWARE
> 
> 
> > the macro OSS_SPARTAN_AWARE conditionally declares the following :-
> >     extern void _oss_run_SOED_on_INTEL_X86_LINUX_20(void);
> > in the generated C file, where it then goes on to call this 
> function, 
> > again conditionally, i.e. if OSS_SPARTAN_AWARE is defined.
> >
> > my problem is that inspite of all my efforts, somehow when 
> i link my 
> > program (using other 3rd party libs too), with 
> libasn1code.so (or .a 
> > for that matter), all other symbols s.a. ossPrint() get resolved, 
> > except this one. what could be the problem ? i've tried 
> > compiling/linking in following manner...
> >
> > g++ -D_GNU_SOURCE -pthread -Wall -fexceptions -ansi -pedantic -I
> > 
> /home/dutta/ASN1_tools/Clang/ossasn1/linux-glibc2.2.trial/6.1.2/includ
> > e/ -I . MyAppMain.o MyTank.o -o MyTankApp MyAppMain.C 
> > 
> -L/home/dutta/ASN1_tools/Clang/ossasn1/linux-glibc2.2.trial/6.1.2/lib
> > -lasn1code -Wl,-rpath -L/opt/garbo/lib-lGarbo -lgarbo -lpthread -lm 
> > -ldl -Wl,-a,shared
> >
> > BERdec.o: In function `_ossinit_NC_IS41Dsms(ossGlobal *)':
> > BERdec.o(.text+0x7f): undefined reference to 
> > `_oss_run_SOED_on_INTEL_X86_LINUX_20(void)'
> > collect2: ld returned 1 exit status
> >
> > i've generated the C file using the following options:-
> >     asn1 ../../asn1dflt.linux-x86 BERdec.asn -ber
> > note that i don't have this problem when i compile the 
> sample problem.
> >
> > any ideas/pointers/hints ??
> 
> Dear Mr. Dutta:
> 
> We suspect the reason for the difficulty is the order of the 
> modules in your g++ command line. The order of object files 
> in a gcc/g++ linker line is important, the module that calls 
> a function should be listed BEFORE the module that contains 
> the function. In your case, BERdec.o is the compiled file 
> produced by OSS ASN.1/C compiler. Since BERdec.o is not 
> explicitly listed on your command line, we suppose it's 
> stored in the garbo library. Is this correct? But the 
> implementation of
> _oss_run_SOED_on_INTEL_X86_LINUX_20() is stored in the 
> libasn1code OSS library, so you should list the library with 
> the module that corresponds to the generated file before the 
> OSS library, i.e. before -lasn1code. Please try to change 
> your line to something like:
> 
> g++ -D_GNU_SOURCE -pthread -Wall -fexceptions -ansi -pedantic
> -I/home/dutta/ASN1_tools/Clang/ossasn1/linux-glibc2.2.trial/6.
> 1.2/include/
> -I. MyAppMain.o MyTank.o -o MyTankApp MyAppMain.C 
> -L/opt/garbo/lib-lGarbo -lgarbo 
> -L/home/dutta/ASN1_tools/Clang/ossasn1/linux-glibc2.2.trial/6.1.2/lib
> -lasn1code -Wl,-rpath -lpthread -lm -ldl -Wl,-a,shared
> 
> Please let me know if this helps.
> 
> If the problem persists, please provide us enough information 
> to allow us to reproduce the difficulty (it is best to 
> provide us with a minimized test, not your full application). 
> Please send us the *.c files (not just compiled objects and 
> libraries) and command lines showing how they should be C compiled.
> 
> I appreciate this opportunity to be of service.
> 
> Conrad Sigona
> OSS Nokalva Technical Support
> General Support Telephone No. +1-732-302-9669 extension 1
> 
> Click here www.oss.com/password.html to download manuals.
> 
> 
> @LICENSE: 51922Z
> @NAME: Mr. Banibrata Dutta
> @EMAIL: [EMAIL PROTECTED]
> @DATE: 04/14/04
> @INCIDENT: 5074
> 

Reply via email to