tags:

views:

70

answers:

1

I'm somewhat new to both QT and Windows development in general (I develop on Linux at work and rarely do GUI programming).

Anyway, I downloaded ACE and built it with Visual Studio Express 2008 and have been able to use it in VS programs but I'm having trouble making it play nicely with QTCreator.

My .pro file in QTCreator includes these lines:

INCLUDEPATH += C:\Progra~1\ACE\ACE_wrappers
win32:LIBS += C:\Progra~1\ACE\ACE_wrappers\lib\ACE.lib

(the file C:\Progra~1\ACE\ACE_wrappers\lib\ACE.lib definitely exists)

When I try to compile it finds the headers just fine but the linker bombs out with a bunch of 'undefined reference' errors like so:

debug/main.o:main.cpp:(.rdata$_ZTV18ACE_Reactor_Notify[vtable for ACE_Reactor_Notify]+0x10): undefined reference to `ACE_Event_Handler::get_handle() const'

Am I missing something in my project configuration? Or did I do something wrong when I built ACE?

Thanks in advance for any advice. I'm sure it's a simple misconfiguration.

A: 

I've not used Visual Studio with Qt, and I tend to very rarely use QtCreator, but usually these errors mean that moc has failed and you need to re-run qmake. The odd thing is that QtCreator isn't doing this for you. Have you been able to compile any other Qt programs?

Since you're more comfortable with the GNU toolchain, why not try using mingw? Instructions for ACE are fairly straightforward, and you won't need to compile Qt yourself (which is a huge plus) (Ok, as of Qt 4.6 Nokia are providing pre-built versions for VS 2008).

Alphax
I'm not using Visual Studio to compile QT, I only used it to build ACE. I've been able to create other (small) QT programs but not with ACE. I'll try using MinGW but I'd rather stick to Visual Studio for Windows development.
Eric
Stupid question, but do you have a .pro file? See also [How to generate .sln/.vcproj using qmake](http://stackoverflow.com/questions/2339832/)
Alphax