iit-danieli-joint-lab / idjl-gcc-vxworks

Helpers script to compile a version of GCC that crosscompiles to VxWorks.
4 stars 3 forks source link

pls help me, why I can't generate an executable file? #27

Open yuzu-ogura opened 6 months ago

yuzu-ogura commented 6 months ago

I use this helper script on windows. first step, I open the git bash terminal, then source the setup.sh.This step is ok. next step, I write a simple test "helloworld", and write a CMakeList.txt, seeing blow: file list image main.cpp image CMakeLists.txt image last step, I execute two coommands like below: 1、cmake image 2、ninja image look at the red rectangle, generate result is a relocatable file, not an executable file, please tell me where the mistake is?

traversaro commented 6 months ago

As far as I know, this is expected as all programs are libraries in VxWorks. Have you tried to load and run the resulting program/library in a VxWorks system?

yuzu-ogura commented 6 months ago

As far as I know, this is expected as all programs are libraries in VxWorks. Have you tried to load and run the resulting program/library in a VxWorks system?

First of all, thank you very much for your quick reply. I load the generate file like below: image It seems that could not find such symbols.

traversaro commented 6 months ago

Sorry, I do not remember a lot about this. Probably you need to link either stdc++, supc++ or libgcc . See https://github.com/iit-danieli-joint-lab/idjl-gcc-vxworks/blob/master/idjl_vxworks_toolchain.cmake.in#L52-L83 . Probably you can check where the those symbols are defined with nm or similar commands.

yuzu-ogura commented 6 months ago

That's okay. Thank you for your answer