A primer for new C++ developer volunteers on Win XP

The place to discuss creating, porting and modifying Celestia's source code.
georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 6 months
Location: Greece

Post #21by georgiouk » 19.06.2005, 16:53

Hi Paolo
I tried to compile Celestia with TortoiseCvs too.
Unfortunately i haven't managed to get Celestia.exe
It seems there is a problem with celestia/src/celestia
i don't know (because i am a beginner with compiling)
but it seems there is a problem with the files .obj
Could you please help me, i have followed exactly
the insructions to get the code
and i don't know what to do next so any help would
be valuable to me.
My OS : Windows XP, Pentium(R) CPU 1.60 GHz
I sent you some of the mistakes :

configfile.obj : error LNK2001: unresolved external symbol "struct _iobuf * __cd
ecl std::_Fiopen(char const *,int,int)" (?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z)
winmain.obj : error LNK2019: unresolved external symbol "struct _iobuf * __cdecl
std::_Fiopen(char const *,int,int)" (?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z) refere
nced in function "protected: void __thiscall std::vector<struct _devicemodeA,cla
ss std::allocator<struct _devicemodeA> >::_Xran(void)const " (?_Xran@?$vector@U_
devicemodeA@@V?$allocator@U_devicemodeA@@@std@@@std@@IBEXXZ)
cel_txf.lib(texturefont.obj) : error LNK2001: unresolved external symbol "struct
_iobuf * __cdecl std::_Fiopen(char const *,int,int)" (?_Fiopen@std@@YAPAU_iobuf
@@PBDHH@Z)
.\Release\celestia.exe : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
NMAKE : fatal error U1077: 'C:\Visual_C\bin\nmake.exe' : return code '0x2'
Stop.

MB
Posts: 128
Joined: 19.07.2002
With us: 22 years 3 months
Location: Paris France

Post #22by MB » 20.06.2005, 07:56

Maxim, Paolo
Thank you for your answer, I just installed TortoiseCvs and I will let you know if I got some problems.
MB

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

Post #23by t00fri » 20.06.2005, 08:40

While I have no idea what this fancy CVS software is good for, I do it quite differently on my Windows XP laptop:

Since I have installed a layer of CYGWIN Linux on top of XP, a little (but clever) script does ALL of the following actions, when I type its name ('cel') into a CYGWIN zsh terminal:

1) It establishes contact to the CVS archive using ssh2 (secure shell) networking from CYGWIN and my public ssh2 ID deposited in my SF account. ==> No passwords needed or the like. Login very fast.

2) It updates new code into a virgin copy of celestia on my Laptop.

3) By means of the ingenious 'rsync' command line tool, it checks out what files are new relative to my already compiled ones in my /working copy/ of celestia. Only these new files are then copied over, and thus the working copy is brought to sync with CVS (in one direction). ALL already compiled files that are unaffected by the update remain UNTOUCHED! That saves LOTS of time.

Then I recompile the few new src files with VS++-Net which takes
less than 30 sec, since usually only a few code files have changed.

The new Celestia.exe is then started in XP. The whole procedure works in largely unattended mode (i.e. in background) and takes /altogether/ always less than 1 minute, even on my comparatively slow Laptop.

I think this is a typical nice example of the seemless cooperation of CYGWIN Linux and Windows XP. The advantages of BOTH systems are exploited ...

When CVS-updating Celestia under native Linux with my (MUCH faster) Desktops, the procedure is analogous, but now completely unattended, since the final gcc compile and link step ('make') is also started by the script. There this is only a <=30 sec affair, with networking to SF taking most of the time.

Bye Fridger

MB
Posts: 128
Joined: 19.07.2002
With us: 22 years 3 months
Location: Paris France

Post #24by MB » 20.06.2005, 15:49

I successfully installed Tortoise CVS and got the sources of celestia. thanks again,

I was surprised how much source files changed recently, at variance with what I expected from the forum information.
I have to install Visual studio .net, I got the 2002 (4 CD), but my system (XP on a laptop) ask for Windows Component Update (WCU) that I don't have. So I am still frustrated, I don't know where I could get it, even after looking at the MS Website.
Thanks Fridger for your message, but as you could imagine I am not yet ready for your script.
MB

Topic author
Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 1 month
Location: Pordenone/Italy

Post #25by Paolo » 20.06.2005, 16:16

Hi Fridger

Your CYGWIN solution sounds very practical if you have a Broadband internet access.

I have a 56kb modem and I haven't direct SF access to Celestia so I can't download the whole Celestia code everytime and then compare the differences. This is why WinCVS or TortoiseCVS is a Must for me. After having updated my sandbox I manage the differences between my working copy through WinDiff or Windows commander.
At the end I open the DevC++ IDE and compile.
The bottleneck of the whole operation is the internet connection. The remaining part it is a matter of few minutes. :wink:

On the other hand these CVS software are useful to diff the versions of the code and take a look to the revision notes to understand why some file has changed.
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

Topic author
Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 1 month
Location: Pordenone/Italy

Post #26by Paolo » 20.06.2005, 16:23

Hi Georgiouk

I guess that the errors you've reported are dued to wrong linker settings.
I know that this part is very frustrating and depends very much by the settings of the compiler.
Which compiler version are you using?

I don't know if I'll be able to help you with your current compiler tool, but perhaps using another tool... :wink:
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

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

Post #27by t00fri » 20.06.2005, 18:20

Paolo wrote:Hi Fridger

Your CYGWIN solution sounds very practical if you have a Broadband internet access.

I have a 56kb modem and I haven't direct SF access to Celestia so I can't download the whole Celestia code everytime and then compare the differences. This is why WinCVS or TortoiseCVS is a Must for me. After having updated my sandbox I manage the differences between my working copy through WinDiff or Windows commander.
At the end I open the DevC++ IDE and compile.
The bottleneck of the whole operation is the internet connection. The remaining part it is a matter of few minutes. :wink:

On the other hand these CVS software are useful to diff the versions of the code and take a look to the revision notes to understand why some file has changed.


Paulo,

no, no you misunderstood the main point! In my Laptop, I also have to rely on a 56k modem when I am travelling. Only at home it's part of my fast DSL-supported intranet.

Here is my setup once more:

I maintain a /virgin/ copy of Celestia on the Laptop that I NEVER touch in any way. This copy is directly /updated/ from CVS if there are new source files available.
NOTE: I NEVER reload the whole Celestia distribution via the Net! By God...

The Sync tool 'rsync' then copies ONLY the few new files over (on my laptop) to my /working copy =Sandbox/ of Celestia that I actually use for compiling. The crucial point here is that the object files that are /uninfluenced/ by the new source files remain untouched in the working copy. 'make' can find out about this along with possible recompilations of dependency files ....

In conclusion: my method is /particularly suited/ for slow net transfer and relatively slow CPUs, since only the NECESSARY changes are performed each time.

And it's very fast and convenient: no clicking of menue entries (the most awkward feature in Windows for professionals ;-) ). Things work quietly and unattendedly in the background.

Bye Fridger

PS: For those who are not aware of it YET ;-) : Why is clicking menues so awkward for experts?

Experts usually type with 10 finger technology on the keyboard VERY FAST. Clicking in between with the mouse in menues INTERRUPTS this fast flow horribly and also affects the concentration negatively....

Every experienced computer person I know (including myself) always prefers using key shortcuts instead of menue mouse clicks. First, memorizing them is ridiculously easy when you use the computer frequently and key shortcuts do INTEGRATE into the typing flow perfectly!

Topic author
Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 1 month
Location: Pordenone/Italy

Post #28by Paolo » 20.06.2005, 21:14

Fridger
I misunderstood the meaning of /virgin/ copy. :oops:

I think that you could share your CYGWIN script so anyone that should be interested in could customize it for his personal environment.

BTW I'm for the 10 finger technology too :wink: . Perhaps because I'm old enough and so my first PC hadn't an OS with a mouse driven GUI. But there is a lot of people that has never used command line programs.
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #29by maxim » 20.06.2005, 22:42

A shell script is surely the best solution as long as you're only dealing with one software package, and won't touch the code but just checkout and recompile.

If working with several CVS modules, Tortoise is simply more convenient because it hooks into windows explorer and shows CVS information while default browsing of files and folders. And CVS functionality is right inside the context menu. No need to open a seperate program when you're target is already under your mouse pointer. You even sometimes get immediate and intuitive CVS information on source code you've just got additional to some software from somewhere without explicitly asking for it - and thus an immediate motivation to check for actual development status.

maxim

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 6 months
Location: Greece

Post #30by georgiouk » 21.06.2005, 10:57

Hi Paolo and to everybody :)

I am trying to compile with Visual Studio 6.0.
I am just a teacher that wants to translate
Celestia
so it can be used by Greek students.
Altough I have translated el.po i can not
get celestia.exe
Is there a simple , easy way for sb who is
not a programmer as i am
(obviously ) to get celestia.exe ?

Any ideas would help me a lot.

georgiouk

Topic author
Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 1 month
Location: Pordenone/Italy

Post #31by Paolo » 21.06.2005, 11:56

Hi Georgiouk

I have Visual Studio 6 too.
This evening I'll annotate and post the project settings.

But are you aware that the *.po files are really useful and effective for the Linux Versions of Celestia only?
So if you plan to make a Greek version of the Windows Celestia you'll have to do a lot of work on the GUI part.
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

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

Post #32by t00fri » 21.06.2005, 11:58

Paolo wrote:Hi Georgiouk

I have Visual Studio 6 too.
This evening I'll annotate and post the project settings.

But are you aware that the *.po files are really useful and effective for the Linux Versions of Celestia only?
So if you plan to make a Greek version of the Windows Celestia you'll have to do a lot of work on the GUI part.


I seem to remember that recently it was claimed here that the later versions of Celestia don't compile anymore with the old VS 6.0 ??

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years

Post #33by dirkpitt » 21.06.2005, 14:58

t00fri wrote:I seem to remember that recently it was claimed here that the later versions of Celestia don't compile anymore with the old VS 6.0 ??


I'm recently been spending a lot of time on Windows and I can confirm that VC6 has issues with Celestia. I had to download the latest optimizing compiler from Microsoft and then it compiled.

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 6 months
Location: Greece

Post #34by georgiouk » 21.06.2005, 16:54

Thanks Paolo,
i will test my patience with Linux :cry:

Bye,
Georgiouk.

Topic author
Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 1 month
Location: Pordenone/Italy

Post #35by Paolo » 21.06.2005, 21:47

I got a lot of problems too with VC6. :?
It was a long time that I did not used it. Lately I was compiling the GLUT version of Celestia using DevC++.
I think that I'll need to migrate to VS.net as stated in the other sticky thread. :wink:
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

MB
Posts: 128
Joined: 19.07.2002
With us: 22 years 3 months
Location: Paris France

Post #36by MB » 22.06.2005, 12:20

Hi georgiouk and All,
I had this problem long time ago, since I used it during years to compile Celestia with VC6. Looking through my old posts will tell you exactly when the new code could no longer be compiled with VC6. Several posts were dedicated to this problem, apparently without solution. My conclusion was: Celestia can no longer be compiles with VC6. I gave up and try to install VS.net. I again gave up. Follows problems with my laptop and others with Linux. The lack of dynamical evolution of Celestia during the last year, (despite the effort of Fridger) also plays a significant role in my lack of interest. BTW, my philosophy is now that, about computer science we can apply a well known french sentence:
"Plus compliqu?©, tu meurs" :(
More positively, as I recently told in this thread, I start again to install tools, and with the kind suggestion of Paolo and Maxim I succeeded to install CVS tortuose and try again to install VS.net without success (see post above).
Finally, using informations given by WComer in the next thread ("The free windows ..............)
I install MS Visual C++ Toolkit 2003. and Microsoft Platform SDK. I was able Yesterday to begin to compile Celestia again!! after 1 or 2 years. Unfortunately, my compile gives error at the first link (Celutil), but I am still confident and if not solved I will again ask for help. :wink:
This is just my experience.
MB
[/url][/quote]

MB
Posts: 128
Joined: 19.07.2002
With us: 22 years 3 months
Location: Paris France

Post #37by MB » 22.06.2005, 15:04

Again me,
No chance even at the begining of compile procedure :oops: , after proper compile of the celutil files, it seems that the link to create the library does not work?
Unfortunately,I am not able to interpret the message.
Any help is appreciated.
Thanks
MB



Code: Select all

C:\Mycelestia>makerelease

C:\Mycelestia>cd src

C:\Mycelestia\src>nmake /f winbuild.mak CFG=Release

Microsoft (R) Program Maintenance Utility   Version 7.00.8882
Copyright (C) Microsoft Corp 1988-2000. All rights reserved.

        cd celutil
        nmake /NOLOGO util.mak CFG=Release
        lib /out:.\Release\cel_utils.lib  .\Release\bigfix.obj  .\Release\color.obj  .\Release\debug.obj  .\Release\directory.obj  .\Release\filetype.obj  .\Release\formatnum.obj  .\Release\utf8.obj  .\Release\util.obj  .\Release\windirectory.obj  .\Release\wintimer.obj  .\Release\winutil.obj
NMAKE : fatal error U1077: 'lib' : return code '0x80'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\
bin\nmake.exe"' : return code '0x2'
Stop.

MB
Posts: 128
Joined: 19.07.2002
With us: 22 years 3 months
Location: Paris France

Post #38by MB » 02.07.2005, 08:03

Hi Geogiouk and All,
Remember, I had the same error messages as you got! :oops:
Convinced that our problem was due to find the good library path , I tried several pathes and finally, at least in my case, with the imposing following path,
Set LIB=C:\Program Files\Microsoft Platform SDK\Lib\IA64\mfc;%LIB%
I succeed in linking celestia and execute it without problem. :D
The path
Set LIB=C:\Program Files\Microsoft SDK\Lib;%LIB%

originally given by Walton Comer has to be removed in my case (Labtop with Windows XP), and that makes differences at variance to what were found by Maxim ''
I may guess that the first path \Lib superseded the second one.

Finally here is my successful celvars.bat

Code: Select all

@echo off

Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%
Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%

Set INCLUDE=C:\Program Files\Microsoft Platform SDK\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Platform SDK\include\mfc;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Platform SDK\Lib\IA64\mfc;%LIB%


MB

Apollonian
Posts: 52
Joined: 19.10.2004
With us: 20 years

Post #39by Apollonian » 02.07.2005, 17:41

I'm still getting an error:

Code: Select all

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or c
orrupt
NMAKE : fatal error U1077: 'link.exe' : return code '0x463'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\
bin\nmake.exe"' : return code '0x2'
Stop.


It seems to be trying to create a TMP file "nm4D.tmp" but when I look for it, it doesn't exist.

Any ideas?

[edit] ... after much fussing and 24 hours of on-and-off work, I finally got the right combination of INCLUDEs PATHs and LIBs which compiles Celestia.exe on my machine. Phew, now I can finally get to the fun part...or maybe I'll just sleep *yawns and falls asleep*

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 6 months
Location: Greece

Post #40by georgiouk » 13.10.2005, 12:34

Hi!
In my attempt to complile I got these mistakes

C:\MyCelestia\celestia\src>nmake /f winbuild.mak CFG=Release

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

cd celutil
nmake /NOLOGO util.mak CFG=Release
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1
Stop.


and I cant understand why C:\Program is not recognised.I have checked my path and I got it correct in my case is:

Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%
Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%

Set INCLUDE=C:\Program Files\Microsoft Platform SDK\Include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft SDK\Lib;%LIB%
Set INCLUDE=C:\Program Files\Microsoft Platform SDK\Include\mfc;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Platform SDK\Lib\IA64\mfc;%LIB%

Any ideas?


Return to “Development”