PDA

View Full Version : compiling Qt with visual studio



jello
13th April 2010, 20:32
Hi guys, I'm a newbie. I need to use Qt with visual studio, because I already have VS projects to which I have to make modifications to. So i'd like to put Qt code in those VS projects.

So just to make a test, I tried compiling Qt code in VS. Notice that I don't mean that I opened Qt example projects and compiled them in VS, because that already works (i tried). (i have the VS add-in installed too).

What I tried to do, is to make a new VS project, and copy paste the code from the example project to my VS project. I also added the Qt include directories under "Additional include directories", and put the corresponding lib files in "Additional dependencies". I used the Qt IPC local fortune server project, by the way.

But then, when I compile, I get a few errors such as "server.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall Server::metaObject(void)const " (?metaObject@Server@@UBEPBUQMetaObject@@XZ)"

what am i doing wrong?