[yocto] Yocto SDK generated - unable to compile application

Evan O'Loughlin evan.oloughlin at vitalograph.ie
Thu Sep 20 01:08:53 PDT 2018


Hello,

I’m having an issue when I try to use the SDK generated by my yocto instance.
Currently I have yocto set-up to correctly build my image – this all works well.

I've built the SDK in the following ways:
   * bitbake {image} –c populate_sdk
   * bitbake meta-toolchain-qt5
   * bitbake {image-sdk} using a separate recipe with the options:
       - require {image}.bb
       - IMAGE_FEATURES += " dev-pkgs tools-sdk tools-debug eclipse-debug debug-tweaks"
       - IMAGE_INSTALL += "kernel-devsrc"
       - inherit populate_sdk populate_sdk_qt5


When I try to use the generated SDKs I get the error below:
Simple helloworld app:
   #include <stdio.h>
   #include <stdlib.h>
   #include <stddef.h>
   #include <cstddef>
   
   int main (int argc, char** argv)
   {
      printf("Hello World\n");
      return 0;
   }

Compile error:
   ${CC} helloworld.c 
   helloworld.c:4:19: fatal error: cstddef: No such file or directory
   #include <cstddef>
                    ^
   compilation terminated


Have I missed a step in generating the SDK?


Regards,
vitalEol


More information about the yocto mailing list