UNDEFINED REFERENCES ERROR while adding DCMTK Libs in QT project..
-
wrote on 9 Nov 2018, 12:35 last edited by
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?
-
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?
wrote on 9 Nov 2018, 14:58 last edited by@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?
-
wrote on 10 Nov 2018, 01:11 last edited by ashajg 11 Oct 2018, 01:12
@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 -lofstdAnd I followed those instructions...
-
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 ?
-
wrote on 10 Nov 2018, 12:49 last edited by ashajg 11 Oct 2018, 12:51
@dheerendra
Hi sirI am unable to run program, I added these libs in my QT project and got those errors.
-
Qt Champions 2022wrote on 10 Nov 2018, 12:52 last edited by dheerendra 11 Oct 2018, 14:04
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.
-
wrote on 10 Nov 2018, 13:50 last edited by
Ok sir
-
wrote on 21 Nov 2018, 09:08 last edited by ashajg
This problem is solved by:
- not setting ANDROID_TOOLCHAIN_NAME in cmake
- by compiling source code in RELEASE mode.