This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

error in linking libraies with application


hello everyone,
 i am new buddy in ecos world. i have downloaded ecos-1.3.1-1.i386.rpm
from ecos homesite.and running it in redhat linux 9.
using ecosconfig command line utility i prepared build tree for
sythetic linux target. in /ecos-work/

------------------------------------------------------------------------------------
 [root@localhost /]# mkdir ecos-work 
[root@localhost /]# cd ecos-work/ 
[root@localhost ecos-work]# ecosconfig new linux 
[root@localhost ecos-work]# ls ecos.ecc 
------------------------------------------------------------------------------------
my gcc version is as follows so as specified in the tutorials i cahnged
 CYGBLD_GLOBAL_COMMAND_PREFIX in ecos.ecc to "". 
------------------------------------------------------------------------------------
 [root@localhost root]# gcc -v Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with:
../configure

--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking

--with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux 
Thread model: posix 
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) 
[root@localhost root]# 
----------------------------------------------------------------------------------
build tree is completed & finally use 'make' to give header files
libraries in /ecos-work/install/include & /ecos-work/install/lib.
finally i

want to run hello world application in /try/hello.c but i got following errors 
----------------------------------------------------------------------------------
[root@localhost ecos-work]# cd /try [root@localhost try]# gcc -g
-I/ecos-work/install/include hello.c -L/ecos-work/install/lib

-Ttarget.ld -nostdlib
/ecos-work/install/lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x3c):
In

function `__static_initialization_and_destruction_0(int, int)':
/ecos-work/install/include/cyg/kernel/thread.inl:436: undefined
reference

to `__dso_handle'
/ecos-work/install/lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x48):
In

function `__static_initialization_and_destruction_0(int, int)':
/ecos-work/install/include/cyg/kernel/sched.hxx:216: undefined

reference to `__cxa_atexit' 

/ecos-work/install/lib/libtarget.a(language_c_libc_mainthread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x41):
In

function `__static_initialization_and_destruction_0': 

/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/support/mainthread.cxx:121:
undefined reference to `__dso_handle'

/ecos-work/install/lib/libtarget.a(language_c_libc_mainthread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x4d):/opt/eco

s/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/support/mainthread.cxx:121:
undefined reference to `__cxa_atexit'

/ecos-work/install/lib/libtarget.a(kernel_clock.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b):
In function

`__static_initialization_and_destruction_0':
/ecos-work/install/include/cyg/kernel/clock.inl:63: undefined
reference to `__dso_handle'

/ecos-work/install/lib/libtarget.a(kernel_clock.o)(.text._Z41__static_initialization_and_destruction_0ii+0x37):
In function

`__static_initialization_and_destruction_0':
/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/common/clock.cxx:435:
undefined

reference to `__cxa_atexit' 

/ecos-work/install/lib/libtarget.a(language_c_libc_stdout.o)(.text._Z41__static_initialization_and_destruction_0ii+0x57):
In function

`__static_initialization_and_destruction_0':
/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/clibincl/stream.inl:119:

undefined reference to `__dso_handle' 

/ecos-work/install/lib/libtarget.a(language_c_libc_stdout.o)(.text._Z41__static_initialization_and_destruction_0ii+0x63):/opt/ecos/ec

os-1.3.1/packages/language/c/libc/v1_3_1/src/clibincl/stream.inl:119:
undefined reference to `__cxa_atexit'

/ecos-work/install/lib/libtarget.a(language_c_libc_stdiofiles.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b):
In

function `__static_initialization_and_destruction_0': 

/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/stdio/common/stdiofiles.cxx:71:
undefined reference to `__dso_handle'

/ecos-work/install/lib/libtarget.a(language_c_libc_stdiofiles.o)(.text._Z41__static_initialization_and_destruction_0ii+0x37):/opt/ecos/

ecos-1.3.1/packages/language/c/libc/v1_3_1/src/stdio/common/stdiofiles.cxx:71:
undefined reference to `__cxa_atexit'

/ecos-work/install/lib/libtarget.a(language_c_libc_errno.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b):
In function

`__static_initialization_and_destruction_0':
/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/errno/errno.cxx:104:

undefined reference to `__dso_handle' 

/ecos-work/install/lib/libtarget.a(language_c_libc_errno.o)(.text._Z41__static_initialization_and_destruction_0ii+0x37):/opt/ecos/eco

s-1.3.1/packages/language/c/libc/v1_3_1/src/errno/errno.cxx:105:
undefined reference to `__cxa_atexit' collect2: ld returned 1 exit
status
[root@localhost try]#
 ----------------------------------------------------------------------------------

 somebody please help me in getting out of this. 

~ Devendra Vyavahare.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]