[xsde-users] libxsde.a - undefined reference to 'std::ios_base::Init::Init()

Kevin Drake kdrake3 at oswego.edu
Thu Feb 6 11:47:12 EST 2014


Hi Boris,

Glad to provide you as much detail as possible. Thank you for the quick
response and the advice you provided. I modified the linker portion of my
project's build settings, but still get the same results. I tried to
correct the problem in two different ways. Below are the details.

1.       I modified the linker flags  and placed libxsde.a at the front of
the system library list.

--start-group "C:/xsde/xsde-3.2.0/libxsde/xsde/libxsde.a" -Xlinker
--end-group

--start-group "C:/xsde/xsde-3.2.0/libxsde/xsde/libxsde.a" -Xlinker
--end-group

--start-group "${MQX_ROOT_DIR}/lib/twrk70f120m.cw10gcc/release/psp/psp.a"
-Xlinker --end-group

--start-group "${MQX_ROOT_DIR}/lib/twrk70f120m.cw10gcc/release/bsp/bsp.a"
-Xlinker --end-group

--undefined=__pformatterFP

--defsym=__pformatter=__pformatterFP

--start-group

-lxsde -lgcc -lc -lrt -lm -lc++ -lsupc++ -lstdc++ -lhosted -lshell-cpp-dbg
-lmfs-cpp-dbg -lrtcs-cpp-dbg

--end-group

I did a clean and re-build of the project but got the same results. I also
tried to modify the order of the system libraries as you suggested, but
ended up with other errors from dependent code provided by others working
on the project. I then went back to original order and moved on to trying
option 2.

2.       I thought more about what was trying to do and decided to take the
libxsde.a library out of the system library list and added xsde to the list
of "other objects" that get placed before the system libraries when the
link command is issued.

"${MCU_TOOLS_HOME}/../MCU/ARM_GCC_Support/ewl/lib/armv7e-m/softfp/__arm_start.o"

"${MCU_TOOLS_HOME}/../MCU/ARM_GCC_Support/ewl/lib/armv7e-m/softfp/__arm_end.o"

"C:/xsde/xsde-3.2.0/libxsde/xsde/libxsde.a"

"${MQX_ROOT_DIR}/lib/twrk70f120m.cw10gcc/release/psp/psp.a"

"${MQX_ROOT_DIR}/lib/twrk70f120m.cw10gcc/release/bsp/bsp.a"

Again, I did a clean and re-build of the project. Unfortunately, I got the
same errors.



Do you have any other suggestions I can try? Are there any additional
options to try with how I built the runtime libxsde.a library?



Kevin




On Wed, Feb 5, 2014 at 11:29 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi Kevin,
>
> Thanks for provided a detailed description of your setup. It makes
> figuring out what's wrong so much easier and I wish everyone would
> send reports like this.
>
> Kevin Drake <kdrake3 at oswego.edu> writes:
>
> > -lgcc -lc -lrt -lm -lc++ -lsupc++ -lstdc++ -lhosted -lxsde
>
> Try to put -lxsde before all the system libraries (especially
> lstdc++). When using static libraries this order becomes
> important and generally you should try ti list them in the
> most specific (e.g., user libraries) to most generic (e.g.,
> system libraries) order. In fact, your list looks like it
> needs to be reversed.
>
> Boris
>


More information about the xsde-users mailing list