Notifications
Clear all

Example Code not running

13 Posts
2 Users
0 Likes
28.2 K Views
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

I am trying to run the GUIApp example from the aaronia-sdk-beta-3.
I am using Qt version 4.8.4 and Microsoft Visual Studio 2010 as directed but when I run from Qt Creator, I keep getting an error
" QEventLoop: Cannot be used without QApplication
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread"
This occurs after I connect the device (Spectran HF-60105 X) and press run on Qt Creator.
Why does this happen and how can it be fixed?


   
Quote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

See viewtopic.php?f=8&t=1205&start=0


   
ReplyQuote
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

So I am using msvc2010. Is that compatible with Qt and the SDK?

Also you suggested to do the following:
- when prompted about the toolchain to be used make sure to select (only) a MS release toolchain
- check that the project build settings contain '-spec win32-msvc2008' and 'CONFIG+=release' on the qmake commandline

How and where do I select to use only a MS release toolchain?
And where does 'CONFIG+=release' go? I dont see a qmake commandline in Qt creator


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

We've only tested MSVC 2008 as contained in the Windows SDK 7.0, that is what the official Qt-4.7 libraries are built with. As there are two different Qt-4.8 library packages for MSVC 2008 and MSVC 2010 I assume they are not compatible with each other.
The toolchain selection depends on the version of Qt Creator. The qmake commandline can be seen in the "Project" settings in the Build configuration (it's under "Build Steps", "Resulting qmake invocation" here, but may differ depending on the Creator version).


   
ReplyQuote
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

So I followed all the steps:
- changed to Qt 4.7.0
- changed to MSVC 2008
- using qt creator 2.5.2
- made sure I only used microsoft tool chain
- checked that the project build settings contain '-spec win32-msvc2008' and 'CONFIG+=release' on the qmake commandline

The first time I tried running the examples, I received an error that I could not get again but it mentioned the incompatibility between
the 64-bit system and 32-bit systems.
The the second time I ran the example, I received a similar error than before but slighty different:
" QEventLoop: Cannot be used without QApplication
QObject::startTimer: QTimer can only be used with threads started with QThread
dumping 64 byte of data
dumping 3 byte of data
QObject::startTimer: QTimer can only be used with threads started with QThread"
What do the middle 2 lines indicate (dumping data)?
Every time after the second time, I tried running I get the error
"Cannot retrieve debugging output"
Is this because I changed from the debugging build to release build?
What is the difference between Qt 4.7.0 (4.7.0) Debug and Qt 4.7.0 (4.7.0) Release?


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

The "dumping xx bytes of data" can be ignored usually, it appears when there is unexpected data coming from the driver that cannot be processed while connecting the device.
The first error would again indicate a incompatible Qt build being used. The "Cannot retrieve debugging output" I think is indeed due to using a release toolchain, it will probably disappear if instead of "Debug" you call "Run" in the QtCreator.

Unfortunately Windows isn't really easy at setting up a proper development environment, esp. with all the different incompatible compilers floating around on that platform and the lack of standard automation tools.


   
ReplyQuote
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

I am prepared to switch over to Linux (Debian) because I was having compatibility issues in Windows.

1) What programs and compilers and what versions would I need to be able to start using Aaronia's SDK libraries to code and successfully run programs?

2) Can you describe a step-by-step process that I would need to follow to get the example code to run in Linux?
I am using the Spectran HF-60105 V4 X.

Thank you. I would greatly appreciate your help.


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

That should all be listed in the examples/README.txt file.


   
ReplyQuote
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

I have downloaded all of the necessary development tools and compilers and when I run bash build.sh, I get the following error:

../../lib/linux/x86_64/libaspectran.so: undefined reference to 'memcpy@GLIBC_2.14'
collect2: error: ld returned 1 exit status
make[1]:[build/GuiApp] Error 1
make[1]: Leaving directory '/aaronia-sdk-beta-3/examples/GuiApp'
make: [sub-GuiApp-make_default-ordered]  Error 2

How do I fix this error?


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

See for example http://stackoverflow.com/questions/12286460/


   
ReplyQuote
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

Sorry, I am new to Linux so I do not really understand the solutions.
I tried googling the error and many suggest to statically link the program.
Would that solve the error? If so, how do I statically link the program (alibspectran.so)?
Can you give me a detailed procedure including all of the commands that I need to use?


   
ReplyQuote
 auto
(@auto)
Active Member
Joined: 11 years ago
Posts: 16
Topic starter  

Sorry, I meant libaspectran.so in the previous post.


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

Static build isn't an option as we ship a dynamically linked library. Basically the problem is that the core C library on your Linux system is older than the version libaspectran.so was built for (2.14). It seems Debian stable is on 2.13, which makes this unfortunately not so easy to solve. You can either change to Debian testing which includes gibc-2.17, or use another Linux distribution (we're mostly testing with Fedora/Ubuntu).
Maybe the next version of the SDK we'll build on an old Debian system, but setting that up will take some time, so it won't be an option for now (if it's possible at all).


   
ReplyQuote
Share: