开发者

Linking ACE in QTCreator on Windows

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 misconfigurat开发者_如何学编程ion.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜