Building a library for RTEMS

Chris Johns chrisj at
Thu Jul 14 23:41:40 UTC 2016

On 15/07/2016 06:19, Sambeet Panigrahi wrote:
> When I am trying to compile the above I get a link failure error:
> sambeet at Holmes ~/NewRockPort/x86/Build/rock/rtt_test $
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-g++
> displayer.cpp -Ihome/sambeet/NewRockPort/x86/Build/rock/rtt_test/
> -I/home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/i386-rtems4.11/pc586/lib/include/

This command creates an executable. What you are seeing are the linker 
errors because you have not provided a suitable path to the RTEMS 
libraries for your BSP. To make a library you need to create an object 
file and then create a library containing that file.

> How can I build my library and create an executable for i386-rtems?

I suggest you search the net for ways to do this. A quick google gave me ..

RTEMS is statically linked so we only use static libraries, ie .a files. 
You need to substitute 'mygcc' and 'gcc' with 'i386-rtems4.11-g++' and 
'ar' with 'i386-rtems4.11-ar'.


More information about the users mailing list