Kompilacja

Coś czuję, że zakładanie tematów z kolejnymi moimi problemami, będzie zajęciem na najbliższe dni.

Postanowiłem, że wezmę się za skrypcenie, napisałem skrypt, krótki, który w prosty sposób daje alternatywne ulepszenie. Więc ściągnąłem kod źródłowy, boost 1.47 i SVN program i co i dupa.
Wykrzacza się na wszystkim, zrobiłem krok po kroku jak jest w instrukcji.

-Stworzyłem folder
-ściągnąłem do pliku trunk VCMI (kod źródłowy)
-otworzyłem VC++2010
-rozpakowałem i wgrałem boosta, na komputerze mam wgrany przez installer 1.5 i rozpakowany i zainstalowany 1.47
-użyłem boosta 1.47 tak jak w przykładzie do projektów, ścieżka do “include” i "libraries"
pliki: VCMI_global i Microsoft.Cpp.Win32.user.
-skopiowałem lib z boosta do libs i stworzyłem folder boost w include

-próbowałem z i bez patchy z forum, bez efektów

i nie chodzi. Zauważyłem, że brakuje troszkę plików, które są zainicjowane, ale z powodu braku crashuje.

To PODCZAS GDY WLACZE BUILD:
Przedstawię kilka fragmentów:
sam początek:

1>------ Build started: Project: VCMI_lib, Configuration: Debug Win32 ------
2>------ Build started: Project: FuzzyLite, Configuration: Debug Win32 ------
2>  FuzzyLite.vcxproj -> C:\VCMI source\trunk\\AI\FuzzyLite.lib
1>  BattleState.cpp
1>  CFileUtility.cpp
1>  CGameState.cpp
1>  CLodHandler.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'CFileUtility.cpp': No such file or directory
1>  CObjectHandler.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'CLodHandler.cpp': No such file or directory
1>  Connection.cpp

pełno błędów tego typu:

1>c:\vcmi source\trunk\lib\herobonus.h(286): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\vcmi source\trunk\lib\resourceset.h(55): warning C4018: '<' : signed/unsigned mismatch
1>c:\vcmi source\trunk\lib\filesystem\cinputstream.h(18): warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class 'CInputStream'
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(592) : see reference to function template instantiation 'void std::_Cons_val<std::allocator<_Ty>,_Ty,const double&>(_Alloc &,_Ty1 *,_Ty2)' being compiled
1>          with
1>          
1>              _Ty=int,
1>              _Alloc=std::allocator<int>,
1>              _Ty1=int,
1>              _Ty2=const double &
1>          ]
6>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory(212): fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit

TO GDY WLACZE DEBUG:

1>------ Build started: Project: VCMI_lib, Configuration: Debug Win32 ------
1>  CFileUtility.cpp
1>  CLodHandler.cpp
1>  CLodStream.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'CFileUtility.cpp': No such file or directory
1>  ISimpleResourceLoader.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'CLodHandler.cpp': No such file or directory
1>c1xx : fatal error C1083: Cannot open source file: 'Filesystem\ISimpleResourceLoader.cpp': No such file or directory
1>c1xx : fatal error C1083: Cannot open source file: 'Filesystem\CLodStream.cpp': No such file or directory
2>------ Build started: Project: VCMI_client, Configuration: Debug Win32 ------
2>LINK : fatal error LNK1181: cannot open input file 'VCMI_lib.lib'
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

msdn.microsoft.com/en-us/library … 1c(v=vs.71.aspx

Dobra jednej linijki się pozbyłem, bo akurat ten błąd był tylko w ostatniej linijce. A co zresztą gdy jest ich z 500 ?

Nie był też to fatal error. Najgorszy jest brak plików, to głównie przez to się crashuje.

Teraz dostaje taki error:

1>------ Build started: Project: VCMI_lib, Configuration: Debug Win32 ------
1>  CFileUtility.cpp
1>  CLodHandler.cpp
1>  CLodStream.cpp
1>  ISimpleResourceLoader.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'CFileUtility.cpp': No such file or directory
1>c1xx : fatal error C1083: Cannot open source file: 'Filesystem\CLodStream.cpp': No such file or directory
1>c1xx : fatal error C1083: Cannot open source file: 'CLodHandler.cpp': No such file or directory
1>c1xx : fatal error C1083: Cannot open source file: 'Filesystem\ISimpleResourceLoader.cpp': No such file or directory
2>------ Build started: Project: VCMI_client, Configuration: Debug Win32 ------
2>LINK : fatal error LNK1181: cannot open input file 'SDL.lib'
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Różnica jest taka, że teraz wywala SDL, a nie VCMI_lib.lib

Aj, tak. Pliki projektu trochę… skrzepły.

Wywal z solucji te pliki, o których brak się pluje. Dodaj do projektu liba plik lib/Filesystem/CCompressedStream.cpp/.h.

Albo zaczekaj, aż wgram poprawione pliki projektu. Trochę się z tym zapóźniłem, bo robię większy rewrite i od kilku dni moja kopia robocza w ogóle się nie kompiluje. :stuck_out_tongue: Ale większość już chyba za mną.

Nie chciało mi się czekać, więc postanowiłem się nie poddawać i zrobiłem, tak jak mówiłeś i o to efekt:

1>------ Build started: Project: VCMI_lib, Configuration: Debug Win32 ------
1>     Creating library C:\VCMI source\trunk\VCMI_lib.lib and object C:\VCMI source\trunk\VCMI_lib.exp
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CCompressedStream::~CCompressedStream(void)" ([email protected]@[email protected]) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CCompressedStream::getNextBlock(void)" ([email protected]@@QAE_NXZ) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: virtual __int64 __thiscall CCompressedStream::read(unsigned char *,__int64)" ([email protected]@@[email protected]) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: virtual __int64 __thiscall CCompressedStream::getSize(void)" ([email protected]@@UAE_JXZ) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected]) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CLodArchiveLoader.obj : error LNK2001: unresolved external symbol "public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
1>map.obj : error LNK2001: unresolved external symbol "public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
1>C:\VCMI source\trunk\VCMI_lib.dll : fatal error LNK1120: 5 unresolved externals
2>------ Build started: Project: VCMI_client, Configuration: Debug Win32 ------
2>     Creating library C:\VCMI source\trunk\VCMI_client.lib and object C:\VCMI source\trunk\VCMI_client.exp
2>CPreGame.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CCompressedStream::~CCompressedStream(void)" ([email protected]@[email protected]) referenced in function "private: void __thiscall SelectionTab::parseMaps(class std::vector<class ResourceID,class std::allocator<class ResourceID> > const &,int,int)" ([email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
2>CPreGame.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __int64 __thiscall CCompressedStream::read(unsigned char *,__int64)" ([email protected]@@[email protected]) referenced in function "private: void __thiscall SelectionTab::parseMaps(class std::vector<class ResourceID,class std::allocator<class ResourceID> > const &,int,int)" ([email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
2>CPreGame.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected]) referenced in function "private: void __thiscall SelectionTab::parseMaps(class std::vector<class ResourceID,class std::allocator<class ResourceID> > const &,int,int)" ([email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
2>C:\VCMI source\trunk\VCMI_client.exe : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Ma ktoś jakiś pomysł ?

Niestety wygląda na to, że pliki CCompressedStream (dwa!) nie zostały dodane poprawnie do projektu. Proponuję również zbuduować całą solucję od nowa.

Rozwiązaniem siłowym, ale najpewniej skutecznym będzie usunięcie wszystkich plików z liba, a następnie dodanie wszystkich plików kodu z folderu lib iraz podfoldery Filesystem. To powinno zapewnić zgodność z aktualną wersją.

Po aktualizacji do 1216, skończyły się problemy z brakiem plików, ale zaczęły się problemy z składnią. Wywala błędy:

c:\vcmi source\trunk\lib\herobonus.h(286): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\vcmi source\trunk\lib\resourceset.h(55): warning C4018: '<' : signed/unsigned mismatch

ale też bardziej poważne:

c:\vcmi source\trunk\lib\filesystem\cinputstream.h(18): warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class 'CInputStream'
1>          c:\c++\boost_1_47_0\boost\noncopyable.hpp(22) : see declaration of 'boost::noncopyable_::noncopyable'
1>          c:\vcmi source\trunk\lib\filesystem\cinputstream.h(17) : see declaration of 'CInputStream'
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(210): error C2039: 'unordered_map' : is not a member of 'boost'
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(210): error C2143: syntax error : missing ';' before '<'
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(210): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(210): error C2238: unexpected token(s) preceding ';'
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(309): error C2653: 'ResourcesMap' : is not a class or namespace name
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(309): error C2065: 'const_iterator' : undeclared identifier
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(350): error C2146: syntax error : missing ';' before identifier 'resources'
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(350): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\vcmi source\trunk\lib\filesystem\cresourceloader.h(350): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Widzę, że jest to spowodowane boostem, jakiej powinienem używać ? Jak widać, używam 1.47. Czy wie ktoś jak to naprawić ? Wydaję mi się, że problem tkwi po mojej stronie.

To nie są błędy, tylko ostrzeżenia. Zwłaszcza z pierwszym nic się nie da zrobić.

Kompilacja unordered_map powinna działać po rewizji 1817.

po zaaktualizowaniu się poprawiło i ta ogromna lista, skróciła się w to:

1>------ Build started: Project: VCMI_lib, Configuration: Debug Win32 ------
1>  ISimpleResourceLoader.cpp
1>c:\vcmi source\trunk\lib\filesystem\cinputstream.h(18): warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class 'CInputStream'
1>          c:\c++\boost_1_47_0\boost\noncopyable.hpp(22) : see declaration of 'boost::noncopyable_::noncopyable'
1>          c:\vcmi source\trunk\lib\filesystem\cinputstream.h(17) : see declaration of 'CInputStream'
1>c:\vcmi source\trunk\lib\filesystem\isimpleresourceloader.cpp(7): error C2039: 'decompress' : is not a member of 'ISimpleResourceLoader'
1>          c:\vcmi source\trunk\lib\filesystem\isimpleresourceloader.h(21) : see declaration of 'ISimpleResourceLoader'
1>c:\vcmi source\trunk\lib\filesystem\isimpleresourceloader.cpp(37): warning C4018: '<' : signed/unsigned mismatch
2>------ Build started: Project: VCMI_client, Configuration: Debug Win32 ------
2>LINK : fatal error LNK1181: cannot open input file 'VCMI_lib.lib'
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Plik ISimpleResourceLoader.cpp został usunięty z projektu. Też powinieneś go usunąć.

Zapomniałem o tym wspomnieć, ale gdy załaduje VCMI w VC++2010, to dostaje takie coś:

C:\VCMI source\trunk\client\VCMI_client.vcxproj : warning  : Platform 'x64' referenced in the project file 'VCMI_client' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\VCMI source\trunk\lib\VCMI_lib.vcxproj : warning  : Platform 'x64' referenced in the project file 'VCMI_lib' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\VCMI source\trunk\server\VCMI_server.vcxproj : warning  : Platform 'x64' referenced in the project file 'VCMI_server' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\VCMI source\trunk\AI\StupidAI\StupidAI.vcxproj : warning  : Platform 'x64' referenced in the project file 'StupidAI' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\VCMI source\trunk\Scripting\ERM\ERM.vcxproj : warning  : Platform 'x64' referenced in the project file 'ERM' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\VCMI source\trunk\AI\VCAI\VCAI.vcxproj : warning  : Platform 'x64' referenced in the project file 'VCAI' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\VCMI source\trunk\AI\FuzzyLite\FuzzyLite.vcxproj : warning  : Platform 'x64' referenced in the project file 'FuzzyLite' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

i dostaje teraz tego typu błędy:

2>CPreGame.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CCompressedStream::~CCompressedStream(void)" ([email protected]@[email protected]) referenced in function "private: void __thiscall SelectionTab::parseMaps(class std::vector<class ResourceID,class std::allocator<class ResourceID> > const &,int,int)" ([email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
2>CPreGame.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __int64 __thiscall CCompressedStream::read(unsigned char *,__int64)" ([email protected]@@[email protected]) referenced in function "private: void __thiscall SelectionTab::parseMaps(class std::vector<class ResourceID,class std::allocator<class ResourceID> > const &,int,int)" ([email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
2>CPreGame.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected]) referenced in function "private: void __thiscall SelectionTab::parseMaps(class std::vector<class ResourceID,class std::allocator<class ResourceID> > const &,int,int)" ([email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])

dostaje 7 błędów tego typu

Pomimo kolejnych aktualizacji, wciąż dostaje błędy:

1>------ Build started: Project: VCMI_lib, Configuration: Debug Win32 ------
1>     Creating library C:\VCMI source\trunk\VCMI_lib.lib and object C:\VCMI source\trunk\VCMI_lib.exp
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CCompressedStream::~CCompressedStream(void)" ([email protected]@[email protected]) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CCompressedStream::getNextBlock(void)" ([email protected]@@QAE_NXZ) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: virtual __int64 __thiscall CCompressedStream::read(unsigned char *,__int64)" ([email protected]@@[email protected]) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: virtual __int64 __thiscall CCompressedStream::getSize(void)" ([email protected]@@UAE_JXZ) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CCampaignHandler.obj : error LNK2019: unresolved external symbol "public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected]) referenced in function "private: static class std::vector<class std::vector<unsigned char,class std::allocator<unsigned char> >,class std::allocator<class std::vector<unsigned char,class std::allocator<unsigned char> > > > __cdecl CCampaignHandler::getFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected])
1>CLodArchiveLoader.obj : error LNK2001: unresolved external symbol "public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
1>map.obj : error LNK2001: unresolved external symbol "public: __thiscall CCompressedStream::CCompressedStream(class std::unique_ptr<class CInputStream,struct std::default_delete<class CInputStream> >,bool,unsigned int)" ([email protected]@[email protected][email protected]@@[email protected]@@@[email protected]@@[email protected]@[email protected])
1>VCMI_Lib.obj : error LNK2019: unresolved external symbol "public: __thiscall CModHandler::CModHandler(void)" ([email protected]@[email protected]) referenced in function "public: void __thiscall LibClasses::init(void)" ([email protected]@@QAEXXZ)
1>VCMI_Lib.obj : error LNK2019: unresolved external symbol "public: __thiscall CModHandler::~CModHandler(void)" ([email protected]@[email protected]) referenced in function "public: void * __thiscall CModHandler::`scalar deleting destructor'(unsigned int)" ([email protected]@[email protected])
1>VCMI_Lib.obj : error LNK2019: unresolved external symbol "public: void __thiscall CModHandler::loadConfigFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function "public: void __thiscall LibClasses::callWhenDeserializing(void)" ([email protected]@@QAEXXZ)
1>C:\VCMI source\trunk\VCMI_lib.dll : fatal error LNK1120: 8 unresolved externals
2>------ Build started: Project: VCMI_client, Configuration: Debug Win32 ------
2>  CSndHandler.cpp
2>  CSndHandler.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'CSndHandler.cpp': No such file or directory
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Czy ktoś wie jak to naprawić ?

Zgaduję, że nie dodałeś plików Filesystem/Compressed Stream i lib/ModHandler.

Mam je, ale przy nich jest czerwona ikonka. Szczerze nie mam pojęcia co to oznacza, bo plik się ładuje (jak kliknę na niego).

–edit
Udało się debug działa, wystarczyło ponownie dodać te pliki do projektu, a cmodhandler miałem podwójnie, gdzie przy jednym wyskakiwał błąd, że plik został usunięty.

Już jest wręcz elegancko, ale wywala się to:

c:\vcmi source\trunk\global.h(24): fatal error C1083: Cannot open include file: 'cstdio': No such file or directory

przez co jest problem z kompilowaniem, jest to jedyny błąd, więc mam nadzieję, że to już wszystko.
Dlaczego ta biblioteka się nie ładuje ?

----EDIT-----
Interesuje mnie jeszcze jedna rzecz, jak powinny być ustawione include directories i library directories, tylko boost ? czy więcej ścieżek ?

Chyba pozostaje Ci reinstall VC++ , jak kompilator pisze ,że brakuje standardowych biblotek.

Skoro nie ma innych błedów, to wszystko jest dobrze poustawiane.

Niestety nie udało ci się mi pomóc, ale sam sobie pomogłem. Okazało się, że w binaries i includies, trzeba (przynajmniej w moim przypadku) dodać inne ścieżki.

Wszystko się elegancko kompiluje prócz projektu VCAI, który nie może otworzyć VCMI_lib.lib, ktoś może mi w tym pomóc ? Jestem już krok od skompilowania.

Najpierw skompiluj projekt “VCMI_lib” , żeby otrzymać VCMI_lib.dll i VCMI_lib.lib . W Solution Explorer kliknij “VCMI_lib” ppm i wybierz build.

w VCAI Linker->General->Additional Library Directories dodaj folder, w którym znajduje się VCMI_lib.

Z ciekawości sam skompilowałem VCMI . Niestety po włączeniu debugowania wyskoczył mi wyjątek w fukcji

std::unique_ptr<CInputStream> CResourceLoader::load(const ResourceID & resourceIdent) const
{
	auto resource = resources.find(resourceIdent);

	if(resource == resources.end())
	{
		throw std::runtime_error("Resource with name " + resourceIdent.getName() + " and type "
			+ EResTypeHelper::getEResTypeAsString(resourceIdent.getType()) + " wasn't found.");
	}

	// get the last added resource(most overriden)
	const ResourceLocator & locator = resource->second.back();

	// load the resource and return it
	return locator.getLoader()->load(locator.getResourceName());
}

resourceIdent.name = “ALL/CONFIG/FILESYSTEM” , zgaduję więc , że chodzi o plik config/filesystem.json który oczywiście jest w folderze config.Wie ktoś o co chodzi ?