Celestia1.3.2-pre8 Win32 compiling

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Celestia1.3.2-pre8 Win32 compiling

Post #1by Joe » 23.05.2004, 14:32

Hi, everyone

I got the latest source code from the Celestia CVS and out of curiosity :wink: I tried to compile it under VC++6.0 in my Window XP.

I got the following errors 8O

Code: Select all

--------------------Configuration: celengine - Win32 Release--------------------
Compiling...
render.cpp
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::multimap<_K,_Ty,_Pr,_A> &,const class std::multimap<_K,_Ty,_Pr,_A> &)' : could not deduce template argument for 'const class std::mu
ltimap<_K,_Ty,_Pr,_A> &' from 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::map<_K,_Ty,_Pr,_A> &,const class std::map<_K,_Ty,_Pr,_A> &)' : could not deduce template argument for 'const class std::map<_K,_Ty,_
Pr,_A> &' from 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &,const class std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &)' : could not deduce template argument for 'const class std
::_Tree<_K,_Ty,_Kfn,_Pr,_A> &' from 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::vector<_Ty,_A> &,const class std::vector<_Ty,_A> &)' : could not deduce template argument for 'const class std::vector<_Ty,_A> &' fr
om 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::basic_string<_E,_Tr,_A> &,const _E *)' : could not deduce template argument for 'const class std::basic_string<_E,_Tr,_A> &' from 'R
enderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const _E *,const class std::basic_string<_E,_Tr,_A> &)' : could not deduce template argument for 'const  *' from 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::basic_string<_E,_Tr,_A> &,const class std::basic_string<_E,_Tr,_A> &)' : could not deduce template argument for 'const class std::ba
sic_string<_E,_Tr,_A> &' from 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce template argumen
t for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2784: 'bool __cdecl std::operator <(const struct std::pair<_T1,_T2> &,const struct std::pair<_T1,_T2> &)' : could not deduce template argument for 'const struct std::pair<_T1,_T2> &' fr
om 'Renderer::Label'
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled
C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(583) : error C2676: binary '<' : 'Renderer::Label' does not define this operator or a conversion to a type acceptable to the predefined operator
        C:\Microsoft Visual Studio\VC98\INCLUDE\algorithm(548) : see reference to function template instantiation 'void __cdecl std::_Unguarded_insert(Renderer::Label *,Renderer::Label)' being compiled


I believe it is due to the latest added code in render.c file

Code: Select all

bool operator<(const Renderer::Label& a, const Renderer::Label& b)
{
    return a.position.z > b.position.z;
}


My question is: what is the significant difference it would make if the following definition in render.h file is placed outside the Renderer class? If it is define in such way, the above compiling errors could be gone-away.

Code: Select all

typedef struct {
        std::string text;
        Color color;
        Point3f position;
} Label;


outside the Renderer class

Any help please?
Joe
8O

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #2by t00fri » 23.05.2004, 20:42

Joe,

I have no problems whatsoever to build the latest CVS code under XP with VS-7.0 .NET (including Lua scripting). [What is a little tricky, is to correctly configure the Debug GUI mode such that F5 works fine.]

After adding the two files celx.cpp and celx.h to the Project 'celestia' ('Menue: Project->Add Existing Items'), the correct configuration of Lua scripting takes a few very obvious configuration steps in the Release/Debug Properties dialog of the VS-7.0 GUI:
---------------------------------------
i)In C/C++->general-> Additional Include Dirs:
add the include directory
..\..\inc\lua
ii) In Linker->Input->additional dependencies: add
lua.lib
lualib.lib
iii) In C/C++ -> Command Line->Additional Options: add
/D "CELX"
----------------------------------------
Sorry for expanding on these trivialities that are virtually identical in compiling Celestia in every OS. Yet perhaps these remarks are somewhat helpful for some...

Of course, I have assumed that Chris' 'winlibs-new.exe' file has been installed(executed) in the top Celestia directory. It contains all required extra libs, including the LUA libs/dll's.

As to checking out/updating/committing CVS code, I strongly prefer the Secure shell (ssh) interface that just requires another most standard manipulation:

Login to your Sourceforge account and copy/paste your public ssh key into the respective window. Then you never have to login again and use the most elegant and safe method of transfer...

Bye Fridger

PS: In the Debug mode, there is first of all a bug showing up that has been discussed quite a bit in the net: The msvcrtd.dll (debug lib) is requested and not found. The point is that a renaming took place in VS-7.0 and that DLL is now called msvcr70d.dll. Well the solution should be obvious...

PPS:[Of course, building the CVS code via the command line by means of 'makerelease.bat' and 'makedebug.bat', respectively, works as well.]

Avatar
Topic author
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Post #3by Joe » 23.05.2004, 21:40

Hi, Fridger

Thanks indeed :D for your help which did point me to the right direction. But I am using VC++6.0 :oops: not VS7.0-NET. I couldn't shake off the errors despite of I tried everyway I could thought of, even I used makerelease.bat and makedebug.bat, there were the same errors. I give up. Maybe MS VC++6.0 and its SP5.0 or 6.0 are no longer able to do the job?
8O
Joe

8O

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #4by t00fri » 23.05.2004, 21:53

Joe wrote:Hi, Fridger

Thanks indeed :D for your help which did point me to the right direction. But I am using VC++6.0 :oops: not VS7.0-NET. I couldn't shake off the errors despite of I tried everyway I could thought of, even I used makerelease.bat and makedebug.bat, there were the same errors. I give up. Maybe MS VC++6.0 and its SP5.0 or 6.0 are no longer able to do the job?
8O


Joe,

I think that there are some people here who successfully and regularly compile the CVS code with VC++6.0 (Paulo, Don,..?). Also, I mainly compile the CVS code under Linux (daily if there are changes!), again without any trouble.

Since XP is not my 'native' OS, others might point you more directly to the origin of your compiling problems above...

Bye Fridger

Avatar
HB M
Posts: 132
Joined: 26.11.2002
With us: 21 years 11 months
Location: Eindhoven, The Netherlands

Post #5by HB » 23.05.2004, 23:18

Hey Joe,

You're not the only one with these kind of compiling-errors. I am using C++ v6.0 as well and I've got exact the same kind of errors with the latest CVS versions of Render.ccp and Render.h files.

Coming week I'll try to figure out what the problem can be, but don't expect too much.
HB

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #6by don » 24.05.2004, 07:24

t00fri wrote:I think that there are some people here who successfully and regularly compile the CVS code with VC++6.0 (Paulo, Don,..?).

Since Chris updated to .NET, and fixed the compile problems there, I decided to upgrade also.

However, I gave up on compiling Celestia from within the IDE a while back and have been using the makerelease.bat and makedebug.bat files to compile. You can still use all debugging features of the IDE. Might be worth a try.
-Don G.
My Celestia Scripting Resources page

Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #7by Harry » 24.05.2004, 11:19

don wrote:Since Chris updated to .NET, and fixed the compile problems there, I decided to upgrade also.

Maybe you can use the C++ compiler downloadable for free from Microsoft:
http://msdn.microsoft.com/visualc/vctoolkit2003/
AFAIK it doesn't include the header files necessary to compile Celestia, but you should still have them from VC6 anyway (assuming this mix works). And I am not sure about the license, I read somewhere you are not allowed to distribute open-source-software compiled with this, don't know if this it true - but should be fine for personal use.

Harald

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #8by don » 24.05.2004, 21:57

Hi Harald,

It seems you were directing your reply to me, but I have already upgraded to the .NET version of MS C++ and have no compile problems.

As to going with the "free MS compiler", many folks (including myself and Selden) have tried doing this with Celestia and found it does not work, for many reasons. :(

That's why I initially bought the old MS VC++ 6.0 package on eBay, and recently upgraded it to the .NET version. It contains all the necessary files and the optimizing compiler (both are missing in the "free" stuff).

That being said, I'm sure there are expert C++ folks who are also familiar with how MS distributes their "free" stuff, who could in fact make it work. :)
-Don G.

My Celestia Scripting Resources page



Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.

Avatar
Topic author
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Post #9by Joe » 26.05.2004, 10:33

Hi, HB

Coming week I'll try to figure out what the problem can be, but don't expect too much


Although you said so as above, I am still anticipating some knid of miracle popping up from your end. I tried everything by following all the advices and suggestions, no luck so far. Maybe I resolve to upgrade .NET version.
Joe

8O

Avatar
HB M
Posts: 132
Joined: 26.11.2002
With us: 21 years 11 months
Location: Eindhoven, The Netherlands

Post #10by HB » 28.05.2004, 14:08

Hey Joe and all other one's whom it concern too.

Joe, I'm sorry to say I'm not able to find a quick solution for this problem. So I'm afraid that all users of VC++ 6.0 who want to compile Celestia by themself have to upgrade to the .NET version.

When you use the .NET version for the first time, a pile of warnings appear about conversion of numbers, such as from double to float or signed/unsigned. So mostly from a higher accurancy to a lower one.
Question is of this conversion has some negative influence on the accuracy of Celestia.

If you want to make use of the make*.bat files with the .NET version, you have to do this from within VisualStudio .NET command prompt ( Neccesary to set the environment which differs from VC6.0)

After struggling around a little everything seems to work fine with both the command line and the IDE compilers of the VC.net version. (beside of these conversion warnings of coarse)
HB


Return to “Bugs”