Page 1 of 1

Going crazy compiling with VS2005 Express

Posted: 04.02.2008, 16:29
by Pierral
Hi guys, I need your help please !!
I'm trying to compile Celestia 1.5.0 for 2 days now...
I've got Visual C++ 2005 Express (the free one), I have installed MS Platform SDK, VS 2003 C++ Toolkit, I downloaded CSpice library, winlibs-new.zip, and everything I read in all theses topics or in wiki...
But still having a link error...
I first have a problem with CSpice link problem with _errno var... ok after many tries in configuration, and download latest version of the lib, I just get it out of celestia...
But I still have a problem with the Lua lib. As my project is to add a lua library, i first tried to compile with my version of Lua lib (from the 5.1, i hope...).
After many link problem i thought "ok i did wrong with my library, i try with the one in winlibs".
But even if i change preprocessor var from 0x050100 to 0x050000, or i put new version lua, i still have problem !!
Can anyone give me a good source version file of Lua please ??
I downloaded latest lua, i compiled, make lib, i also tryied with the one in the winlibs.zip, but i still have error..
and after more than 2 days of just trying to compile, my head is going crazy...
thanks ! :( :? :cry:

Pierral.

Posted: 04.02.2008, 17:41
by selden
For compiling with VS 2005, you need winlibs-2.zip, not winlibs.zip.

See http://en.wikibooks.org/wiki/Celestia/D ... and_VS2008

Posted: 05.02.2008, 09:48
by Pierral
Thanks a lot Selden !!!! You're my hero !!! :wink:

I also downloaded cspice.lib !

I had a little problem with axisarrow.cpp which was not added in the source file of celengine, but now it's compiling !!! :lol: :lol:

I even launched Celestia from Visual !!! And it works !!
I know it's normal, but after more than 2 days just trying to compile, you can't imagine how happy i am !!!

Thanks again :D


Pierral.

Posted: 05.02.2008, 13:05
by selden
You're very welcome.

Posted: 09.02.2008, 23:14
by Andy74
Since about a week I'm also no longer able to build Celestia with my current environment that worked fine before for months ...
I'm using the Visual C++ 2005 Express compiler with the Windows Platform SDK 2003 R2. OS is Win XP Home.
I downloaded again the winlibs-2.zip and winbuild-2.zip as suggested by Selden.
But I still get the following errors while trying to compile the current Celestia sources from SVN:

Code: Select all

cel_engine.lib(render.obj) : error LNK2019: unresolved external symbol "void __cdecl RenderVelocityArrow(class Vector3<float> const &,float,float)" (?RenderVelocityArrow@@YAXABV?$Vector3@M@@MM@Z) referenced in function "private: void __thiscall Renderer::renderVelocityVector(class Body &,class Point3<float>,float,double,float,float)" (?renderVelocityVector@Renderer@@AAEXAAVBody@@V?$Point3@M@@MNMM@Z)
cel_engine.lib(render.obj) : error LNK2019: unresolved external symbol "void __cdecl RenderAxisArrows(class Quaternion<float> const &,float,float)" (?RenderAxisArrows@@YAXABV?$Quaternion@M@@MM@Z) referenced in function "private: void __thiscall Renderer::renderAxes(class Body &,class Point3<float>,float,double,float,float,enum RenderListEntry::RenderableType)" (?renderAxes@Renderer@@AAEXAAVBody@@V?$Point3@M@@MNMMW4RenderableType@RenderListEntry@@@Z)
cel_engine.lib(render.obj) : error LNK2019: unresolved external symbol "void __cdecl RenderSunDirectionArrow(class Vector3<float> const &,float,float)" (?RenderSunDirectionArrow@@YAXABV?$Vector3@M@@MM@Z) referenced in function "private: void __thiscall Renderer::renderSunDirection(class Body &,class Point3<float>,float,double,class std::vector<struct LightSource,class std::allocator<struct LightSource> > const &,float,float)" (?renderSunDirection@Renderer@@AAEXAAVBody@@V?$Point3@M@@MNABV?$vector@ULightSource@@V?$allocator@ULightSource@@@std@@@std@@MM@Z)
cel_engine.lib(parseobject.obj) : error LNK2019: unresolved external symbol "class RotationModel * __cdecl GetCustomRotationModel(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?GetCustomRotationModel@@YAPAVRotationModel@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "class RotationModel * __cdecl CreateRotationModel(class AssociativeArray *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,double)" (?CreateRotationModel@@YAPAVRotationModel@@PAVAssociativeArray@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@N@Z)
.\Release\celestia.exe : fatal error LNK1120: 4 unresolved externals

What is going wrong??
Thanks for any help.

Andy

Posted: 09.02.2008, 23:46
by selden
Are you building from the new svn repository?

Several new source code files have been added to Celestia since winbuild-2.zip was created :(
They need to be added to the celengine makefile.

Specifically,

Add these lines to celestia/src/celengine/engine.mak
in the OBJS=\ section

Code: Select all

        $(INTDIR)\axisarrow.obj \
        $(INTDIR)\customrotation.obj \
        $(INTDIR)\scriptrotation.obj \


I put them in alphabetically, but that's probably not necessary.

Posted: 10.02.2008, 12:32
by Andy74
Bravo, Selden, that was it ... :D

Thank you very much for your instructions. (By the way, I am indeed building from the new svn repository.)
Just a question: Should/could I have known that or was it necessary to ask an insider here?

Thanks again
Andy

Posted: 10.02.2008, 15:13
by selden
You needed to have asked an insider :(

Keeping all of the different methods of building Celestia working as its build environments change is getting to be a serious problem -- almost as bad as having separate GUIs for the various platforms. The GUI issue is being addressed; maybe the build environments can be too.

(I'll add a mention of this in the WikiBook.)

Posted: 10.02.2008, 16:23
by Adirondack
Selden,

my understanding is that all make-files are updated in the SVN trunk (4105),
so one do not need to use winbuild-2.zip to compile with MSVC2005.
I can compile with MSVC2005 without the winbuild-2.zip anyway.

Adirondack

Posted: 10.02.2008, 17:10
by selden
Adirondack,

I just now downloaded the current (r4106) .mak files. (I deleted all mak files and did an svn co)

They're still configured for VS2003.
Using makerelease.bat with them under VS2005 fails because LIBC.lib no longer exists.

My impression is that the files used with the MS Development GUI are up to date, but I don't use that interface.

Posted: 10.02.2008, 17:43
by Adirondack
Selden,

I also use the console with makerelease.
I just copied libcmt.lib from e.g. C:\...\Microsoft Visual Studio 8\VC\lib and renamed it to libc.lib.
It remains a link warning, but it works for me.

Adirondack

Posted: 10.02.2008, 18:08
by selden
Adirondack,

If you watch the build, you'll see lots of error messages related to obsolete compiler and linker qualifiers, too. Those go away when using the updated mak files.

As I wrote previously, maintaining the different build environments is a pain. It'd be nice if the GNU compiler and linker could be used for all of the platforms, but my impression is that performance would be significantly poorer, and the development environment might not be as productive, either.

Posted: 10.02.2008, 18:46
by chris
I want to check in the new build files, but at the moment they don't work with VS2003. I will try and get that fixed very soon.

--Chris

Posted: 17.02.2008, 22:46
by Andy74
With the current SVN code, compiling fails again. Here is the respective part of the compiler's log output:

Code: Select all

   link.exe @C:\DOKUME~1\Andreas\LOKALE~1\Temp\nmC.tmp
celestiacore.obj : error LNK2019: unresolved external symbol "public: void __thiscall Universe::markObject(class Selection const &,float,class Color,enum Marker::Symbol,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?markObject@Universe@@QAEXABVSelection@@MVColor@@W4Symbol@Marker@@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void __thiscall CelestiaCore::charEntered(char const *,int)" (?charEntered@CelestiaCore@@QAEXPBDH@Z)
winmain.obj : error LNK2001: unresolved external symbol "public: void __thiscall Universe::markObject(class Selection const &,float,class Color,enum Marker::Symbol,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?markObject@Universe@@QAEXABVSelection@@MVColor@@W4Symbol@Marker@@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
cel_engine.lib(simulation.obj) : error LNK2001: unresolved external symbol "public: void __thiscall Universe::markObject(class Selection const &,float,class Color,enum Marker::Symbol,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?markObject@Universe@@QAEXABVSelection@@MVColor@@W4Symbol@Marker@@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
cel_engine.lib(command.obj) : error LNK2001: unresolved external symbol "public: void __thiscall Universe::markObject(class Selection const &,float,class Color,enum Marker::Symbol,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?markObject@Universe@@QAEXABVSelection@@MVColor@@W4Symbol@Marker@@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
.\Release\celestia.exe : fatal error LNK1120: 1 unresolved externals

Is it a similar problem as before?

Bye Andy :?

Posted: 18.02.2008, 11:47
by selden
Andy,

It works fine for me. The code hasn't been updated for several days.

Sometimes glitches damage the files, causing the mak files to get overwritten, etc. I'd suggest restoring all of Celestia's sourcefiles and then restoring the updated mak files.

Posted: 18.02.2008, 20:40
by Andy74
selden wrote:Andy,

It works fine for me. The code hasn't been updated for several days.

Sometimes glitches damage the files, causing the mak files to get overwritten, etc. I'd suggest restoring all of Celestia's sourcefiles and then restoring the updated mak files.


Yeah, that helped! Thanks again, Selden!

Andy