Friday, October 29, 2010

Dang, Qt Creator is slow when stepping into functions

This link seems to address the issue. This post is a placeholder, perhaps I can break a few cycles free to work on it.

"unable to start gdb " then "C:\Qt\2010.04\pythongdb\gdb-i686-pc-mingw32.exe"

When migrating Qt from 2010.04 to 2010.05, the first time I tried to run Qt Creator, I get this error. Somewhere, the uninstaller left something behind.

I had already deleted c:\qt\2010.04.

Thanks, again, to QtCentre user for the answer.

This time the uninstaller left some cruft behind in the user settings. I'm on XP, so I found it in "C:\Documents and Settings\myusername\Application Data\Nokia." I just deleted everything in there.

While googling, I found a bug report at Qt. We'll see about that...

Thursday, July 1, 2010

mingw32-make.exe: Interrupt/Exception caught (code = 0xc0000005, addr = 0x41f96e)

After lying fallow for several weeks, I installed the 2010.04 version of Qt Creator and tried to recompile a project. This is the error:

"mingw32-make.exe: Interrupt/Exception caught (code = 0xc0000005, addr = 0x41f96e)"

I reset my paths and reverted to 2010.01. After googling for the answer, I deleted the .pro.user file and the project built and ran.

Apparently I hadn't yet learned the first rule of Qt Club. Delete the .pro.user file and try again...

Other comments:

Here's a note about a change in the path causing the same error.
http://www.lemon-factory.com/2010/05/12/windows-gripes-with-qt-creator-and-git/

Monday, April 12, 2010

linux ld.so.conf path (CentOS 5.4, RedHat)

I'm linking OpenCV into my Qt project. More samples on that later. Runtime produced this error:

"Path_to_source: error while loading shared libraries: libcv.so.2.0: cannot open shared object file: No such file or directory"

The path to the OpenCV dynamic link libraries (.so files) were not in the link library path.

Found a clue here here and here.

solution:

su root
cd /etc/ld.so.conf.d
cat > opencv-10.conf
/usr/local/lib
^c
/sbin/ldconfig -v

Friday, March 26, 2010

Unit Testing quirks: Why doesn't the makefile know how to build the ".moc" file.

I'm following the sample at the Qt site on how to make a unit test. But mine continually failed. Of course I'm less than comfortable with the two magic lines at the end of the source file:

Finally, to make our test case a stand-alone executable, the following two lines are needed:

 QTEST_MAIN(TestQString)
#include "testqstring.moc"

The QTEST_MAIN() macro expands to a simple main() method that runs all the test functions. Note that if both the declaration and the implementation of our test class are in a .cpp file, we also need to include the generated moc file to make Qt's introspection work.

Note the part at the end "if both the declaration and implementation ... are in a .cpp file." what's missing is that "if the declaration and implementation are in separate .h and .cpp files, then that final include is unnecessary."

That's the danger of having magic in the build system.

I've uploaded a sample unit test to my SkyDrive. So far I've not found any buildable projects on the web.

A little bitty Java has some good notes on Qt Unit Testing.

KDE TechBase has another intro here.

Here's a description of why the include's not necessary when there's both a header and cpp file in the test.

Wednesday, February 17, 2010

Qt builds: adding linux support to static libraries with automated dependencies

This modification from yesterday's post adds support for linux.

Choose "run qmake," then "rebuild all." Then whatever changes you make in the source code forces the system to build and link correctly.

Left-click to get the sample Qt system with two libraries, interlibrary dependencies. It builds on linux and win32/mingw.