Closed nikosvr88 closed 4 years ago
Hello @nikosvr88
Which platform are you targeting?
Can you share any compilation logs?
Hi @ftylitak I am trying to compile for android armv7a.
../../MobileApp/app/ExternalLibs/QZXING/zxing/zxing/oned/rss/DataCharacter.cpp: In member function 'zxing::String zxing::oned::rss::DataCharacter::toString() const':
../../MobileApp/app/ExternalLibs/QZXING/zxing/zxing/oned/rss/DataCharacter.cpp:31:19: error: 'to_string' is not a member of 'std'
return String(std::to_string(m_value) + '(' + std::to_string(m_checksumPortion) + ')');
^
../../MobileApp/app/ExternalLibs/QZXING/zxing/zxing/oned/rss/DataCharacter.cpp:31:51: error: 'to_string' is not a member of 'std'
return String(std::to_string(m_value) + '(' + std::to_string(m_checksumPortion) + ')');
^
../../MobileApp/app/ExternalLibs/QZXING/zxing/zxing/oned/rss/DataCharacter.cpp:32:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[1]: *** [DataCharacter.o] Error 1
make: *** [sub-app-make_first] Error 2
Ok, since you are targeting Android i would like some more info:
Since i can not find a apparent reason why you are having this compilation issue, as soon as you send me those info I will try to setup a development machine like yours and try to reproduce it.
@ftylitak
@ftylitak in order to solve the problem i've added the following code in every file that uses std::to_string
include
using namespace std;
namespace std { template < typename T > std::string to_string( const T& n ) { std::ostringstream stm ; stm << n ; return stm.str() ; } }
@ftylitak i have a problem when i am trying to scan barcode. Nothing happens, i mean that not reads the barcode. My code is the following:
import QtQuick 2.0
import QtMultimedia 5.5
import QZXing 2.3
Item {
Camera {
id: camera
exposure.exposureMode: Camera.ExposurePortrait
focus {
focusMode: CameraFocus.FocusContinuous
focusPointMode: CameraFocus.FocusPointAuto
}
}
VideoOutput {
id:videoOutput
anchors.fill: parent
source: camera
filters: [ zxingFilter ]
orientation:-90
}
QZXingFilter {
id: zxingFilter
decoder {
onTagFound: {
console.log(tag);
}
}
}
}
Leaving aside the issue that no barcode is decoded which will be examined in #138, to remove the workaround that you have added and keep the code simple i believe that you should change the NDK version to 10e.
I thing that Qt 5.9 was suggesting only NDK 10e. Could you try this?
@nikosvr88 do you have any update on this?
Closing due to inactivity.
I've included the QZXing.pri into my project but when start build the following error occured: 'to_string' is not a member of 'std' --------> file: DataCharacter.cpp line 31
Any ideas? I use Qt 5.9.6