Page 1 of 1
Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 11:51
by Epimetheus
I discovered that the
celestia.mak file is currently linking to the
ijgjpeg.lib library in the
LINK32_FLAGS setting. You'll need to change the link from ijgjpeg.lib to
libjpeg.lib at line ~146, and the link at line line ~336 to
libjpegd.lib (debug) before you compile from the commandline. I had a lot of trouble building the app for the first time due to this issue. JPEG textures will not render, only the earth will have texture applied when using the
ijgjpeg.lib library.
REMOVE: ijgjpeg.lib
Hope it helps! Have a nice day.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 12:04
by Epimetheus
A sidenote:
My MS Program Maintenance Utility v8.0 informed that the /GX compiler option will be removed in a future release. Use /EHsc (exception handling) instead of /GX. The /YX and /ML options were not recognized and were ignored in the provided makefiles. Just an FYI.
NMAKE version 8.00.50727.762
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 13:12
by cartrite
Epimetheus wrote:I discovered that the celestia.mak file is currently linking to the ijgjpeg.lib library in the LINK32_FLAGS setting. You'll need to change the link from ijgjpeg.lib to libjpeg.lib at line ~146, and the link at line line ~336 to libjpegd.lib (debug) before you compile from the commandline. I had a lot of trouble building the app for the first time due to this issue. JPEG textures will not render, only the earth will have texture applied when using the ijgjpeg.lib library.
I think that you are supposed to have the
correct winlib package to compile from the command line or GUI. I found that each method requires different packages. Check out this
thread from sourceforge. Doing what you did may cause different issues. I'm not sure. The earth renders because it is a png file.
cartrite
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 13:40
by Epimetheus
This was you, wasn't it:?:
DT wrote:It looks like ijgjpeg.lib could be causing this kind of problem since most if not all Celestia's textures are *.jpg.
Firstly, thanks for your help guys.
Cartrite gets the gold medal though. It was indeed ijgjpeg.lib. Adding this file will result in Earth having textures but no other planet. I'll update the primer again.
Case closed.
The current
celestia.mak file from SVN contains links to
ijgjpeg.lib. I could not see jpeg textures using the lib. When I recompiled with celestia.mak pointing to
libjpeg.lib & libjpegd.lib it worked fine. I obtained the libjpeg.lib files from the winlibs-2.zip (
http://www.shatters.net/~claurel/celestia/winbuild/)
Like, Fridger says, you gotta read those compiler docs!
Yipppeee! Problem solved? Thanks for the link, btw.
NOTE: What is in the winlibs-3.zip file, is that a more current version of winlibs-2.zip?
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 14:22
by Epimetheus
I noticed while in debug that a number of files of type *-lok-mask.png are not present in the medres folder. Curious. Should there be?
Code: Select all
e.g.
medres
------
callisto-lok-mask.png
europa-lok-mask.png
miranda-lok-mask.png
ariel-lok-mask.png
mercury-lok-mask.png
etc.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 16:15
by cartrite
The current celestia.mak file from SVN contains links to ijgjpeg.lib. I could not see jpeg textures using the lib.
Yes. This is correct. I had this problem too a while back. But I think the ijgjpeg.lib file was updated in one of the winlibs packages and I can't remember which one it was. The winlib2 did give me the same problem compiling with the command line.
I have about 5 different winlib folders, each one works with a different compiler and method (GUI or command line). I don't change celestia.mak.
The winlibs3 was an attempt by Chris to have a unified winlib package for all compilers but it doesn't work with the 2003 compiler. This is about all I can remember about this subject. It gave me quite a large headache and I had to purge my memory with a
large number of shots of JD. That stands for Jack Daniels. Good ol rot gut whiskey.
The race is about to start. Time for some more shots!!!!!!!!!
Anyhow, if what you did works for you. Cool!!!!!
I don't have to change celestia.mak to have it work for me so............
I'm not really sure why that lib (ijgjpeg.lib) is present or what code is linking to it so Good Luck down the road.
Not sure about the png files list you posted.. Where did you come up with that list? The files are not in the SVN medres folder. They are in the lores folder.
cartrite
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 16:20
by t00fri
Since I hate to depend on others in such delicate matters, I compiled my own libs from sources with Vc++.2003.net. I don't have any problems.
F.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 17:02
by chris
The Windows build environment is still sort of a mess because we don't have one makefile that works with all compilers, and a certain stubborn Celestia developer won't upgrade his compilers to a modern version so that we can check in the Makefiles that work with VS 2005 and 2008.
I strongly recommend using the Visual C++ project file in SVN if you've got MS Visual Studio 2005. It's kept up to date and works without modification if you have the right libraries, specifically cspice.lib and winlibs-3.zip from
http://www.celestiaproject.net/~claurel/celestia/winbuild. And, the IntelliSense feature of MS Visual Studio is really well done: it shows popup menus with function parameters and class members appropriate from whatever code you're working on.
--Chris
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 17:38
by t00fri
chris wrote:The Windows build environment is still sort of a mess because we don't have one makefile that works with all compilers, and a certain stubborn Celestia developer won't upgrade his compilers to a modern version so that we can check in the Makefiles that work with VS 2005 and 2008.
No idea who that stubborn Celestia developer might be, but I am sure he does not depend on the Makefiles that work with VS2005 and 2008.
So why don't you do what you would like to do?
Incidentally, what's so "modern" with VS2005 wrto the commercial VS2003.net? If I correctly remember you switched, because one day you could not find your commercial VS2003.net anymore
F.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 18:17
by chris
t00fri wrote:chris wrote:The Windows build environment is still sort of a mess because we don't have one makefile that works with all compilers, and a certain stubborn Celestia developer won't upgrade his compilers to a modern version so that we can check in the Makefiles that work with VS 2005 and 2008.
No idea who that stubborn Celestia developer might be, but I am sure he does not depend on the Makefiles that work with VS2005 and 2008.
So why don't you do what you would like to do?
Incidentally, what's so "modern" with VS2005 wrto the commercial VS2003.net? If I correctly remember you switched, because one day you could not find your commercial VS2003.net anymore
Losing that compiler during a hard drive failure only forced me to make a switch that was long overdue anyway. The free versions of VS2005 and VS2008 are, well, free and supporting them makes Celestia development easier for those that don't care to invest in the commercial compiler. The implementation of STL used in VS2005 is much improved over the version in VS 2003. I've found several Celestia bugs related to improper STL usage because of the more careful checks in new versions of the compiler. The 2008 compiler adds support for compiling on multiple processors, though the required /MP switch isn't on in the makefile in winlibs. There have been improvements to code generation for the Intel core processors (and these are claimed to help on Pentium 4 processors as well.) So, lots of things . . . I was initially skeptical about the IntelliSense, but it's really helpful--it saves a lot of references to the documentation when writing code that calls the Qt4 and SPICE functions.
--Chris
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 18:34
by t00fri
Something different:
Since I still use on and off VirtualBox for compiling Windows code in Linux, I would fancy a binary version of Qt-3.3.4, since the compiled source archive is huge (1.9 GB). Anybody found out by chance how to generate a binary Qt version for Win32? I could not find one in the Net.
F.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 19:59
by t00fri
What is quite remarkable is that on the SAME Desktop machine, the code compiled with VS.2003.Net is MUCH faster than the one compiled with gcc under Linux!
In both OS, I have tried the very best optimizations. The final result with my old FX 5900Ultra card and my single core, 3.2 GHz/3 GB RAM Desktop machine is
-- Linux-Kde: 27.7 fps
--Windows: 43.0 fps (!)
with the identical 64k VT textures of Earth and right after starting Celestia. With the identical texture setup, my Core 2 Duo 2.0 GHz/2 GB RAM laptop produces 60 fps under Win 32
Under Windows I used multi-threading mode (also of my custom libpng) as much as possible.
So, that VS2003 code is not at all bad...
F.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 20:23
by chris
t00fri wrote:What is quite remarkable is that on the SAME Desktop machine, the code compiled with VS.2003.Net is MUCH faster than the one compiled with gcc under Linux!
In both OS, I have tried the very best optimizations. The final result with my old FX 5900Ultra card and my single core, 3.2 GHz/3 GB RAM Desktop machine is
-- Linux-Kde: 27.7 fps
--Windows: 43.0 fps (!)
with the identical 64k VT textures of Earth and right after starting Celestia. With the identical texture setup, my Core 2 Duo 2.0 GHz/2 GB RAM laptop produces 60 fps under Win 32
Under Windows I used multi-threading mode (also of my custom libpng) as much as possible.
So, that VS2003 code is not at all bad...
No, it isn't. My own experience with building the Qt4 version of Celestia with mingw and Visual Studio 2005/2008, showed much better performance with the MS compiler. Supposedly, Intel C++'s compiler generates even better code, but I haven't had the chance to try it on Celestia.
What version of g++ are you using? I think I've heard that recent versions generate much better x86 code. Certainly Apple must have a big interest in tuning g++ code generation now that all shipping Macs are Intel based.
--Chris
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 21:08
by t00fri
chris wrote:What version of g++ are you using? I think I've heard that recent versions generate much better x86 code. Certainly Apple must have a big interest in tuning g++ code generation now that all shipping Macs are Intel based.
--Chris
A pretty recent one, gcc-4.2/OpenSuse 10.3
In my Lab, the really big crunch code for the experimental analyses is also compiled mostly with Intel compilers.
F.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 06.04.2008, 21:38
by Epimetheus
chris wrote:The Windows build environment is still sort of a mess because we don't have one makefile that works with all compilers, and a certain stubborn Celestia developer won't upgrade his compilers to a modern version so that we can check in the Makefiles that work with VS 2005 and 2008.
I strongly recommend using the Visual C++ project file in SVN if you've got MS Visual Studio 2005. It's kept up to date and works without modification if you have the right libraries, specifically cspice.lib and winlibs-3.zip from
http://www.celestiaproject.net/~claurel/celestia/winbuild. And, the IntelliSense feature of MS Visual Studio is really well done: it shows popup menus with function parameters and class members appropriate from whatever code you're working on.
--Chris
Ahhhh, thanks Chris! I was wondering about that. Maybe we should update the Wiki book to point out that winlibs-3/winbuild-3 packages are aimed at VS 2005 IDE builds and winlibs-2/winbuild-2 packages are for commandline compilation? This was the hold reason I had so much trouble with the first compile. I was reverting back and forth in the wrong sequence with the various lib and build packages. I.E. stepping on my ... ehhhh hmmm!
NOTE: I had to set
/NODEFAULTLIB:"libc.lib" and set any
ijgjpeg.lib links in celestia.mak to
libjpeg.lib (see above) to compile with the makefiles provided for a VS 2005 Pro environment.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 07.04.2008, 00:05
by Epimetheus
Great! Thanks Chris and everybody else! I got a debug version of Celestia compiled via Visual Studio 2005 Pro IDE. I used the winlibs-3/winlibs-3 files and the vcproj file from SVN as an existing code VS 2005 project. I only had to require that the manifest not be embedded and the build succeeded.
You can right click on your project in VS 2005 and select properties to disable manifest embed >
Code: Select all
Select Configuration Properties > Manifest Tool > Input and Output > Embed Manifest = no
All you have to do now is download the SVN tree, set up your working copy, copy over the inc and lib folders from winlibs-3.zip/winbuild-3.zip and the SPICE stuff, open VS 2005 and open existing code project, set Embed Manifest to no and Build Solution.
Re: Watch out for ijgjpeg.lib and missing textures!
Posted: 07.04.2008, 00:52
by Epimetheus
cartrite wrote:The current celestia.mak file from SVN contains links to ijgjpeg.lib. I could not see jpeg textures using the lib.
Yes. This is correct. I had this problem too a while back. But I think the ijgjpeg.lib file was updated in one of the winlibs packages and I can't remember which one it was. The winlib2 did give me the same problem compiling with the command line.
I have about 5 different winlib folders, each one works with a different compiler and method (GUI or command line). I don't change celestia.mak.
The winlibs3 was an attempt by Chris to have a unified winlib package for all compilers but it doesn't work with the 2003 compiler. This is about all I can remember about this subject. It gave me quite a large headache and I had to purge my memory with a
large number of shots of JD. That stands for Jack Daniels. Good ol rot gut whiskey.
The race is about to start. Time for some more shots!!!!!!!!!
Anyhow, if what you did works for you. Cool!!!!!
I don't have to change celestia.mak to have it work for me so............
I'm not really sure why that lib (ijgjpeg.lib) is present or what code is linking to it so Good Luck down the road.
Not sure about the png files list you posted.. Where did you come up with that list? The files are not in the SVN medres folder. They are in the lores folder.
cartrite
LOL!
If you hit Shift + ~ while running Celestia you'll see what I'm talking about. I don't think it's a big deal though. I believe the app looks in the
lowres folder if the image is not in the
medres. Don't quote me on that, but I think I saw that in code.