Going crazy compiling with VS2005 Express

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Pierral
Posts: 10
Joined: 16.01.2008
With us: 16 years 8 months
Location: Cannes, FR

Going crazy compiling with VS2005 Express

Post #1by Pierral » 04.02.2008, 16:29

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.

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #2by selden » 04.02.2008, 17:41

For compiling with VS 2005, you need winlibs-2.zip, not winlibs.zip.

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

Topic author
Pierral
Posts: 10
Joined: 16.01.2008
With us: 16 years 8 months
Location: Cannes, FR

Post #3by Pierral » 05.02.2008, 09:48

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.

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #4by selden » 05.02.2008, 13:05

You're very welcome.
Selden

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 2 months
Location: Regensburg, Germany

Post #5by Andy74 » 09.02.2008, 23:14

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

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #6by selden » 09.02.2008, 23:46

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.
Selden

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 2 months
Location: Regensburg, Germany

Post #7by Andy74 » 10.02.2008, 12:32

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

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #8by selden » 10.02.2008, 15:13

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.)
Selden

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 6 months

Post #9by Adirondack » 10.02.2008, 16:23

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
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)
The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #10by selden » 10.02.2008, 17:10

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.
Selden

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 6 months

Post #11by Adirondack » 10.02.2008, 17:43

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
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)

The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #12by selden » 10.02.2008, 18:08

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.
Selden

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 8 months
Location: Seattle, Washington, USA

Post #13by chris » 10.02.2008, 18:46

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

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 2 months
Location: Regensburg, Germany

Post #14by Andy74 » 17.02.2008, 22:46

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 :?

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #15by selden » 18.02.2008, 11:47

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.
Selden

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 2 months
Location: Regensburg, Germany

Post #16by Andy74 » 18.02.2008, 20:40

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


Return to “Development”