Page 1 of 1

Compiling question

Posted: 14.06.2007, 20:23
by patzienta
Hi all,

I tried compiling the source code that I downloaded through TortoiseCVS. I managed to get around several compiling errors, but I am not sure what to do about these two:

Error 16 fatal error C1083: Cannot open source file: '.\octree.cpp': No such file or directory c1xx


Error 43 fatal error RC1015: cannot open include file 'afxres.h'. c:\Celestia14June\celestia\src\celestia\res\celestia.rc 17


Do you have an idea?

-Vlad

re

Posted: 17.06.2007, 01:51
by John Van Vliet
what are you using to compile
the old cmd version from MS
visual studio
or what ?

Posted: 18.06.2007, 20:04
by patzienta
I used TortoiseCVS to download the source-code. I used this directory: CVSROOT=:pserver:anonymous@celestia.cvs.sourceforge.net:/cvsroot/celestia

I have installed:
- Microsoft Visual C++ 2005 Express Edition
- Microsoft Platform SDK for Windows Server 2003 R2 (I believe this is the last version)

I have copied the 2 folders from the file: winlibs-new.zip to the Celestia folder.

I managed to get around the afxres.h problem (by including the "mfc" folder in the Platform SDK to the VC++ Directories - Include).

However, another one came up:

Code: Select all

fatal error LNK1104: cannot open file 'cel_engine.lib'   Celestia

Do you have a suggestion on how to overcome this one?

Posted: 18.06.2007, 21:36
by t00fri
Could it be that Celestia is about the first code that you are trying to compile with that compiler??

Bye Fridger

re

Posted: 18.06.2007, 22:02
by John Van Vliet
i am only familiar with Microsoft Visual 2002.net ( i am running Linux at the moment ) so some place in 2005 you will need to tell the compiler where to find cel_engine.lib

Posted: 18.06.2007, 23:39
by patzienta
Yes, I think I need to tell the compiler where to find the cel_engine.lib file. However, the file is not in the Source-Code that I downloaded. (I did a search on it and it didn't find anything). So, if it is not there...where do I tell the compiler to find it?

As for the previous question - I have compiled other programs (simple ones) and they worked fine.

Posted: 18.06.2007, 23:54
by cartrite
Hi patzienta,
cel_engine.lib is created during the compile process. It is all the object files in the celengine directory. The reason the file cel_engine.lib is not being found is that some objectfile was not created due to an error or there is a linking problem. Look at the output on the cmd console. You could also look in celestia/src/celengine/res folder to see if it was created.

cartrite

Posted: 19.06.2007, 03:00
by patzienta
I believe I made it through the octree.cpp & cel_engine.lib errors.

There is another one that popped up -

Code: Select all

cannot open file libc.lib

Posted: 19.06.2007, 17:51
by cartrite
libc.lib should be in Microsoft Visual C++ Toolkit 2003/lib or if your using something different then a similar folder. If it is there then you probably don't have your environment variables set correctly. That tells the OS where to locate different files.

cartrite

Posted: 05.07.2007, 12:57
by duds26
Could you post it please, libc.lib is not in the Microsoft Visual C++ Toolkit 2003 R2....
It would make things go much faster than having to download the Visual C++ Toolkit 2003!
(forced to use Visual C++ 2005 because 2003 doesn't work on vista)

Posted: 05.07.2007, 15:59
by selden
libc.lib is proprietary Microsoft software. You must get it from an official Microsoft source. Please do not ask others to violate their licenses.

[edit]
However, I've seen Web pages claiming that it isn't actually needed if you're using VS 2005 and that
You should be able to get around it by specifically ignoring it in the linker properties (Project... Linker/ Input/Ignore Specific Library).


[/edit]

Posted: 14.07.2007, 17:14
by duds26
Have ignored it and get other problems. Seen that libcmt.lib is used now for having a multithreading advantage.

Anyway this is my output:
1>------ Build started: Project: Celestia, Configuration: Debug Win32 ------
1>Linking...
1>CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
1>Build log was saved at "file://c:\Users\Peter\CVS&SVN\CVS repositories\celestia\src\celestia\Debug\BuildLog.htm"
1>Celestia - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

When I get this to work mayby I'll make a tutorial for compiling celestia from scratch, that is up to date and uses free tools.!

PS: Mayby Eclipse with the C/C++ tools is a good IDE for compiling, it has a lot of advanced features and is FREE so anybody can use it!

Posted: 17.07.2007, 00:44
by cyber_space_doc
you need to delete the manifest and rebuild all.

I added libc.lib to the ignore list on the linker tab. I also had to download libintl.lib from sourceforge.

re

Posted: 17.07.2007, 04:53
by John Van Vliet
hi here is a link to my old Visual Studio.net 2002 ( 7.0) .sln files
with ALL the include.h's and ALL *.lib's including libc.lib
it dose build 1.4.1 but NOT cvs
http://z33.zupload.com/download.php?fil ... path=42579

Posted: 17.07.2007, 12:03
by duds26
thanks this is very usefull

Posted: 17.07.2007, 20:45
by cyber_space_doc
what is libc.lib used for?

Posted: 17.07.2007, 20:52
by selden
It's the statically linked single-threaded C and C++ runtime library. A search of Microsoft's web site will find more than you want to know...

[edit]
Runtime libraries provide things like the I/O subroutines and other routines for interfacing with the operating sytstem.
[/edit]

Posted: 17.07.2007, 22:31
by cyber_space_doc
I don't need to link to libc.lib to build Celestia. I wonder what libraries Celestia will need on windows if I use the flag /NODEFAULTLIB.

[edit]

If I don't ignore libc.lib I get linker errors complaining about symbol clashes.

btw: I am not sure about how to ensure celx support on the cvs version because I get lua linker errors. How do I compile the contents of the folder Celscript?

[/edit]