4 Replies Latest reply on Jul 10, 2014 3:55 PM by JPMontero_Intel

    question about shared library

    LeiZhou

      Hi Sir/Ma'am,

       

      We need build part of our applications to shared lib, and load/unload them dynamically. Do you have a demo/template for this kind of usages?

      Thanks.

       

      Lei

        • 1. Re: question about shared library
          JPMontero_Intel

          HI

          We currently don’t have demos nor templates. Could you explain what kind of library do you need?

          Regards,
          JPMontero_Intel

          • 2. Re: question about shared library
            LeiZhou

            Hi,

             

            I used: yocto-layer create meta-ShareLib  command to create my layer, and changed the .bb file as following:

            SRC_URI = "file://footest.c"                    //footest.c is a very simple hello world shared lib program

            ...

            S = "${WORKDIR}"

            do_compile() {

                     ${CC} -Wall -Werror -fpic footest.c

                         ${CC} -shared -o libfootest.so footest.o

            }

            do_install() {

                     install -d ${D}${bindir}

                     install -m 0755 libfootest.so ${D}${bindir}

            }

            And then, I rebuild the system. I was hoping to get libfootest.so installed as shared lib in my target image. But it did not.

            I tried to run:

            bitbake meta-ShareLib

            The result is:

            Parsing of 908 .bb files complete (906 cached, 2 parsed). 1271 targets, 128 skipped, 0 masked, 0 errors.

            ERROR: Nothing PROVIDES 'meta-ShareLib'

            What is the problems?

            Thanks for your help.

             

            Lei

            • 3. Re: question about shared library
              LeiZhou

              Hi,

              By the way, I already changed /build/conf/bblayers.conf.

              the name of my layer is meta-ShareLib, which command should I use for this layer bitbake?

              bitbake ShareLib-image  or bitbake meta-ShareLib doesnot work.

               

              Thanks.

               

              Lei

              • 4. Re: question about shared library
                JPMontero_Intel

                Hi LeiZhou

                We are currently working to provide you more information regarding this post, as soon as we have more suggestions we will let you know.

                Regards
                JPMontero_Intel