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

The place to discuss creating, porting and modifying Celestia's source code.
steffens
Posts: 162
Joined: 06.11.2003
With us: 15 years 11 months
Location: RP Germany

Post #41by steffens » 13.10.2005, 14:11

I guess this is because of the spaces in the path names. Try something like

Code: Select all

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%

and so on.

Just a guess though, as I don't know exactly where nmake stumbles over the space in "Program Files" ...

Hope that helps,
steffens

Avatar
John Van Vliet
Posts: 2710
Joined: 28.08.2002
With us: 17 years 1 month

re

Post #42by John Van Vliet » 14.10.2005, 06:11

it has ben my exp that path errors are the prob. in
start > control panel > proformance and maintance > advanced > envoriment variables set for curent user

add all the paths

new
Lib and then path
Include C:\path

then add the paths to for all users
LIB
PATH
INCLUDE

the caps are inporent there is a dif for Include and INCLUDE

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #43by georgiouk » 14.10.2005, 10:13

Hello!
I have followed your instructions completing the variables according to this code



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%


and now i get these mistakes:



LINK : fatal error LNK1181: cannot open input file 'user32.lib'
NMAKE : fatal error U1077: 'link.exe' : return code '0x49d'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\
bin\nmake.exe"' : return code '0x2'
Stop.


Any ideas?
it seems that i cant define more than one variable with the name lib,include and path.When I try to insert a new variable with tha name include automatically it substitutes the previous one.Thats why my code in 'celvars' is only
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%

instead of

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%


Thanks for your time!!!!!!! :)

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #44by georgiouk » 14.10.2005, 10:47

Hi again!
I forgot to mention that I have also tried these code also (that Steffens suggested)


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%


Thanks in advance!!

steffens
Posts: 162
Joined: 06.11.2003
With us: 15 years 11 months
Location: RP Germany

Post #45by steffens » 14.10.2005, 11:39

Multiple lines of the form

Code: Select all

Set INCLUDE=some\path;%INCLUDE%
Set INCLUDE=another\path;%INCLUDE%
Set INCLUDE=and\so\on;%INCLUDE%

can be interpreted as

Code: Select all

Set INCLUDE=and\so\on;another\path;some\path;%INCLUDE%

The SET command will append the old INCLUDE path (specified by %INCLUDE% ) to the new one. You can check that all path entries are correctly set by using

Code: Select all

echo %INCLUDE%
to print the content of the INCLUDE variable.

steffens

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #46by selden » 14.10.2005, 11:52

Here's what's in my cxx-setup.bat:

Code: Select all


Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include;%INCLUDE%
Set INCLUDE=G:\Celestia\celestia\inc;%INCLUDE%

Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;%PATH%


Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
Set LIB=G:\Celestia\celestia\lib;%LIB%

You'll need to change G: to wherever you have the celestia cvs tree.

I usually use this procedure:

Open a directory window: explore the CVS tree
Right-click on \cvs\Celestia
Select "Open Command Window Here"
type these three commands:

cxx-setup.bat
cd celestia
makerelease.bat
Selden

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #47by georgiouk » 14.10.2005, 12:03

Hi!!!!!!!!!!!!!!!!!!


With this code in celvars.bat


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%




I now get these mistakes(actually a small part of them):



With this path cel_engine.lib(fragmentprog.obj) : error LNK2001: unresolved external symbol __i
mp__glGetError@0
.\Release\celestia.exe : fatal error LNK1120: 113 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\
bin\nmake.exe"' : return code '0x2'
Stop.


Any ideas?

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #48by selden » 14.10.2005, 12:08

You need to include more directories in your search lists. See my posting above for an example that uses VS2003. Of course, your actual directories will be different for use with the Toolkit.
Selden

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #49by georgiouk » 14.10.2005, 12:20

I will try that and i let you know.
Thank you very much.
:)

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #50by georgiouk » 17.10.2005, 13:02

I have installed Microsoft Visual Studio.Net 2003.
I didnt understand how you create/ or where did you find the
cxx-setup.bat

Thanks in advance.

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #51by selden » 17.10.2005, 13:54

Use your favorite text editor. Cut and paste from my posting above. I created it by trial-and-error when makerelease.bat couldn't find various files and programs.

I put it in the CVS directory Celestia, which also contains the CVS directory celestia. Note the difference in capitalization. I keep it in Celestia because too often I've had to delete everything that's in celestia in order to be sure that I've downloaded the current sourcecode.
Selden

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #52by georgiouk » 18.10.2005, 08:37

Hello!
By using the Microsoft Visual Studio .Net 2003 the Microsoft Platform SDK is needed?

Thanks!:)

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #53by georgiouk » 18.10.2005, 10:26

Hi !
I have finally managed to get celestia.exe thanks to yours cxx-setup.bat but now I cant open it instead a message appears that says that :
"This application has failed to start because libpng1.dll was not found .Re-installing the application may fix this problem."Although I have put the specific file to celestia\src\celestia it doesnt seems to work.


Any ideas?

Thanks in advance!

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #54by selden » 18.10.2005, 11:06

.DLLs are runtime libraries. They have to be in the same folder as Celestia.exe
Selden

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #55by georgiouk » 18.10.2005, 11:23

Ok I have done it.Now is says that there is an error reading configuration file.I dont have a clue what to do next.Any ideas?

Thanks!

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #56by selden » 18.10.2005, 13:28

Do you mean it can't read celestia.cfg?
That has to be in the same folder with celestia.exe, too. It's a plain-text file. You should look at it with Notepad to make sure it hasn't been damaged.
Selden

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #57by georgiouk » 20.10.2005, 08:37

Hi!
I have put the celestia.cfg in the same folder with celestia.exe and now appears a new message "Cannot read star database".

Any ideas?

Thanks!:)

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #58by georgiouk » 20.10.2005, 10:48

It seems that I have done something wrong
to appear so many mistakes in every step.

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #59by selden » 20.10.2005, 11:02

It sounds to me like you've rearranged the folders. As a result, the files that Celestia needs are not in the folder /Celestia/celestia/. The folders and files must be arranged exactly as they are in the CVS repositiory on SourceForge, even though they seem to be redundant. Let cvs create *all* of them.

Start over again. Delete all of your cvs directory tree (first save the command files and libraries that you added manually, of course.)

Create only the folder /Celestia/ in an appropriate location. cd to it. Run the cvs command

Code: Select all

cvs -z 3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/celestia checkout celestia/

or the equivalent command for whatever cvs client you're using.

It will create the folder /Celestia/celestia/ and download all of its contents, including both files and directories. You are missing the files that are supposed to be in /Celestia/celestia/

makerelease.bat will put celestia.exe in the folder /Celestia/celestia/
Selden

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 14 years 5 months
Location: Greece

Post #60by georgiouk » 21.10.2005, 09:22

Thank you very much! you really have helped me a lot.
I want to translate Celestia but unfortunately it has to be run in Windows so I can not take advantage the el.po file that is only useful in Linux.
Could you give me some guidelines please?(I hope I am not asking not much).

Thanks again!:)


Return to “Development”

Who is online

Users browsing this forum: 45 guests