Page 1 of 1

Visual C++ troubles

Posted: 07.06.2004, 17:59
by Guest
I am starting to learn about the source code for celestia but having troubles. Using Visual C++ 6, I cannot open the "celestia.dsw" file. I get a blank screen. Could some one shed light on the organization of the code and how to access it from VC++6?


many thanks,


Al Najjar

Posted: 07.06.2004, 23:04
by don
Hello Al,

The VC++ (now VisualStudio .NET) workspace and project files in the CVS tree are not maintained by anyone.

What I do is edit whatever file(s) I want and then use the makerelease.bat or makedebug.bat files, in the root directory, to compile the project. This hierarchy of make files *is* maintained by Chris.

Yes, you can still use all the other tools in the IDE (single step, debug, etc.).

Cheers,

Posted: 08.06.2004, 00:11
by Guest
I figured as much. thanks for your response Don. My difficulties are compounded by the fact that I am used to the simple and streamlined setup of VB6, and therefore have a hard time understanding how VC++ is structured.

What I need to do is add some text fields and button at the bottom of the celestia window so that I can get visitors to our science center to interact with the program with ease. I am also interested of interface celestia to our planetarium digital system via winsoc.

in a post by HB, he mentioned an explanation of the code layout to be found at http://www.celestia.teyssier.org but that link no longer exhist! any idea where I can find such explanation?


Al

Posted: 08.06.2004, 00:22
by don
I understand and wish you luck.

http://celestia.teyssier.org/ is still up and running. It's a private server, so it may be down from time to time. Just try again later.

Cheers,

Posted: 12.06.2004, 13:38
by MB
Don,
Sorry for this late comment (I was away)
Interested by your comments concerning the compilation of celestia:
- With sometimes the help from some of the developper team ( Christophe and Harrald), I could compile celestia with VC (Visual C++ 6) without too many problems. But since about one month ( my last own .exe was succesfully compile 27 april 04. Since then the compile of render.cpp fails with 10 errors listed (may be due to a old version of the VC98\INCLUDE\algorithm ??). See below the first lines of the error

C:\Program Files\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::multimap<_K,_Ty,_Pr,_A> &' from 'Renderer::Label'
C:\Program Files\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:\Program Files\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'

I gave up, at least provisionally.
Very interested by your message, I looked to the release.bat and debug.bat: nothing change from at least one year! I tried to compile from the "command line". Of course same error, same results.
Otherwise, Al Najjar, I would have send my own VC (Visual C workspace .dsw ) with explanations.
Is a new version of some library needed?? I would appreciate any help.
I could then contribute with modesty to maintaining the VC++ workspace and project files
MB

Posted: 12.06.2004, 14:48
by selden
MB,

Have you applied all of the available patches to your C++ compiler?

If you have, and if it still fails, then I fear you're going to have to upgrade to a more recent version.

I don't get that error when I use Microsoft Visual Studio .NET 2003 Academic.

(I do get errors due to mismatched argument types being passed to POW, but they're easily patched.)

Posted: 13.06.2004, 00:50
by don
MB wrote:... I could compile celestia with VC (Visual C++ 6) without too many problems.
This is what I used also. I upgraded to the .NET version (7.x) several months ago, so I'm not able to help with the 6.x version any more, sorry.


MB wrote:... I looked to the release.bat and debug.bat: nothing change from at least one year!

The makerelease.bat and makedebug.bat files use the make (*.mak) files in each project directory, which are kept up-to-date by Chris. If double-clicking either of these files produces the errors you listed, make sure you have all VC++ 6.x updates and patches (as Selden recommended). If you still get these errors, then the standard C++ libraries were changed by Microsoft, in the newer version and you will probably need to upgrade VC++ 6.x to VisualStudio .NET (version 7.x).

Posted: 14.06.2004, 09:34
by MB
Don and Selden,
Thanks you for your fast answer. I think you are right. It is that I actually feared. So I will try to update when time permits.
MB

Posted: 20.06.2004, 03:43
by Rassilon
I can still compile Celestia with VB 6.0 fine...but I havent been using the latest CVS so I dont know if it will still work...One thing I remember is I couldnt compile Celestia within VC..I used the command line compiler with makerelease.bat,,,If you code in VC just set it all up in a folder and run makerelease.bat in that folder...I believe chris # 1 or chris # 2 :P still has this set up on thier repositories...Make sure your enviroment variables are set up for the command line compiler to work properly...

http://celestia.teyssier.org/ is your best bet on getting a full cvs with file structure...etc...

Also follow the instructions in this thread...
http://www.celestiaproject.net/forum/viewtopic.php?t=3637

Posted: 21.06.2004, 11:59
by MB
Ras,
Thanks for the info. When did you compiled your last exe with VC 6.0? My last succesful try was 24 april 04. Just render.cpp does not compile. I udated VC 6.0 last week. I know the site of Christophe, I did not see anything different that the cvs entries. I have no Pb to compile under linux but for various reason I need also to compile under Windows.
MB

Posted: 21.06.2004, 13:34
by Rassilon
I think Chris needs to enlighten us on compiling with VC 6.0 if by some chance he changed to .NET and this is why 6.0 doesnt accept a compile of render.cpp...but I hardly think that would be the case as Chris is trying to keep this program cross platform compatable...here should be no reason whatsoever that VC 6.0 cannot compile Celestia using makerelease.bat...

Looking at the errors above it seems this is an internal problem with your current C++ libraries and not with the sourcecode...You should wipe your VC completely off your harddrive and reinstall....VC should never give errors within its standard header files or libraries...

Alsp if it helps...I will provide a skeleton of Celestia Project Workspace I used to compile...Maybe this will clear things up...

Posted: 22.06.2004, 01:31
by Rassilon
Well I tried compiling and I get the same errors...I still seriously doubt that using NET solely is the answer...There must be a download somewhere that will update the C++ libraries without forking over 200-400 dollars for a new compiler! or an alternative someone is using and willing to provide the setup for...DevC++ Is one Marc turned me onto that uses gcc compiler or any you choose...Its on sourceforge...Maybe marc could provide some sort of instructions on how he set up his port of Celestia...

Code: Select all

then the standard C++ libraries were changed by Microsoft, in the newer version and you will probably need to upgrade VC++ 6.x to VisualStudio .NET (version 7.x).


Those same libraries MUST be available on Linux otherwise I am sure that there would be no more ports of Celestia...so this goes back to why is everyone saying upgrade to .NET...There must be a 'patch' to the current c library...even if it came from a linux alternative...Isnt C++ supposed to be the same across the board?

All in all I think I am missing something vital here...I see no reason whatsoever in upgrading to a newer compiler when all one needs is the correct/newer headers placed in VC librariy! A compiler is a compiler...so I thought... 8O

re

Posted: 22.08.2004, 08:28
by John Van Vliet
..Isnt C++ supposed to be the same across the board?


We are talting about Microsoft , so who knows it might be different ????
just like there java is incanpatable with sun's !!!!!!

Posted: 22.08.2004, 11:56
by selden
John,

Unfortunately, the standards keep evolving.

Compilers from different companies don't always implement the same new standard features, have different bugs in their compilers, and implement different features of their own that they think should have been in the standard. So, no, C++ isn't always the same. :(

Celestia now depends on features which are not available in MS VC++ v6.

Sorry.

Posted: 22.08.2004, 18:12
by Guest
MB wrote:. Since then the compile of render.cpp fails with 10 errors listed (may be due to a old version of the VC98\INCLUDE\algorithm ??). See below the first lines of the error

C:\Program Files\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::multimap<_K,_Ty,_Pr,_A> &' from 'Renderer::Label'
C:\Program Files\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:\Program Files\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'

I gave up, at least provisionally.


When you updated render.cpp did you also update render.h ? It seems that your problem is that the Renderer::Label method is not defined in the header file.

That is just a guess though. If you are still having trouble getting it to compile I would re-download the render.cpp AND render.h files and check the differences between the ones that you modified and the CVS ones, then incrementally re-add your changes to the render class and see which one causes the compilation error.

re

Posted: 25.08.2004, 08:10
by John Van Vliet
ya seldon all compilers are dif.
i am having fun with ms vc++.net , devc++ and cygwin
and microsoft's headers are difforent than gnuwin32 's in devc++