Example Code not running

Support forum for development using SNDK and ASDK

Example Code not running

Postby auto » Friday 8. March 2013, 15:07

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?
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby mm_dev » Monday 11. March 2013, 08:15

mm_dev
 
Posts: 284
Joined: Wednesday 4. May 2011, 07:43

Re: Example Code not running

Postby auto » Monday 11. March 2013, 19:52

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
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby mm_dev » Thursday 14. March 2013, 09:43

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).
mm_dev
 
Posts: 284
Joined: Wednesday 4. May 2011, 07:43

Re: Example Code not running

Postby auto » Thursday 28. March 2013, 23:03

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?
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby mm_dev » Tuesday 9. April 2013, 07:11

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.
mm_dev
 
Posts: 284
Joined: Wednesday 4. May 2011, 07:43

Re: Example Code not running

Postby auto » Friday 14. June 2013, 20:13

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.
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby mm_dev » Monday 17. June 2013, 07:51

That should all be listed in the examples/README.txt file.
mm_dev
 
Posts: 284
Joined: Wednesday 4. May 2011, 07:43

Re: Example Code not running

Postby auto » Tuesday 18. June 2013, 20:34

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

Code: Select all
../../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?
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby mm_dev » Wednesday 19. June 2013, 07:14

mm_dev
 
Posts: 284
Joined: Wednesday 4. May 2011, 07:43

Re: Example Code not running

Postby auto » Wednesday 19. June 2013, 19:01

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?
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby auto » Wednesday 19. June 2013, 19:05

Sorry, I meant libaspectran.so in the previous post.
auto
 
Posts: 16
Joined: Friday 8. March 2013, 15:00

Re: Example Code not running

Postby mm_dev » Friday 21. June 2013, 10:19

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).
mm_dev
 
Posts: 284
Joined: Wednesday 4. May 2011, 07:43


Return to SNDK + ASDK

Who is online

Users browsing this forum: No registered users and 2 guests

cron