Page 1 of 1

Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Sat Jun 19, 2010 4:43 pm
by Mets
I saw that schenle had gotten r12763 to work using MS Toolkit 2003. I thought I'd try to replicate his compile under a newer set of tools using MSVC++ Express 2010, the Windows 7 SDK, and DirectX SDK from June 2010. I started with the VC8 project folder, and converted it to VC10.

I removed four files from the new VC10 folder- src\cmd\unit_bsp.cpp, src\gfx\bounding_box.cpp, src\gfx\bsp.cpp, and src\gui\general.cp, as these are all no longer present in trunk. I also edited Resources.rc and changed #include "afxres.h" to #include <WinResrc.h>. I skipped the step he mentioned about NV_CUBE_MAP, as I'm assuming it will compile with cubemap support by default.

I have two culprits right now, src\cmd\units_csv.cpp and src\gfx\sprite.cpp. See the errors below:

Code: Select all

4>..\vegastrike\src\cmd\unit_csv.cpp(638): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(639): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(640): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(649): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1010): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1011): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1012): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1013): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1018): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1019): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1020): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1023): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1024): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1025): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1026): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1027): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1028): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1029): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1030): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1031): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1032): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1033): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1183): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1184): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1188): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1193): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1194): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1196): error C2668: 'stoi' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(197): could be 'int stoi(const std::string &,int)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(537): or       'int std::stoi(const std::string &,size_t *,int)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1203): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1204): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1207): error C2668: 'stoi' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(197): could be 'int stoi(const std::string &,int)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(537): or       'int std::stoi(const std::string &,size_t *,int)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1208): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1209): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1210): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1216): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1217): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1221): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1222): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1226): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1227): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1231): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1232): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1233): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1236): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1236): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1239): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1239): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1240): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1241): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1253): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1264): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1265): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1266): error C2668: 'stoi' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(197): could be 'int stoi(const std::string &,int)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(537): or       'int std::stoi(const std::string &,size_t *,int)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1267): error C2668: 'stoi' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(197): could be 'int stoi(const std::string &,int)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(537): or       'int std::stoi(const std::string &,size_t *,int)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1269): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1275): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1276): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1277): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1278): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1279): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1280): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1281): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1282): error C2668: 'stof' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(190): could be 'double stof(const std::string &,double)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(622): or       'float std::stof(const std::string &,size_t *)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1283): error C2668: 'stoi' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(197): could be 'int stoi(const std::string &,int)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(537): or       'int std::stoi(const std::string &,size_t *,int)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>..\vegastrike\src\cmd\unit_csv.cpp(1284): error C2668: 'stoi' : ambiguous call to overloaded function
4>          ..\vegastrike\src\cmd\unit_csv.cpp(197): could be 'int stoi(const std::string &,int)'
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(537): or       'int std::stoi(const std::string &,size_t *,int)' [found using argument-dependent lookup]
4>          while trying to match the argument list '(const std::string)'
4>  al_init.cpp
4>C:\Cygwin\home\cfw\vegastrike\vega-vc8\include\dsound.h(420): warning C4005: 'INTERFACE' : macro redefinition
4>          C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\commdlg.h(948) : see previous definition of 'INTERFACE'
4>..\vegastrike\src\aldrv\al_init.cpp(158): error C2664: 'alcOpenDevice' : cannot convert parameter 1 from 'const char [14]' to 'ALCubyte *'
4>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
4>  sprite.cpp
4>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2440: 'initializing' : cannot convert from 'int' to 'VSSprite *'
4>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(247) : see reference to function template instantiation 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base<_Ty,int>(_Other1 &&,_Other2 &&)' being compiled
4>          with
4>          [
4>              _Ty1=bool,
4>              _Ty2=VSSprite *,
4>              _Ty=bool,
4>              _Other1=bool,
4>              _Other2=int
4>          ]
4>          ..\vegastrike\src\gfx\sprite.cpp(59) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>::pair<bool,int>(_Other1 &&,_Other2 &&)' being compiled
4>          with
4>          [
4>              _Ty1=bool,
4>              _Ty2=VSSprite *,
4>              _Other1=bool,
4>              _Other2=int
4>          ]
4>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized
4>          with
4>          [
4>              _Ty1=bool,
4>              _Ty2=VSSprite *
4>          ]
4>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(167) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::second'
4>          with
4>          [
4>              _Ty1=bool,
4>              _Ty2=VSSprite *
4>          ]
4>  vsimage.cpp
4>  Generating Code...
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 8 skipped ==========

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Sat Jun 19, 2010 6:29 pm
by klauss
For the first bug, replace the call to stof with ::stof (double colon there).

It will instruct to go looking for stof in the global namespace and not in the std namespace (which is where the other overloads are).

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Sat Jun 19, 2010 7:27 pm
by Mets
klauss wrote:For the first bug, replace the call to stof with ::stof (double colon there).

It will instruct to go looking for stof in the global namespace and not in the std namespace (which is where the other overloads are).
Thanks, Klauss, that did fix the first part. I did a find/replace on all stof and stoi calls in the file, and then left line 190 and 197 unchanged.

The other problem looks to be something related to casting in sprite.cpp

Code: Select all

1>  sprite.cpp
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2440: 'initializing' : cannot convert from 'int' to 'VSSprite *'
1>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(247) : see reference to function template instantiation 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base<_Ty,int>(_Other1 &&,_Other2 &&)' being compiled
1>          with
1>          [
1>              _Ty1=bool,
1>              _Ty2=VSSprite *,
1>              _Ty=bool,
1>              _Other1=bool,
1>              _Other2=int
1>          ]
1>          ..\vegastrike\src\gfx\sprite.cpp(59) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>::pair<bool,int>(_Other1 &&,_Other2 &&)' being compiled
1>          with
1>          [
1>              _Ty1=bool,
1>              _Ty2=VSSprite *,
1>              _Other1=bool,
1>              _Other2=int
1>          ]
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized
1>          with
1>          [
1>              _Ty1=bool,
1>              _Ty2=VSSprite *
1>          ]
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\utility(167) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::second'
1>          with
1>          [
1>              _Ty1=bool,
1>              _Ty2=VSSprite *
1>          ]
1>  vsimage.cpp
1>C:\Cygwin\home\cfw\vegastrike\vegastrike\src\gfx/jpeg_memory.h(2): warning C4005: 'JPEG_SUPPORT' : macro redefinition
1>          command-line arguments :  see previous definition of 'JPEG_SUPPORT'
1>C:\Cygwin\home\cfw\vegastrike\vega-vc8\include\jmorecfg.h(215): warning C4005: 'FAR' : macro redefinition
1>          C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\windef.h(146) : see previous definition of 'FAR'
1>..\vegastrike\src\gfx\vsimage.cpp(325): error C3861: 'png_set_expand_gray_1_2_4_to_8': identifier not found
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Sun Jun 20, 2010 6:00 pm
by klauss
Replace 0 by NULL in line 59 of sprite.cpp

PS: that's noncompliant behavior of the VC compiler. AFAIK, 0 can be casted to any pointer type (not so with 1, a very special case in the C spec). Although that might have changed in C++, i'm not sure.

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Sun Jun 20, 2010 8:36 pm
by Mets
klauss wrote:Replace 0 by NULL in line 59 of sprite.cpp

PS: that's noncompliant behavior of the VC compiler. AFAIK, 0 can be casted to any pointer type (not so with 1, a very special case in the C spec). Although that might have changed in C++, i'm not sure.
Afraid that didn't fix it; it still gives the same error :(

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Tue Jun 22, 2010 3:36 pm
by klauss
then (T*)NULL ?

(replace T* by the right type... VSSprite* perhaps?)

Plain simple NULL should work, however. It's weird that it doesn't.

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Wed Jun 23, 2010 5:54 am
by Mets
klauss wrote:then (T*)NULL ?

(replace T* by the right type... VSSprite* perhaps?)

Plain simple NULL should work, however. It's weird that it doesn't.
Bravo, klauss, that fixed the second error. One to go friend:

Code: Select all

1>  vsimage.cpp
1>C:\Cygwin\home\cfw\vegastrike\vegastrike\src\gfx/jpeg_memory.h(2): warning C4005: 'JPEG_SUPPORT' : macro redefinition
1>          command-line arguments :  see previous definition of 'JPEG_SUPPORT'
1>C:\Cygwin\home\cfw\vegastrike\vega-vc8\include\jmorecfg.h(215): warning C4005: 'FAR' : macro redefinition
1>          C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\windef.h(146) : see previous definition of 'FAR'
1>..\vegastrike\src\gfx\vsimage.cpp(325): error C3861: 'png_set_expand_gray_1_2_4_to_8': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Wed Jun 23, 2010 2:46 pm
by klauss
That one was fixed in a later revision.

12696

and

12697

Re: Compiling Latest Known Working Revision with MSVC++ 2010

Posted: Wed Jun 23, 2010 11:26 pm
by Mets
I'm on head, r12793, still no go, though all else is working.

I can see it was changed to png_set_expand_gray, which is reflected in the code, however, it says it cannot find this identifier. When I open the file in MSVC, it says that this identifier is undefined. I'll keep looking.