Unable to add static library in MCUxpresso IDE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to add static library in MCUxpresso IDE

1,758 Views
Adarsh317
Contributor I

I am trying to add PEG library to FRDMk64F using MCUxpresso IDE

for the FRDM board i have created a sample project, I need to add static library of PEG (libpeg.a)

I have tried to add ligpeg.a to c/c++ General->Paths and Symbols->libraries-> added file from workspace.
But i got error showing cannot find cannot find -lC:/peg/MCUXpressoIDE_11.6.0_8187/workspace/MK64F12_HelloPeg/lib/libpeg.a

Also i tried using the method mentioned here.
https://community.nxp.com/t5/MCUXpresso-IDE-Knowledge-Base/How-to-create-and-use-static-library-in-M...

Can anyone please suggest on how to add static library?

0 Kudos
Reply
7 Replies

1,755 Views
ErichStyger
Specialist I

You have to add 'peg' (notice that lib and .a are not used) for the -l linker option. Note that with the -L option you specify where to search for the libraries.

See https://mcuoneclipse.com/2017/07/23/how-to-use-custom-library-names-with-gnu-linker-and-eclipse/ and as well https://mcuoneclipse.com/2013/02/12/creating-and-using-libraries-with-arm-gcc-and-eclipse/ .

I hope this helps,

Erich

0 Kudos
Reply

1,743 Views
Adarsh317
Contributor I

Hi Erich, Thankyou for your replay,

I have used the method you have mentioned, but I am getting below errorCapture.PNG

Building target: MK64F12_HelloPeg.axf
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib -L"C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\lib" -Xlinker -Map="MK64F12_HelloPeg.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -T MK64F12_HelloPeg_Debug.ld -o "MK64F12_HelloPeg.axf" ./utilities/fsl_debug_console.o ./utilities/fsl_str.o ./startup/startup_mk64f12.o ./source/cpp_config.o ./source/pegapp.o ./source/sample.o ./source/sample_res.o ./source/semihost_hardfault.o ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_common_arm.o ./drivers/fsl_dspi.o ./drivers/fsl_gpio.o ./drivers/fsl_i2c.o ./drivers/fsl_rtc.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o ./device/system_MK64F12.o ./component/uart/fsl_adapter_uart.o ./component/serial_manager/fsl_component_serial_manager.o ./component/serial_manager/fsl_component_serial_port_uart.o ./component/lists/fsl_component_generic_list.o ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o -lpeg
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `PegThing::Contains(PegPoint const&)':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\source\include/pthing.hpp:108: undefined reference to `PegRect::Contains(PegPoint) const'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `PegThing::Invalidate()':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\source\include/pthing.hpp:184: undefined reference to `PegThing::Invalidate(PegRect const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `PegWindow::CreateHScroll()':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\source\include/pwindow.hpp:143: undefined reference to `PegHScroll::PegHScroll(PegScrollDrawInfo*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `PegWindow::CreateVScroll()':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\source\include/pwindow.hpp:144: undefined reference to `PegVScroll::PegVScroll(PegScrollDrawInfo*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `PegAppInitialize(PegPresentationManager*)':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:30: undefined reference to `PegResourceManager::InstallResourcesFromTable(PegResourceTable const*, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:31: undefined reference to `PegInputDevice::ReadyInputDevices()'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `sample::sample(int, int)':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:47: undefined reference to `PegWindow::PegWindow(unsigned long)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:56: undefined reference to `PegWindow::InitClient()'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:61: undefined reference to `PegPrompt::PegPrompt(PegRect const&, unsigned int, unsigned short, unsigned long)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:62: undefined reference to `PegWindow::Add(PegThing*, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:66: undefined reference to `PegTextButton::PegTextButton(PegRect const&, unsigned int, unsigned short, unsigned long)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:67: undefined reference to `PegWindow::Add(PegThing*, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `sample::Message(PegMessage const&)':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.cpp:87: undefined reference to `PegWindow::Message(PegMessage const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x10): undefined reference to `PegWindow::Add(PegThing*, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x18): undefined reference to `PegThing::AddStyle(unsigned long)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x1c): undefined reference to `PegThing::AddToEnd(PegThing*, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x20): undefined reference to `PegThing::Center(PegThing*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x24): undefined reference to `PegThing::CenterOf(PegThing*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x28): undefined reference to `PegThing::CheckDirectionalMove(int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x30): undefined reference to `PegThing::DefaultKeyHandler(PegMessage const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x34): undefined reference to `PegWindow::Draw(PegRect const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x38): undefined reference to `PegThing::DrawChildren(PegRect const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x3c): undefined reference to `PegThing::Find(unsigned short, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x40): undefined reference to `PegThing::FindNearestNeighbor(int, PegThing*, PegPoint)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x44): undefined reference to `PegThing::GetColor(unsigned char)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x4c): undefined reference to `PegThing::KillFocus(PegThing*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x54): undefined reference to `PegThing::MoveFocusToFirstClientChild()'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x58): undefined reference to `PegThing::MoveToFront(PegThing*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x5c): undefined reference to `PegThing::ParentShift(int, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x60): undefined reference to `PegThing::Remove(PegThing*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x6c): undefined reference to `PegWindow::Resize(PegRect const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x70): undefined reference to `PegThing::SendSignal(unsigned char)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x74): undefined reference to `PegThing::SetColor(unsigned char, unsigned int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x78): undefined reference to `PegThing::SetStyle(unsigned long)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x7c): undefined reference to `PegTextThing::DataSet(unsigned int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x80): undefined reference to `PegTextThing::DataSet(unsigned short const*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x84): undefined reference to `PegTextThing::RangeCheck(int, int, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x88): undefined reference to `PegTextThing::SetFont(unsigned int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x8c): undefined reference to `PegWindow::AddIcon(PegIcon*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x98): undefined reference to `PegWindow::DrawFrame(int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0x9c): undefined reference to `PegWindow::Execute(int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0xa0): undefined reference to `PegWindow::GetHScrollInfo(PegScrollInfo*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0xac): undefined reference to `PegWindow::GetVScrollInfo(PegScrollInfo*)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0xb0): undefined reference to `PegWindow::InitClient()'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0xb8): undefined reference to `PegWindow::SetScrollMode(unsigned int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0xc4): undefined reference to `PegWindow::BorderContains(PegPoint)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o:(.rodata._ZTV6sample+0xc8): undefined reference to `PegWindow::MoveClientObjects(int, int, int)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/sample.o: in function `sample::~sample()':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/sample.hpp:22: undefined reference to `PegWindow::~PegWindow()'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./source/pegapp.o: in function `main':
C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/pegapp.cpp:9: undefined reference to `PegCreateFramework(PegRect const&)'
c:/nxp/mcuxpressoide_11.6.0_8187/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.6.0.202112161359/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\1140\Documents\MCUXpressoIDE_11.6.0_8187\workspace\MK64F12_HelloPeg\Debug/../source/pegapp.cpp:17: undefined reference to `PegDestroyFramework()'
Memory region Used Size Region Size %age Used
PROGRAM_FLASH: 172432 B 1 MB 16.44%
SRAM_UPPER: 9744 B 192 KB 4.96%
SRAM_LOWER: 0 GB 64 KB 0.00%
FLEX_RAM: 0 GB 4 KB 0.00%
collect2.exe: error: ld returned 1 exit status
make[1]: *** [makefile:69: MK64F12_HelloPeg.axf] Error 1
make: *** [makefile:60: all] Error 2
"make -r -j8 all" terminated with exit code 2. Build might be incomplete.

14:23:34 Build Failed. 61 errors, 0 warnings. (took 2s.637ms)

0 Kudos
Reply

1,739 Views
ErichStyger
Specialist I

Hi @Adarsh317 ,

The good news is that it seems to find and link with the libpeg.a.

I'm not familiar with PEG, but is this library built for being used with C++? It seems it expects symbols/objects with C++ linkage? I would expect that all the interfaces you are using are having an 'extern "C"' in it if the PEG library is implemented in C (and not C++), what I assume?

I hope this helps,

Erich

0 Kudos
Reply

1,737 Views
Adarsh317
Contributor I

Hi Erich, 

Thank you for your reply.

libpeg.a is a precompiled library from NXP PEG lite.
All the files are in C++.

 

0 Kudos
Reply

1,734 Views
ErichStyger
Specialist I

Can you check the symbols of the peg library, if this is true?

Right-click on the library, Tools > View Image Info

There you should see all the needed symbols, and in the view you can turn on/off C++ demangling.

0 Kudos
Reply

1,730 Views
Adarsh317
Contributor I

Hi Erich,

i checked view image info
i am not getting anything it is showing loading..Capture1.PNG

0 Kudos
Reply

1,727 Views
ErichStyger
Specialist I

It should look like this:

ErichStyger_0-1660915573018.png

 

0 Kudos
Reply