I use external Library OT_SPISmartSD_LIB.dso OT_SPISmartSD_LIB.lib
QT SDK 1.1.3 Cannot compile But I have example on Carbide 3.2 , Result is OK:
how to solve it?
I use external Library OT_SPISmartSD_LIB.dso OT_SPISmartSD_LIB.lib
QT SDK 1.1.3 Cannot compile But I have example on Carbide 3.2 , Result is OK:
how to solve it?
Error Message
Code::-1: Running command: C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/tools/checklib.exe stdc++ --elf C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/qtmain.lib Running command: C:/QtSDK/Symbian/tools/gcce4/bin/arm-none-symbianelf-g++.exe -Wl,-Ttext,0x8000 -Wl,--no-undefined -nodefaultlibs -Wl,-shared -Wl,-Tdata,0x400000 -Wl,--default-symver '-Wl,-soname=SmartSD{000a0000}[e072cffd].exe' -Wl,--entry=_E32Startup -Wl,-u,_E32Startup,C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/eexe.lib -o C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/SmartSD.exe.sym -Wl,-Map=C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/SmartSD.exe.map @C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/build/smartsd/c_64e058c9507782bb/SmartSD_exe/armv5/udeb/SmartSD_udeb_objects.via --start-group C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/usrt3_1.lib --end-group C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/usrt3_1.lib C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/qtmain.lib C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/libstdcppv5.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/QtGui.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/QtCore.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/libpthread.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/libc.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/libm.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/euser.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/libdl.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/stdnew.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/drtaeabi.dso C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/dfpaeabi.dso -lsupc++ -lgcc c:/qtsdk/symbian/tools/gcce4/bin/../lib/gcc/arm-none-symbianelf/4.4.1/../../../../arm-none-symbianelf/bin/ld.exe:
Error Code continue:
Code:warning: C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/udeb/usrt3_1.lib(ucppinit.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `SDThread(void*)': ot_smartsd_lib.cpp:(.text+0x30): undefined reference to `RFile::Write(TDesC8 const&)' ot_smartsd_lib.cpp:(.text+0x38): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x6c): undefined reference to `RFile::Seek(TSeek, int&) const' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `LOG_Time(TBuf<32>, int)': ot_smartsd_lib.cpp:(.text+0x1d4): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1e8): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1f4): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x208): undefined reference to `RFile::Create(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x260): undefined reference to `RFile::Seek(TSeek, int&) const' ot_smartsd_lib.cpp:(.text+0x27c): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x284): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0x298): undefined reference to `RFile::Write(int, TDesC8 const&, int)' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `LOG(char*, int)': ot_smartsd_lib.cpp:(.text+0x2d0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x2e4): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x2f0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x304): undefined reference to `RFile::Create(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x348): undefined reference to `RFile::Seek(TSeek, int&) const' ot_smartsd_lib.cpp:(.text+0x364): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x36c): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0x380): undefined reference to `RFile::Write(int, TDesC8 const&, int)' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `LOG_To_Hex(char*, int)': ot_smartsd_lib.cpp:(.text+0x438): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x44c): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x458): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x46c): undefined reference to `RFile::Create(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x4d4): undefined reference to `RFile::Seek(TSeek, int&) const' ot_smartsd_lib.cpp:(.text+0x4e4): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x4ec): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0x50c): undefined reference to `RFile::Write(int, TDesC8 const&, int)' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `GetDriveSizeInfoL(TChar, long long&)': ot_smartsd_lib.cpp:(.text+0x554): undefined reference to `RFs::Connect(int)' ot_smartsd_lib.cpp:(.text+0x564): undefined reference to `RFs::CharToDrive(TChar, int&)' ot_smartsd_lib.cpp:(.text+0x590): undefined reference to `RFs::Drive(TDriveInfo&, int) const' ot_smartsd_lib.cpp:(.text+0x5b8): undefined reference to `TVolumeInfo::TVolumeInfo()' ot_smartsd_lib.cpp:(.text+0x5c8): undefined reference to `RFs::Volume(TVolumeInfo&, int) const' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `JumpFile()': ot_smartsd_lib.cpp:(.text+0x71c): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x734): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x754): undefined reference to `RFile::Write(TDesC8 const&)' ot_smartsd_lib.cpp:(.text+0x75c): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x764): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `CreateKeyfile(int, int)': ot_smartsd_lib.cpp:(.text+0xb3c): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0xb50): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0xb60): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0xb64): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0xb78): undefined reference to `RFile::Create(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0xb98): undefined reference to `RFile::SetSize(int)' ot_smartsd_lib.cpp:(.text+0xba8): undefined reference to `RFile::SetAtt(unsigned int, unsigned int)' ot_smartsd_lib.cpp:(.text+0xbb0): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0xbcc): undefined reference to `RFile::Size(int&) const' ot_smartsd_lib.cpp:(.text+0xbe0): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0xbe4): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0xbf0): undefined reference to `RFs::Delete(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0xc00): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0xc0c): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `CreateSingleFile()': ot_smartsd_lib.cpp:(.text+0xc64): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0xc78): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0xc88): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0xcb8): undefined reference to `RFs::Connect(int)' ot_smartsd_lib.cpp:(.text+0xcc8): undefined reference to `RFs::MkDir(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0xcdc): undefined reference to `RFs::SetAtt(TDesC16 const&, unsigned int, unsigned int)' ot_smartsd_lib.cpp:(.text+0xd48): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `WriteCard_forCache()': ot_smartsd_lib.cpp:(.text+0xe58): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0xe6c): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0xe98): undefined reference to `RFile::Write(TDesC8 const&)' ot_smartsd_lib.cpp:(.text+0xea0): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0xea8): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `WriteCard(char*)': ot_smartsd_lib.cpp:(.text+0xf50): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0xf68): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0xfb4): undefined reference to `RFile::Write(int, TDesC8 const&)' ot_smartsd_lib.cpp:(.text+0xfbc): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0xfc4): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `ReadCard(char*)': ot_smartsd_lib.cpp:(.text+0x10c8): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x10dc): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x10ec): undefined reference to `RFile::ReadCancel() const' ot_smartsd_lib.cpp:(.text+0x1104): undefined reference to `RFile::Read(TDes8&) const' ot_smartsd_lib.cpp:(.text+0x110c): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0x1178): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x118c): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1244): undefined reference to `RFile::Read(int, TDes8&) const'
Error Code Continue:
Code:C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `ReadCard_NoCheck(char*)': ot_smartsd_lib.cpp:(.text+0x132c): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1340): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x13c8): undefined reference to `RFile::ReadCancel() const' ot_smartsd_lib.cpp:(.text+0x13fc): undefined reference to `RFile::Read(TDes8&) const' ot_smartsd_lib.cpp:(.text+0x1404): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0x148c): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x14ac): undefined reference to `RFile::Seek(TSeek, int&) const' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `dummyWrite(int)': ot_smartsd_lib.cpp:(.text+0x14f0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1504): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x154c): undefined reference to `RFile::Write(TDesC8 const&)' ot_smartsd_lib.cpp:(.text+0x1554): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x1564): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `OT_SmartSDCard_initialization(char*)': ot_smartsd_lib.cpp:(.text+0x1754): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1760): undefined reference to `RFs::Delete(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x18a0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x18ac): undefined reference to `RFs::MkDirAll(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x18c0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x18d4): undefined reference to `RFile::Replace(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1a38): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1a44): undefined reference to `RFs::Delete(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x1a4c): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1a58): undefined reference to `RFs::Delete(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x1aa8): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1abc): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1ae4): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1af0): undefined reference to `RFs::MkDirAll(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x1b00): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1b14): undefined reference to `RFile::Replace(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1b34): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1b40): undefined reference to `RFs::MkDirAll(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x1b50): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1b64): undefined reference to `RFile::Replace(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1b84): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1b90): undefined reference to `RFs::MkDirAll(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x1ba0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1bb4): undefined reference to `RFile::Replace(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x1bd4): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1be0): undefined reference to `RFs::MkDirAll(TDesC16 const&)' ot_smartsd_lib.cpp:(.text+0x1bf0): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x1c04): undefined reference to `RFile::Replace(RFs&, TDesC16 const&, unsigned int)' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `OT_SmartSDCard_Format()': ot_smartsd_lib.cpp:(.text+0x1e5c): undefined reference to `RFile::Close()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `SendDATA(char*)': ot_smartsd_lib.cpp:(.text+0x34c8): undefined reference to `CCoeEnv::Static()' ot_smartsd_lib.cpp:(.text+0x34dc): undefined reference to `RFile::Open(RFs&, TDesC16 const&, unsigned int)' ot_smartsd_lib.cpp:(.text+0x3530): undefined reference to `RFile::Write(int, TDesC8 const&)' ot_smartsd_lib.cpp:(.text+0x3538): undefined reference to `RFile::Flush()' ot_smartsd_lib.cpp:(.text+0x3540): undefined reference to `RFile::Close()' ot_smartsd_lib.cpp:(.text+0x3564): undefined reference to `CCoeEnv::Static()' C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474/epoc32/release/armv5/lib/OT_SPISmartSD_LIB.dso(OT_SmartSD_LIB.o): In function `CleanupClose<RFile>::Close(void*)': ot_smartsd_lib.cpp:(.text._ZN12CleanupCloseI5RFileE5CloseEPv[CleanupClose<RFile>::Close(void*)]+0x0): undefined reference to `RFile::Close()' collect2: ld returned 1 exit status
.pro
Code:.proCode:# Add files and directories to ship with the application # by adapting the examples below. # file1.source = myfile # dir1.source = mydir DEPLOYMENTFOLDERS = # file1 dir1 symbian:TARGET.UID3 = 0xE072CFFD # Smart Installer package's UID # This UID is from the protected range # and therefore the package will fail to install if self-signed # By default qmake uses the unprotected range value if unprotected UID is defined for the application # and 0x2002CCCF value if protected UID is given to the application #symbian:DEPLOYMENT.installer_header = 0x2002CCCF # Allow network access on Symbian symbian:TARGET.CAPABILITY += NetworkServices # If your application uses the Qt Mobility libraries, uncomment # the following lines and add the respective components to the # MOBILITY variable. # CONFIG += mobility # MOBILITY += SOURCES += main.cpp mainwindow.cpp HEADERS += mainwindow.h \ OT_SmartSD_LIB.h FORMS += mainwindow.ui # Please do not modify the following two lines. Required for deployment. include(deployment.pri) qtcAddDeployment() OTHER_FILES += \ win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Lib_ot/ -lOT_SPISmartSD_LIB else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Lib_ot/ -lOT_SPISmartSD_LIBd else:symbian: LIBS += -lOT_SPISmartSD_LIB else:unix: LIBS += -L$$PWD/Lib_ot/ -lOT_SPISmartSD_LIB INCLUDEPATH += $$PWD/Lib_ot DEPENDPATH += $$PWD/Lib_ot win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/Lib_ot/OT_SPISmartSD_LIB.lib else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/Lib_ot/OT_SPISmartSD_LIBd.lib else:unix:!symbian: PRE_TARGETDEPS += $$PWD/Lib_ot/libOT_SPISmartSD_LIB.a
use external function
Code:#include "mainwindow.h" #include "ui_mainwindow.h" #include <QtCore/QCoreApplication> #include <OT_SmartSD_LIB.h> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } void MainWindow::setOrientation(ScreenOrientation orientation) { #if defined(Q_OS_SYMBIAN) // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); return; } } #endif // Q_OS_SYMBIAN Qt::WidgetAttribute attribute; switch (orientation) { #if QT_VERSION < 0x040702 // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes case ScreenOrientationLockPortrait: attribute = static_cast<Qt::WidgetAttribute>(128); break; case ScreenOrientationLockLandscape: attribute = static_cast<Qt::WidgetAttribute>(129); break; default: case ScreenOrientationAuto: attribute = static_cast<Qt::WidgetAttribute>(130); break; #else // QT_VERSION < 0x040702 case ScreenOrientationLockPortrait: attribute = Qt::WA_LockPortraitOrientation; break; case ScreenOrientationLockLandscape: attribute = Qt::WA_LockLandscapeOrientation; break; default: case ScreenOrientationAuto: attribute = Qt::WA_AutoOrientation; break; #endif // QT_VERSION < 0x040702 }; setAttribute(attribute, true); } void MainWindow::showExpanded() { #if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) showFullScreen(); #elif defined(Q_WS_MAEMO_5) showMaximized(); #else show(); #endif } void MainWindow::on_pushButton_clicked() { char *drive = "F" ; OT_SmartSDCard_initialization(drive) ; // String tmp = ""; }
OT_SmartSD_LIB.h
Code:#ifndef __OT_SMARTSD_LIB_H__ #define __OT_SMARTSD_LIB_H__ // Include Files #include <e32base.h> // Function Prototypes //-------------------------------------------------------------------------- // MACRO CONSTANTS //-------------------------------------------------------------------------- #ifndef SD_OK #define SD_OK 0 #define SD_FAIL 1 #define SD_ERR_SmartSD_NOT_INIT 0x70 #define SD_ERR_WRITE 0x71 #define SD_ERR_READ 0x72 #define SD_ERR_SET_PPS_INDEX 0x73 #define SD_ERR_TIME_OUT 0x74 #define SD_ERR_PCODE_TIME_OUT 0x75 #define SD_WAR_RESPONSE_LEN 0x76 #define SD_ERR_SPI_NO_PPS 0x77 #define SD_ERR_SET_CLK_INDEX 0x78 #define SD_ERR_FIXED_DATA_LENGTH 0x79 #endif //SD_OK //////////////////////////////////////////////////////////// //INFO. EXPORT_C unsigned char OT_SmartSDCard_initialization(char *cDrive); EXPORT_C unsigned char OT_SmartSDCard_GetCID(char *card_cid); EXPORT_C unsigned char OT_SmartSDCard_GetCardVersion(char *card_version); EXPORT_C unsigned char OT_SmartSDCard_GetLIBVersion(char *lib_version); //Format EXPORT_C unsigned char OT_SmartSDCard_Format(void); //APDU EXPORT_C unsigned char OT_SmartSDCard_SetupAPDUReturnStatus(char *s8onoff); EXPORT_C unsigned char OT_SmartSDCard_Reset(int &s32ATR_len, char *ps8ATR_Buffer); EXPORT_C unsigned char OT_SmartSDCard_Endtransmission(void); EXPORT_C unsigned char OT_SmartSDCard_EnableFixedDataCommand(int s32APDU_len, char *ps8APDU_Buffer); EXPORT_C unsigned char OT_SmartSDCard_SendAPDUCommand(int s32APDU_len, char *ps8APDU_Buffer); EXPORT_C unsigned char OT_SmartSDCard_GetAPDUCommand(int &s32APDU_len, char *ps8APDU_Buffer); EXPORT_C unsigned char OT_SmartSDCard_SendData(char *ps8APDU_Buffer); EXPORT_C unsigned char OT_SmartSDCard_GetData (char *ps8APDU_Buffer); EXPORT_C unsigned char OT_SmartSDCard_AccessAPDUCommand(int s32Send_len, char *s8Send_APDU,int &s32Get_len, char *s8Get_APDU, unsigned int u32Waiting_MILLISECOND); EXPORT_C unsigned char OT_SmartSDCard_GetAPDUCommand_Block(int &s32APDU_len, char *ps8APDU_Buffer, unsigned int u32Waiting_time); //SUPPORT HIGH SPEED CHIP ONLY //CARD VER. 08XXXX_X_XXXXX EXPORT_C unsigned char OT_SmartSDCard_SendPPSCommand(int s32APDU_len, char *ps8APDU_Buffer, int s32PPSIdx); EXPORT_C unsigned char OT_SmartSDCard_SetSPICLK(unsigned int u32Index); EXPORT_C unsigned char OT_SmartSDCard_EnableFixedDataLengthCommand(int s32APDU_len, char *ps8APDU_Buffer, unsigned char u8Length); #endif // __OT_SMARTSD_LIB_H__
"Undefined reference" means missing implementation. The messages show that you need the libraries containing RFile and CCoeEnv. These are Symbian API-s, but very basic ones, so they are present in the Qt SDK too. efsrv.lib and cone.lib are the ones.
thank you for your help . it's pass already, I can continue doing.