It's been awhile, I know. Tough going these past few years. Hope all of you are doing ok.
Anyhow, I got interested in building Celestia again and noticed a trend towards QT4 as becoming the GUI of choice. So I downloaded. And downloaded, and downloaded. I must have downloaded a few gigs of files in the past few days. What I noticed was there is now a QT5 and QT4 has had it's last version. So I got MSVC2008 express, 2010 express, 2012 express, QT5.0.2, and QT4.8.4. I didn't want to attempt to build all that, not yet anyhow. Maybe someday.
To make a long story short, I downloaded QT4.8 and QT5.0.2. I downloaded QT5 first and also the latest svn version of Celestia. I was surprised and also shocked when I got 200 errors trying to build. Not sure what is going on there. Most of the errors have to do with glew.h. There are about 10 or 15 qt errors.
After a couple of days I got builds to work with QT4.8.
A few things I found along the way.
1. Using QT Creator2.7 with msvc2008 went pretty smoothly except for a link error at the end. This is what I did to celestia.pro to finally get things working.
win32 {
INCLUDEPATH += \
windows/inc/libintl \
windows/inc/libz \
windows/inc/libpng \
windows/inc/libjpeg \
windows/inc/lua-5.1 \
windows/inc/spice
win32:LIBS += "../celestia/windows/lib/x86/zlib.lib"
win32:LIBS += "../celestia/windows/lib/x86/libpng.lib"
win32:LIBS += "../celestia/windows/lib/x86/libjpeg.lib"
win32:LIBS += "../celestia/windows/lib/x86/intl.lib"
win32:LIBS += "../celestia/windows/lib/x86/lua5.1.lib"
win32:LIBS += "../celestia/windows/lib/x86/cspice.lib"
win32:LIBS += -lvfw32
For some reason, the linker could not find zlib and exited until I made the above changes.
2.I also tried QT4.8 with msvc2010. This gave me a different link error.
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
This turned out to be a MS problem. I had to download MSVC2010 express sp1. For some reason, there is an incompatibility between msvc2010 and 2012. Also .net may be involved.
There is also another issue with Microsoft compilers. You must build with libs compiled with the same compiler. MS tags all the code built with their compilers with _MSC_VER = xxxx version of compiler. So if someone downloads QT, make sure it is not only for your platform, but also for the compiler you are using. MSVC2008 only warns that there is a mismatch but msvc2010 throws an error. MSVC2012 probably also does that but I haven't got a build to succeed to verify.
Anyhow, hope anyone reading this may find it useful. I spent the last couple of days ripping my hair out.
AHHHH. QT5. Title of the thread. I get 200 errors and almost as many warnings. Quite a mess. The version of QT5 I downloaded was compiled with the 2012 compiler so that is all I can use to build a working exe file with. A lot of API changes. I'm gonna take my time and try to port Celestia to QT5 and the C++ API changes that go with the 2012 compiler. I may also try to get it working with the 2010 compiler first. I get 200 errors with both. That way I can do one API at a time.
Small steps. Getting old. Later.
cartrite
It seems that qt5 has a header "gl2.h" that redefined a lot of what was defined in glew.h. The header "gl2.h is a new part of the QT SDK and it seems to be conflicting with glew.h.This accounts for about 85% of the errors I encountered while trying to build on the QT5 system with vc2012. The error is C2635, redefinition..........
cartrite
This is what I posted at Celestial Matters. Hope this may help all of the hapless victims of the aggravation that is caused by trying to build something that can't be built unless ....................
It's all good
cartrite