<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QTAndroid protobuf with QT creator]]></title><description><![CDATA[<p dir="auto">Hi, can you guide me on how to add protobuf in QTandroid application</p>
<p dir="auto">I tried with process given on this link<br />
<a href="https://stackoverflow.com/questions/44773136/google-protobuf-and-android-ndk" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/44773136/google-protobuf-and-android-ndk</a></p>
<p dir="auto">but still after adding myproject..pb.cc and myproject.pb.h files in my QT creator application it gives errors for non-virtual member function marked as final , undefined reference etc can you please help me with this?</p>
]]></description><link>https://forum.qt.io/topic/106353/qtandroid-protobuf-with-qt-creator</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 18:08:47 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/106353.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Aug 2019 07:34:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Fri, 06 Sep 2019 11:31:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/amol">@<bdi>amol</bdi></a> said in <a href="/post/549446">QTAndroid protobuf with QT creator</a>:</p>
<blockquote>
<p dir="auto">I used protobuf but it is for Windows or Linux</p>
</blockquote>
<p dir="auto">Ok, so you're somehow experienced with that technology.</p>
<p dir="auto">For me that I'm not, could you please explain how to use protobuf in a general way, and I guess that in the process you might figure out what you're doing differently or not yet doing for Android?</p>
<p dir="auto">In addition, when working with a 3rd party library or files that you want to use in a Qt application for Android the basic requirement is that the library is compiled for any of the Android platforms (usually arm6, arm7 and lately arm8) and that process is usually carried on separately from Qt Creator via the NDK (talking about a C++ library or files). Once you have the (shared) objects created with the NDK you place them in a proper location within the Qt project folder structure and then Qt Creator is finally able to create the Android app and deploy to the device configured in your kit.</p>
<p dir="auto">So talking about protobuf it couldn't be that different. You need to create with NDK whatever components are required (either a .so or files .cc and .h) and then add such files to your Qt project</p>
]]></description><link>https://forum.qt.io/post/549838</link><guid isPermaLink="true">https://forum.qt.io/post/549838</guid><dc:creator><![CDATA[Pablo J. Rogina]]></dc:creator><pubDate>Fri, 06 Sep 2019 11:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Fri, 06 Sep 2019 05:25:39 GMT]]></title><description><![CDATA[<p dir="auto">Yes, This application is hybrid application (ios,android and windows)<br />
for windows desktop application protobuf is working correctly without error,<br />
but when I change my kit to android then it gives above error</p>
]]></description><link>https://forum.qt.io/post/549758</link><guid isPermaLink="true">https://forum.qt.io/post/549758</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Fri, 06 Sep 2019 05:25:39 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Thu, 05 Sep 2019 12:35:27 GMT]]></title><description><![CDATA[<p dir="auto">Start by just building the protobuf related files so you ensure that you have that stuff working correctly. I would even start first by building for your desktop OS. That way you ensure that this part is working correctly before going forward with Android.</p>
]]></description><link>https://forum.qt.io/post/549632</link><guid isPermaLink="true">https://forum.qt.io/post/549632</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 05 Sep 2019 12:35:27 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Thu, 05 Sep 2019 11:58:48 GMT]]></title><description><![CDATA[<p dir="auto">After compiling from protobuf-cpp-3.9.1 and adding <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> and pb.h to project I get this error<br />
<img src="https://ddgobkiprc33d.cloudfront.net/18a2f88f-e4d6-4ad5-b790-d49b63cc93d8.png" alt="0_1567683866738_a8f75ad0-3bfc-4f60-bcb5-f433b61fe52f-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/549623</link><guid isPermaLink="true">https://forum.qt.io/post/549623</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Thu, 05 Sep 2019 11:58:48 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Thu, 05 Sep 2019 10:33:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a>  any comment on this???</p>
]]></description><link>https://forum.qt.io/post/549617</link><guid isPermaLink="true">https://forum.qt.io/post/549617</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Thu, 05 Sep 2019 10:33:13 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Thu, 05 Sep 2019 05:41:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>sgaist</bdi></a> said in <a href="/post/549476">QTAndroid protobuf with QT creator</a>:</p>
<blockquote>
<p dir="auto">distribution</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>sgaist</bdi></a> said in <a href="/post/549476">QTAndroid protobuf with QT creator</a>:</p>
<blockquote>
<p dir="auto">protoc just generate files in the programming language you choose. There's nothing special here, as I already suggested, install the protoc compiler from your distribution and generate the file with it.</p>
</blockquote>
<p dir="auto">yes<br />
as you said, i have  installed protobuf compiler on Linux 64 bit and from that only I am generating <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> and pb.h files</p>
<p dir="auto">Is that correct?</p>
]]></description><link>https://forum.qt.io/post/549549</link><guid isPermaLink="true">https://forum.qt.io/post/549549</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Thu, 05 Sep 2019 05:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Thu, 05 Sep 2019 05:15:05 GMT]]></title><description><![CDATA[<p dir="auto">Are you sure you have built protobuf for the correct architecture ? 32 vs 64 bit for example ?</p>
]]></description><link>https://forum.qt.io/post/549547</link><guid isPermaLink="true">https://forum.qt.io/post/549547</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 05 Sep 2019 05:15:05 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Thu, 05 Sep 2019 05:03:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>sgaist</bdi></a> said in <a href="/post/549502">QTAndroid protobuf with QT creator</a>:</p>
<blockquote>
<p dir="auto">LIBS +=</p>
</blockquote>
<p dir="auto">My proto file look like this:</p>
<p dir="auto">#-------------------------------------------------</p>
<h1></h1>
<h1>Project created by QtCreator 2016-03-22T07:38:29</h1>
<h1></h1>
<p dir="auto">#-------------------------------------------------</p>
<p dir="auto">QT       += core gui bluetooth<br />
CONFIG += c++11</p>
<p dir="auto">greaterThan(QT_MAJOR_VERSION, 4): QT += widgets</p>
<p dir="auto">TARGET = BLETester<br />
TEMPLATE = app</p>
<p dir="auto">SOURCES += main.cpp<br />
<a href="http://acp.pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">acp.pb.cc</a> <br />
dfuservice.cpp <br />
mainwindow.cpp <br />
bleinterface.cpp <br />
utils.cpp</p>
<p dir="auto">HEADERS  += mainwindow.h <br />
acp.pb.h <br />
bleinterface.h <br />
dfuservice.h <br />
lib-qt-qml-tricks/src/qqmlhelpers.h <br />
lib-qt-qml-tricks/src/qqmlhelpers.h <br />
utils.h</p>
<p dir="auto">FORMS    += mainwindow.ui</p>
<p dir="auto">win32:INCLUDEPATH += "$$PWD\google"</p>
<p dir="auto">RESOURCES += <br />
resources.qrc</p>
<p dir="auto">android{<br />
INCLUDEPATH += F:\QT_android\compile\protobuf-3.9.1\src<br />
LIBS += -L"F:\QT_android\compile\protobuf-3.9.1\src\protobuff_android" <br />
-lprotobuf <br />
-lprotobuf-lite <br />
-lprotoc<br />
}</p>
<h1>Turn off ALL warning for the project</h1>
<p dir="auto">win32:CONFIG += warn_off</p>
<p dir="auto">contains(ANDROID_TARGET_ARCH,armeabi-v7a) {<br />
ANDROID_EXTRA_LIBS = <br />
$$PWD/../protobuf_android/libprotobuf.so <br />
$$PWD/../protobuf_android/libprotobuf-lite.so <br />
$$PWD/../protobuf_android/libprotoc.so<br />
}</p>
<p dir="auto">DISTFILES += <br />
acp.proto</p>
]]></description><link>https://forum.qt.io/post/549546</link><guid isPermaLink="true">https://forum.qt.io/post/549546</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Thu, 05 Sep 2019 05:03:48 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 18:55:13 GMT]]></title><description><![CDATA[<p dir="auto">Did you add the</p>
<pre><code>LIBS += 
</code></pre>
<p dir="auto">statement in your .pro file to link to the library ?</p>
]]></description><link>https://forum.qt.io/post/549502</link><guid isPermaLink="true">https://forum.qt.io/post/549502</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 04 Sep 2019 18:55:13 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 17:17:38 GMT]]></title><description><![CDATA[<p dir="auto">Ok but issue then issue is after creating my <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> and pb.h file and added to qt creator is gives error as undefined reference to Google protobuf<br />
Then can anyone provide steps for adding protobuf .so files and <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> pb.h files to qt creator and then run on Android</p>
]]></description><link>https://forum.qt.io/post/549481</link><guid isPermaLink="true">https://forum.qt.io/post/549481</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Wed, 04 Sep 2019 17:17:38 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 16:40:50 GMT]]></title><description><![CDATA[<p dir="auto">protoc just generate files in the programming language you choose. There's nothing special here, as I already suggested, install the protoc compiler from your distribution and generate the file with it.</p>
]]></description><link>https://forum.qt.io/post/549476</link><guid isPermaLink="true">https://forum.qt.io/post/549476</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 04 Sep 2019 16:40:50 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 16:25:14 GMT]]></title><description><![CDATA[<p dir="auto">Ohh, then after building this I get protoc file from which I can make <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> and pb.h file but that protoc file gives error as excutable format error</p>
<p dir="auto">If you have any steps for how to make protoc for Android then please provide.</p>
]]></description><link>https://forum.qt.io/post/549471</link><guid isPermaLink="true">https://forum.qt.io/post/549471</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Wed, 04 Sep 2019 16:25:14 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 15:05:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/amol">@<bdi>amol</bdi></a> said in <a href="/post/549460">QTAndroid protobuf with QT creator</a>:</p>
<blockquote>
<p dir="auto">it's for clang I want for armabi-7</p>
</blockquote>
<p dir="auto">It looks you're mixing things up.</p>
<p dir="auto">Clang is a compiler (tool) while armabi-7 is a processor architecture (platform)<br />
A compiler creates an executable program for a particular platform.</p>
<p dir="auto">As you can see from that comment, Clang should allow you to build the required protobuf file(s) for your platform</p>
]]></description><link>https://forum.qt.io/post/549462</link><guid isPermaLink="true">https://forum.qt.io/post/549462</guid><dc:creator><![CDATA[Pablo J. Rogina]]></dc:creator><pubDate>Wed, 04 Sep 2019 15:05:41 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 14:57:22 GMT]]></title><description><![CDATA[<p dir="auto">@pablo-j-rogina yes I used it but it's for clang I want for armabi-7</p>
]]></description><link>https://forum.qt.io/post/549460</link><guid isPermaLink="true">https://forum.qt.io/post/549460</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Wed, 04 Sep 2019 14:57:22 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 13:39:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/amol">@<bdi>amol</bdi></a> said in <a href="/post/549446">QTAndroid protobuf with QT creator</a>:</p>
<blockquote>
<p dir="auto">I want to cross compile it with Android then I can us it</p>
</blockquote>
<p dir="auto">From the issue you pointed before, have you check this <a href="https://github.com/protocolbuffers/protobuf/issues/5279#issuecomment-449727577" target="_blank" rel="noopener noreferrer nofollow ugc">comment</a>? It says it succeeded, and it describes all the tool versions for its environment (Clang, NDK, Qt, etc.)</p>
]]></description><link>https://forum.qt.io/post/549450</link><guid isPermaLink="true">https://forum.qt.io/post/549450</guid><dc:creator><![CDATA[Pablo J. Rogina]]></dc:creator><pubDate>Wed, 04 Sep 2019 13:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 13:30:52 GMT]]></title><description><![CDATA[<p dir="auto">I used protobuf but it is for Windows or Linux not for Android I want to cross compile it with Android then I can us it</p>
]]></description><link>https://forum.qt.io/post/549446</link><guid isPermaLink="true">https://forum.qt.io/post/549446</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Wed, 04 Sep 2019 13:30:52 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Wed, 04 Sep 2019 11:40:21 GMT]]></title><description><![CDATA[<p dir="auto">One thing you can to is install the protobuf compiler package from your distribution and use that one. It will generate the files that you can then use for your project.</p>
]]></description><link>https://forum.qt.io/post/549424</link><guid isPermaLink="true">https://forum.qt.io/post/549424</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 04 Sep 2019 11:40:21 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Tue, 03 Sep 2019 11:19:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>sgaist</bdi></a>  hi and thank you for your response ,<br />
Actully I am trying to build my project for android phones (QTAndroid),<br />
My main Question is how to compile my .proto file for QTAndroid which gives .pb.cc and .pb.h in return<br />
I followed this link :<br />
<a href="https://github.com/protocolbuffers/protobuf/issues/5279" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/protocolbuffers/protobuf/issues/5279</a></p>
<p dir="auto">after creating source tree I run below command to generate <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> and pb.h :<br />
./protoc --cpp_out=./ myfile.proto</p>
<p dir="auto">but protoc file is not generating   <a href="http://pb.cc" target="_blank" rel="noopener noreferrer nofollow ugc">pb.cc</a> and pb.h file.<br />
'</p>
<p dir="auto">My proto file code is given below:</p>
<p dir="auto">syntax = "proto2";</p>
<p dir="auto">package DOP;</p>
<p dir="auto">// Defines request that a tag/anchor may receive via UART or BT SPP<br />
enum ReqType {<br />
DFUMODE    = 0;	// Device must switch to DFU mode and reset<br />
SETUWBCFG  = 1;	// Set UWB network configuration parameters<br />
GETUWBCFG  = 2;	// Get current UWB network configuration parameters<br />
}</p>
<p dir="auto">// Defines types of responses to a request message<br />
enum RespType {<br />
ACK        = 0;	// ACK the successfull execution of a request<br />
NACK       = 1;	// Request was not executed<br />
RESPUWBCFG = 2;	// Current UWB configuraion data<br />
}</p>
<p dir="auto">message Request {<br />
required uint32 req_type = 1; // Must be one of ReqType<br />
required uint32 req_ID   = 2; // A number that would help the requesting side to indentify the reply later<br />
}</p>
<p dir="auto">message Response {<br />
required uint32 resp_type = 1;  // Must be one of RespType<br />
required uint32 req_ID    = 2;  // The ID of the request to which we are replying</p>
<p dir="auto">// TODO: Add field for response parameters (like UWB configuration)</p>
<p dir="auto">}</p>
<p dir="auto">message Cycle {</p>
<pre><code>message Imu {
  required uint32 x = 1;	   
  required uint32 y = 2;
  required uint32 z = 3;
}

message Tag {
  required uint32 tagid     = 1;   // ID of the Tag which replied to the corresponding Anchor (current Tag). Number must be unique inside the network - 65536 max number of tags.
  required uint32 tof1      = 2;   // Time-of-flight from the corresponding Anchor to the current Tag, calculated during tsync1 and tsync2 slots accordingly. In in uS.
  required uint32 tof2      = 3;	 

  optional uint32 vbat      = 4;   // Battery voltage, 6bit, 25mV resolution, range between 2.650 V 4.250 V
  optional uint32 rssi      = 5;   // P46: DW1000 User Manual 2.03. Practical range -99...-67 dBm per  0.5dBm  
  optional uint32 sensor    = 6;   // Data from internal sensors, For pressure sensor - Range 0 to 1.28bar steps 0.02bar
  optional Imu 	  acc_data  = 7;   // Linear x,y, z acceleration from the Tag IMU 
  optional Imu	  gyro_data = 8;   // x,y, z data from the Tag IMU
  optional Imu 	  mag_data  = 9;   // 
  	
}

// Data collected by an Anchor
message Anchor {
  required uint32 anchorid  = 1;   // ID of the Anchor which polled the Tag whos data are included in this message (current Anchor).
  required Tag tag_data     = 2;
}

required uint32 cycleid   = 1;   // ID of the current offload cycle. Wraps up to 0 when reaching the maximum.
repeated Anchor anc_data  = 2;
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://forum.qt.io/post/549196</link><guid isPermaLink="true">https://forum.qt.io/post/549196</guid><dc:creator><![CDATA[AMOL]]></dc:creator><pubDate>Tue, 03 Sep 2019 11:19:34 GMT</pubDate></item><item><title><![CDATA[Reply to QTAndroid protobuf with QT creator on Tue, 03 Sep 2019 09:20:31 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">What exact error are you getting ?</p>
<p dir="auto">Did you try to build your project for your desktop machine ?</p>
<p dir="auto">Can you provide a <strong>minimal</strong> example project that people can attempt to build ?</p>
]]></description><link>https://forum.qt.io/post/549177</link><guid isPermaLink="true">https://forum.qt.io/post/549177</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 03 Sep 2019 09:20:31 GMT</pubDate></item></channel></rss>