Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. UNDEFINED REFERENCES ERROR while adding DCMTK Libs in QT project..
Forum Updated to NodeBB v4.3 + New Features

UNDEFINED REFERENCES ERROR while adding DCMTK Libs in QT project..

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 3 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ashajg
    wrote on 9 Nov 2018, 12:35 last edited by
    #1

    Hi guys

    I have compiled DCMTK source code for Android platform using ndk-r15c, API LEVEL 24
    When i am trying to add compiled libs to my qt project I am getting these errors:

    C:\Ashish\dcmtk-3.6.3\dcmnet\libsrc\dul.cc:383: error: undefined reference to 'signal'
    vrscanl.c:5453: error: undefined reference to 'stdin'
    vrscanl.c:5453: error: undefined reference to 'stdout'
    vrscanl.c:6098: error: undefined reference to 'stderr'
    C:\Ashish\dcmtk-3.6.3\oflog\libsrc\threads.cc:80: error: undefined reference to 'sigfillset'
    C:\Ashish\dcmtk-3.6.3\ofstd\libsrc\ofstd.cc:287: error: undefined reference to '__gnu_strerror_r'
    C:\Ashish\dcmtk-3.6.3\ofstd\libsrc\ofstring.cc:55: error: undefined reference to 'stderr'
    C:\Ashish\dcmtk-3.6.3\ofstd\libsrc\ofuuid.cc:62: error: undefined reference to 'rand'
    collect2.exe:-1: error: error: ld returned 1 exit status
    

    How can I solve these issues?

    P 1 Reply Last reply 9 Nov 2018, 14:58
    0
    • A ashajg
      9 Nov 2018, 12:35

      Hi guys

      I have compiled DCMTK source code for Android platform using ndk-r15c, API LEVEL 24
      When i am trying to add compiled libs to my qt project I am getting these errors:

      C:\Ashish\dcmtk-3.6.3\dcmnet\libsrc\dul.cc:383: error: undefined reference to 'signal'
      vrscanl.c:5453: error: undefined reference to 'stdin'
      vrscanl.c:5453: error: undefined reference to 'stdout'
      vrscanl.c:6098: error: undefined reference to 'stderr'
      C:\Ashish\dcmtk-3.6.3\oflog\libsrc\threads.cc:80: error: undefined reference to 'sigfillset'
      C:\Ashish\dcmtk-3.6.3\ofstd\libsrc\ofstd.cc:287: error: undefined reference to '__gnu_strerror_r'
      C:\Ashish\dcmtk-3.6.3\ofstd\libsrc\ofstring.cc:55: error: undefined reference to 'stderr'
      C:\Ashish\dcmtk-3.6.3\ofstd\libsrc\ofuuid.cc:62: error: undefined reference to 'rand'
      collect2.exe:-1: error: error: ld returned 1 exit status
      

      How can I solve these issues?

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 9 Nov 2018, 14:58 last edited by
      #2

      @ashajg said in UNDEFINED REFERENCES ERROR while adding DCMTK Libs in QT project..:

      to add compiled libs to my qt project

      please describe:

      • where in your Qt project folder structure you're placing your libs for Android
      • contents of your .pro file

      just in case, have you following these instructions to build DCMTK for Android?

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • A Offline
        A Offline
        ashajg
        wrote on 10 Nov 2018, 01:11 last edited by ashajg 11 Oct 2018, 01:12
        #3

        @Pablo-J-Rogina

        Hi sir

        I am keeping my lib and include folder where my project(.pro) file is present.

        And added these files by using this in my pro file:

        INCLUDEPATH += "C:/Ashish/TestApplications/TestDcmtkQT/TestDcmtkQT/include"
        LIBS += -L"$$PWD/lib/" -li2d -ldcmtls -ldcmnet -ldcmdata -loflog -lofstd

        And I followed those instructions...

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dheerendra
          Qt Champions 2022
          wrote on 10 Nov 2018, 12:31 last edited by
          #4

          when I look at the issue, they are all coming from DCMTK libs. So this is nothing do with Qt. Are you able to run any simple program on android using the DCMTK libraries ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ashajg
            wrote on 10 Nov 2018, 12:49 last edited by ashajg 11 Oct 2018, 12:51
            #5

            @dheerendra
            Hi sir

            I am unable to run program, I added these libs in my QT project and got those errors.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dheerendra
              Qt Champions 2022
              wrote on 10 Nov 2018, 12:52 last edited by dheerendra 11 Oct 2018, 14:04
              #6

              So qt has no role to play here. You should be able to compile some small example just using dcmtk library. Check whether you still get the issue.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              1 Reply Last reply
              2
              • A Offline
                A Offline
                ashajg
                wrote on 10 Nov 2018, 13:50 last edited by
                #7

                @dheerendra

                Ok sir

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  ashajg
                  wrote on 21 Nov 2018, 09:08 last edited by ashajg
                  #8

                  This problem is solved by:

                  1. not setting ANDROID_TOOLCHAIN_NAME in cmake
                  2. by compiling source code in RELEASE mode.
                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved