Unsolved Undefined reference to `xxxxx@GLIBC_2.0'
-
Hello All,
I am adding a dynamic library (.so) that works fine with cross compiler MinGW on windows for embedded Linux application, but in Debian Linux for embedded development I get undefined reference error. I verified the version using command "ld -version" on both environment and the result is same:
Windows : GNU ld (GNU Binutils) 2.22 Linux : GNU ld (GNU Binutils for Debian) 2.22
Any help to solve this issue will be highly appreciated.
Thanks
-
Hi,
What symbol is it ?
-
Hi SGiast,
Following are the symbols/references giving me exception:
undefined reference to `fseek@GLIBC_2.0' undefined reference to `strcat@GLIBC_2.0' undefined reference to `malloc@GLIBC_2.0' undefined reference to `memset@GLIBC_2.0' undefined reference to `fopen@GLIBC_2.1' undefined reference to `memmove@GLIBC_2.0' undefined reference to `memcpy@GLIBC_2.0' undefined reference to `strcpy@GLIBC_2.0' undefined reference to `memcmp@GLIBC_2.0' undefined reference to `fwrite@GLIBC_2.0' undefined reference to `fclose@GLIBC_2.1' undefined reference to `pthread_mutex_lock@GLIBC_2.0' undefined reference to `pthread_self@GLIBC_2.0' undefined reference to `strncpy@GLIBC_2.0' undefined reference to `free@GLIBC_2.0' undefined reference to `pthread_mutex_init@GLIBC_2.0' undefined reference to `strchr@GLIBC_2.0' undefined reference to `remove@GLIBC_2.0' undefined reference to `pthread_mutex_destroy@GLIBC_2.0' undefined reference to `strlen@GLIBC_2.0' undefined reference to `strncat@GLIBC_2.0' undefined reference to `pthread_mutex_unlock@GLIBC_2.0' undefined reference to `fread@GLIBC_2.0' undefined reference to `ftell@GLIBC_2.0'
Thanks
-
Can you share your .pro file ?
-
Hi @SGaist ,
I am unable to upload the file, giving me not enough privileges for this action.
Alternately here are the contents of the file:TEMPLATE = app #This is the (name+version) for final product #version date : 20171103 TARGET = QR_EFT_01.00 CONFIG += qtopia #CONFIG += qtopia debug CONFIG += gcc #LIBS += -lOemDecode -lrpc -lbluetooth -lytprinter -lcurl -lgps -lytlibs LIBS += -lrpc MODULES *= qtopiacomm # These are the source files that get built to create the application FORMS = # These are the defines to control functionality in application during compilation #DEFINES += MAKE_CTLS += MAKE_TOPUP DEFINES += MAKE_EMV MAKE_SPDH DBGTRACE #QT += xml HEADERS = \ gprs_connect.h \ Sources/Common/Data/struct.h \ Sources/Isc_OS/basictyp.h \ Sources/Common/Txn_flow/transdef.h \ Sources/Common/Data/appdata.h \ Sources/Common/Data/defines.h \ Sources/Common/Txn_flow/function.h \ Sources/Common/Host/SPDH.H \ Sources/IscSDK/utllib.h \ Sources/IscSDK/stdint.h \ Sources/Common/Host/host.h \ Sources/Common/Txn_flow/validexp.h \ Sources/IscSDK/skd.h \ Sources/Common/Texts/msg.h \ Sources/NucleusInterface/Profile/persistence.h \ Sources/NucleusInterface/Profile/fileinit.h \ Sources/Common/Data/comdata.h \ Sources/Common/Data/TERMtab.h \ Sources/Common/Data/tabutil.h \ Sources/Common/Data/battab.h \ Sources/Common/Txn_flow/app1.h \ Sources/Common/Txn_flow/TxnFuncs.h \ Sources/Common/Txn_flow/cvv2proc.h \ Sources/Common/Data/tftab.h \ Sources/Common/Utils/util2.h \ Sources/Common/Txn_flow/MS_Flow/readCard.h \ Sources/Common/Txn_flow/ICC_Flow/emvl3.h \ Sources/Common/Host/hstmsg.h \ Sources/Common/Texts/msgfunc.h \ Sources/IscSDK/LibJrn/jrn.h SOURCES = \ gprs_connect.cpp \ main.cpp \ Sources/Common/Txn_flow/funct2.cpp \ Sources/Common/Data/appdata.c \ Sources/IscSDK/utllib.c \ Sources/Common/Txn_flow/validexp.c \ Sources/Common/Host/spdh.cpp \ Sources/Common/Host/reqspdh.c \ Sources/Common/Host/rspspdh.c \ Sources/Common/Data/comdata.c \ Sources/NucleusInterface/Profile/persistence.c \ Sources/Common/Data/TERMtab.c \ Sources/Common/Data/tabutil.c \ Sources/Common/Data/battab.c \ Sources/Common/Txn_flow/app1.c \ Sources/Common/Txn_flow/TxnFuncs.c \ Sources/Common/Txn_flow/cvv2proc.c \ Sources/Common/Data/tftab.c \ Sources/Common/Txn_flow/MS_Flow/readCard.c \ Sources/Common/Utils/util2.c \ Sources/Common/Txn_flow/ICC_Flow/emvl3.c \ Sources/Common/Host/hstmsg.c \ Sources/Common/Texts/msgfunc.c \ Sources/IscSDK/LibJrn/jrn.c LIBS += -L$$PWD/Sources/IscSDK/JrnLib -ljrn INCLUDEPATH += $$PWD/Sources/IscSDK/JrnLib DEPENDPATH += $$PWD/Sources/IscSDK/JrnLib
-
Qtopia ?
What distribution are you running on your target ?
What version of Qt are you using ? -
Hi @SGaist
Sorry for late reply due to bad health.
The target is Debian Linux (Ver 7.8) and QT 4.6 / QT Extended 4.4Thanks
-
Serious question: are you locked to those old and really outdated software ?
-
Hi @SGaist,
The answer is yes, bcoz the end target is a debit card processing hardware. -
How did you setup the cross-compiler on Windows ?
-
Hi @SGaist,
The cross compiler is auto configured with the licensed SDK+IDE by the hardware vendor we just need to run the setup file and produce activation key.
Please note that the hardware (SDK configured on windows) is different then the one whose SDK is configured on Debian Linux and formally known as Hypercom T42 series, I am unable attaching data sheet for your reference, but you can find it with this name:
"Equinox T4220 Data Sheet.pdf"Thanks
-
What version of Debian are you using ?
-
Hi @SGaist,
I have already replied, regardless please here is the information again.The target is Debian Linux (Ver 7.8) and QT 4.6 / QT Extended 4.4
-
Sorry, I wanted to check if it was what is running on your target device.
-
Hi @SGaist,
Target device technical specifications have only following information:
Linux Kernel 2.6.32 QT 4.8 QT Extended 4.4
Thanks
-
Just realised, did you add
LIBS += -lglib-2.0
to your project file ? -
Hi @SGaist,
No I didn't, let me add and check if it solves the issue. Will let you know the results shortly.
Thanks
-
Hi @SGaist,
I added glib-2.0 but still having same issue. Below is the link of file contains compile results as I am unable to upload the file here.
https://drive.google.com/open?id=18Tw9m4tZiTMbyklIvWHll8H724gGRWelThanks
-
@Kashif Did you rerun qmake and rebuild?
-
Hi @jsulm,
As i am using cross compiler, so I am using the build script provided by the device vendor. The build script did not actually rebuild the complete project until there is a change in the pro file or the main header file referenced everywhere. You can review the build and make scripts from following link:
https://drive.google.com/open?id=10MT8eTF7SFAR3zoSqFLbtKZGzOghfH4IThanks