VS.Net

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Cr0we

VS.Net

Post #1by Cr0we » 14.05.2002, 17:33

Anyone gotten this bad boy to compile in VS.Net?

I keep getting Iterator problems in the Favorites List.

Code: Select all


if ((*iter)->name == itemName || (*iter)->parentFolder == itemName)
   {
        //Delete item from favorites.
        ((FavoritesList*)favorites)->erase((FavoritesList::iterator)iter);
   }



Doesn't seem to like that one much for instance giving me the following error:

d:\-=Dev=-\-=CVS=-\celestia-1.2.4\src\celestia\winlocations.cpp(522) : error C2440: 'type cast' : cannot convert from 'std::vector<_Ty,_Ax>::const_iterator' to 'std::vector<_Ty,_Ax>::iterator'

Anyone have any Ideas?

Thanks

Cr0we

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

Post #2by chris » 14.05.2002, 17:54

I just picked up VS.Net last week but I haven't installed it yet. I'll take a look at it later, but it appears this code is playing fast and loose with const declarations.

--Chris

Topic author
Cr0we

Out of the box

Post #3by Cr0we » 14.05.2002, 18:45

Yeah, thats 1.2.4 right out of the box...

Not sure what the prob is.

drjoe

Had the same problem with gcc 3.0

Post #4by drjoe » 15.05.2002, 01:25

What I did was to change the c++ and the header files to use ::iterator instead
of ::const_iterator .

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 11 months
Location: Outback Australia

.net

Post #5by marc » 15.05.2002, 05:21

Using .NET

drjoe wrote:What I did was to change the c++ and the header files to use ::iterator instead
of ::const_iterator .



Ive made this change but now I get linking errors

any ideas on the below mess? Its .NET compiler errors.

Linking...
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl CenterWindow(struct HWND__ *,struct HWND__ *)" (?CenterWindow@@YAXPAUHWND__@@0@Z) referenced in function "int __stdcall AddLocationFolderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AddLocationFolderProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl AddNewLocationFolderInTree(struct HWND__ *,char *)" (?AddNewLocationFolderInTree@@YAXPAUHWND__@@PAD@Z) referenced in function "int __stdcall AddLocationFolderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AddLocationFolderProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl AddButtonDefaultStyle(struct HWND__ *)" (?AddButtonDefaultStyle@@YAXPAUHWND__@@@Z) referenced in function "int __stdcall AddLocationFolderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AddLocationFolderProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl RemoveButtonDefaultStyle(struct HWND__ *)" (?RemoveButtonDefaultStyle@@YAXPAUHWND__@@@Z) referenced in function "int __stdcall AddLocationFolderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AddLocationFolderProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl RenameLocationInFavorites(struct HWND__ *,char *,class CelestiaCore *)" (?RenameLocationInFavorites@@YAXPAUHWND__@@PADPAVCelestiaCore@@@Z) referenced in function "int __stdcall RenameLocationProc(struct HWND__ *,unsigned int,unsigned int,long)" (?RenameLocationProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl OrganizeLocationsOnMouseMove(struct HWND__ *,long,long)" (?OrganizeLocationsOnMouseMove@@YAXPAUHWND__@@JJ@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl MoveLocationInFavorites(struct HWND__ *,class CelestiaCore *)" (?MoveLocationInFavorites@@YAXPAUHWND__@@PAVCelestiaCore@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl OrganizeLocationsOnLButtonUp(struct HWND__ *)" (?OrganizeLocationsOnLButtonUp@@YAXPAUHWND__@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl DragDropAutoScroll(struct HWND__ *)" (?DragDropAutoScroll@@YAXPAUHWND__@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "bool __cdecl isOrganizeLocationsDragDropActive(void)" (?isOrganizeLocationsDragDropActive@@YA_NXZ) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl OrganizeLocationsOnBeginDrag(struct HWND__ *,struct tagNMTREEVIEWA *)" (?OrganizeLocationsOnBeginDrag@@YAXPAUHWND__@@PAUtagNMTREEVIEWA@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "struct _TREEITEM * __cdecl PopulateLocationsTree(struct HWND__ *,class CelestiaCore *,struct HINSTANCE__ *)" (?PopulateLocationsTree@@YAPAU_TREEITEM@@PAUHWND__@@PAVCelestiaCore@@PAUHINSTANCE__@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl DeleteLocationFromFavorites(struct HWND__ *,class CelestiaCore *)" (?DeleteLocationFromFavorites@@YAXPAUHWND__@@PAVCelestiaCore@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl BuildFavoritesMenu(struct HMENU__ *,class CelestiaCore *)" (?BuildFavoritesMenu@@YAXPAUHMENU__@@PAVCelestiaCore@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl SyncTreeFoldersWithFavoriteFolders(struct HWND__ *,class CelestiaCore *)" (?SyncTreeFoldersWithFavoriteFolders@@YAXPAUHWND__@@PAVCelestiaCore@@@Z) referenced in function "int __stdcall OrganizeLocationsProc(struct HWND__ *,unsigned int,unsigned int,long)" (?OrganizeLocationsProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "struct _TREEITEM * __cdecl PopulateLocationFolders(struct HWND__ *,class CelestiaCore *,struct HINSTANCE__ *)" (?PopulateLocationFolders@@YAPAU_TREEITEM@@PAUHWND__@@PAVCelestiaCore@@PAUHINSTANCE__@@@Z) referenced in function "int __stdcall AddLocationProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AddLocationProc@@YGHPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol "void __cdecl InsertLocationInFavorites(struct HWND__ *,char *,class CelestiaCore *)" (?InsertLocationInFavorites@@YAXPAUHWND__@@PADPAVCelestiaCore@@@Z) referenced in function "int __stdcall AddLocationProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AddLocationProc@@YGHPAUHWND__@@IIJ@Z)
winstarbrowser.obj : error LNK2019: unresolved external symbol "void __cdecl SetMouseCursor(char const *)" (?SetMouseCursor@@YAXPBD@Z) referenced in function "void __cdecl RefreshItems(struct HWND__ *,class StarBrowser *)" (?RefreshItems@@YAXPAUHWND__@@PAVStarBrowser@@@Z)
cel_engine.lib(render.obj) : error LNK2019: unresolved external symbol "public: __thiscall MultiResTexture::MultiResTexture(void)" (??0MultiResTexture@@QAE@XZ) referenced in function "public: __thiscall Surface::Surface(class Color)" (??0Surface@@QAE@VColor@@@Z)
cel_engine.lib(solarsys.obj) : error LNK2019: unresolved external symbol "public: __thiscall MultiResTexture::MultiResTexture(void)" (??0MultiResTexture@@QAE@XZ) referenced in function "public: __thiscall Surface::Surface(class Color)" (??0Surface@@QAE@VColor@@@Z)
cel_engine.lib(body.obj) : error LNK2001: unresolved external symbol "public: __thiscall MultiResTexture::MultiResTexture(void)" (??0MultiResTexture@@QAE@XZ)
cel_engine.lib(render.obj) : error LNK2019: unresolved external symbol "public: class Texture * __thiscall MultiResTexture::find(unsigned int)" (?find@MultiResTexture@@QAEPAVTexture@@I@Z) referenced in function "public: void __thiscall Renderer::loadTextures(class Body *)" (?loadTextures@Renderer@@QAEXPAVBody@@@Z)
cel_engine.lib(render.obj) : error LNK2019: unresolved external symbol "public: __thiscall MultiResTexture::MultiResTexture(int,int,int)" (??0MultiResTexture@@QAE@HHH@Z) referenced in function "private: void __thiscall Renderer::renderStar(class Star const &,class Point3<float>,float,float,class Quaternion<float>,double,float,float)" (?renderStar@Renderer@@AAEXABVStar@@V?$Point3@M@@MMV?$Quaternion@M@@NMM@Z)
cel_engine.lib(solarsys.obj) : error LNK2019: unresolved external symbol "public: __thiscall MultiResTexture::MultiResTexture(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0MultiResTexture@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall RingSystem::RingSystem(float,float,class Color,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0RingSystem@@QAE@MMVColor@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
cel_engine.lib(solarsys.obj) : error LNK2019: unresolved external symbol "public: void __thiscall MultiResTexture::setTexture(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,unsigned int)" (?setTexture@MultiResTexture@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MI@Z) referenced in function "class Surface * __cdecl CreateSurface(class AssociativeArray *)" (?CreateSurface@@YAPAVSurface@@PAVAssociativeArray@@@Z)
cel_engine.lib(solarsys.obj) : error LNK2019: unresolved external symbol "public: void __thiscall MultiResTexture::setTexture(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int)" (?setTexture@MultiResTexture@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@I@Z) referenced in function "class Surface * __cdecl CreateSurface(class AssociativeArray *)" (?CreateSurface@@YAPAVSurface@@PAVAssociativeArray@@@Z)
cel_engine.lib(solarsys.obj) : error LNK2019: unresolved external symbol "class Orbit * __cdecl LoadSampledOrbit(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadSampledOrbit@@YAPAVOrbit@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "class Body * __cdecl CreatePlanet(class PlanetarySystem *,class AssociativeArray *,bool)" (?CreatePlanet@@YAPAVBody@@PAVPlanetarySystem@@PAVAssociativeArray@@_N@Z)
cel_engine.lib(customorbit.obj) : error LNK2019: unresolved external symbol "class Orbit * __cdecl CreateVSOP87Orbit(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?CreateVSOP87Orbit@@YAPAVOrbit@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "class Orbit * __cdecl GetCustomOrbit(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?GetCustomOrbit@@YAPAVOrbit@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
.\Release/Celestia.exe : fatal error LNK1120: 26 unresolved externals

drjoe

Guess

Post #6by drjoe » 15.05.2002, 15:29

I didn't get those errors, but my guess is that that there is a missing header file.
What seems to be happening is that the prototypes for winmain are not matching
the prototypes in the compiled code.

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 11 months
Location: Outback Australia

Post #7by marc » 16.05.2002, 04:31

winmain.cpp and dds.cpp do not have a header file. should they?


Return to “Development”