View Single Post
Posts: 19 | Thanked: 7 times | Joined on Jan 2010 @ dallas, tx usa
#1
Hello all,

After much fiddling I finally got a working ESBox install. I am working on a small Qt app and have managed to get up and running fairly quickly. However, I've come across something totally baffling..

My app is trying to split some QString objects, and extract key-value pairs from the result QStringList(s). This all works fine, however, when I try to use a QHash I get very strange undefined reference errors that have nothing to do with QHash, or any of my code.

For example this works:

Code:
void Foo::foo( const QString& params )
{
    QStringList lst = params.split('\r');

    //do some stuff

    return;
}
and this does NOT WORK:
Code:
void Foo::foo( const QString& params )
{
    QStringList lst = params.split('\r');
    QHash<QString, QString> dict;

    //do some stuff

    return;
}
That's it! all I have to do is add a single declaration of this hash, and I get something like:

/home/user/build/helloworld: undefined symbol: _ZN7QLayout14addChildLayoutEPS�*��N11QFormLayout7s etItemEiNS_8ItemRoleEP11QLayoutItem


What is this all about? Has anyone seen this before? My QMake project is setup all right (I have experience with Qt on win32, so I know the basics of the API and make process..).

Has anyone else seen this?