September 14, 2010

elemings elemings
Lab Rat
10 posts

Compile Errors Building Qt 4.6.3 With VS2008 For Windows x86_64 platforms

 

Greetings,

I’ve run into a few compile errors while building Qt 4.6.3 for Windows x86_64 platforms with VS 2008. First, I should mention that I configured the build like this:

  1. C:/Build/Qt/4.6.3-x86_64-vs2008> C:/Source/Qt/4.6.3/configure -prefix C:/Install/Qt/4.6.3 -debug_and_release -shared ...

The first errors I ran into were similar to this:

  1. ...
  2. c:/build/qt/4.6.3-x86_64-vs2008/include/qtcore/private/../../../../../../Source/Qt/4.6.3/src/corelib/io/qiodevice_p.h(161) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
  3. c:/Install/Qt/4.6.3/src/corelib/io/qtextstream.cpp(3396) : fatal error C1083: Cannot open include file: 'qtextstream.moc': No such file or directory
  4. c:/build/qt/4.6.3-x86_64-vs2008/include/qtcore/private/../../../../../../Source/Qt/4.6.3/src/corelib/io/qiodevice_p.h(161) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
  5. qresource_iterator.cpp
  6. ...

I determined that the moc_*.cpp source files were missing dependencies on the related *.moc files and were not therefore being generated. So I did a ‘nmake mocables’ and continued building until I hit my latest snag:

  1. ...
  2. moc_qanimationgroup.cpp
  3. moc_qsequentialanimationgroup.cpp
  4. tmp/moc/debug_shared/moc_qsequentialanimationgroup.cpp(85) : error C2027: use of undefined type 'QSequentialAnimationGroupPrivate'
  5.         c:/build/qt/4.6.3-x86_64-vs2008/src/corelib/tmp/moc/debug_shared/../../../../../../../../Source/Qt/4.6.3/src/corelib/animation/qsequentialanimationgroup.h(56) : see declaration of 'QSequentialAnimationGroupPrivate'
  6. tmp/moc/debug_shared/moc_qsequentialanimationgroup.cpp(85) : error C2227: left of '->_q_uncontrolledAnimationFinished' must point to class/struct/union/generic type
  7. moc_qparallelanimationgroup.cpp
  8. tmp/moc/debug_shared/moc_qparallelanimationgroup.cpp(73) : error C2027: use of undefined type 'QParallelAnimationGroupPrivate'
  9.         c:/build/qt/4.6.3-x86_64-vs2008/src/corelib/tmp/moc/debug_shared/../../../../../../../../Source/Qt/4.6.3/src/corelib/animation/qparallelanimationgroup.h(55) : see declaration of 'QParallelAnimationGroupPrivate'
  10. tmp/moc/debug_shared/moc_qparallelanimationgroup.cpp(73) : error C2227: left of '->_q_uncontrolledAnimationFinished' must point to class/struct/union/generic type
  11. moc_qpauseanimation.cpp
  12. ...

The problem is that the generated moc_*.cpp sources are not including the related private header files. I’m not sure what to do about this one. Anyone have any suggestions (other than “Don’t build outside the source directory” or “Don’t configure with an install prefix”)?

Thanks.

4 replies

September 15, 2010

Alexander Kuchumov Alexander Kuchumov
Lab Rat
378 posts

“Don’t build outside the source directory” But why do you build outside?

September 15, 2010

elemings elemings
Lab Rat
10 posts

So multiple developers can build multiple configurations from the same source tree without wrecking your own or one another’s builds.

January 16, 2012

rszabolcs rszabolcs
Lab Rat
1 posts

I have almost the same problem. Did somebody find a solution? Thanks!

June 7, 2013

shixiaoyou shixiaoyou
Lab Rat
2 posts

Hello, have you fix this issue? can you tell me how to fix? i meet same issue.

 
  ‹‹ Need help compiling Qt for embedded device (i.mx51 evk)      Trouble installing the "Qt Assistant compat version" ››

You must log in to post a reply. Not a member yet? Register here!