Author Topic: [cannot fix] r3961: Windows 7 / VC 2010.NET: FTBFS in platform_common.cpp  (Read 2130 times)

james876

  • Guest
Today, I compiled the latest the code svn-3961, some mistakes, my operating system is win7 32bit, I used to compile tool is a free version of vc2010.net

Code: [Select]
..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1833): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1834): error C2146: syntax error : missing ')' before identifier 'replaceAll'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1834): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1835): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1836): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1837): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1838): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1839): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1840): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1841): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1842): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1843): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1844): error C2001: newline in constant
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1846): error C2143: syntax error : missing ')' before ';'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1849): error C2143: syntax error : missing ')' before '{'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1849): error C2059: syntax error : ')'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1849): error C2143: syntax error : missing ')' before '{'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1849): error C2143: syntax error : missing ';' before ')'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1849): error C2143: syntax error : missing ';' before '{'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1852): error C2065: 'from' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1855): error C2065: 'from' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1855): fatal error C1903: unable to recover from previous error(s); stopping compilation
4>  socket.cpp
4>  thread.cpp
4>  window.cpp
4>  window_gl.cpp
4>..\..\source\shared_lib\sources\platform\posix\socket.cpp(2482): error C2660: 'miniwget_getaddr' : function does not take 5 arguments
4>..\..\source\shared_lib\sources\platform\posix\socket.cpp(2493): error C2660: 'GetUPNPUrls' : function does not take 4 arguments
« Last Edit: 4 January 2013, 06:23:23 by softcoder »

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Error message!
« Reply #1 on: 27 December 2012, 12:50:57 »
When did you last download the Windows build dependencies? Please make sure you have the latest (2012-11-06).
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

james876

  • Guest
Re: Error message!
« Reply #2 on: 27 December 2012, 12:54:48 »
Yes, I downloaded it, thank you.
However, this error how to fix it?

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3961: Windows 7 / VC 2010.NET: FTBFS in platform_common.cpp
« Reply #3 on: 27 December 2012, 19:29:28 »
Try the latest svn and post any errors you get. This problem is likely specific to your language and how it handles special characters in the code

james876

  • Guest
Re: r3961: Windows 7 / VC 2010.NET: FTBFS in platform_common.cpp
« Reply #4 on: 28 December 2012, 11:13:34 »

Today, I compiled the latest the code svn-3967 error persists, thank you!

Code: [Select]
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1818): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1819): error C2146: syntax error: missing ')' before identifier 'replaceAll'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1819): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1820): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1821): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1822): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1823): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1824): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1825): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1826): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1827): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1828): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1829): error C2001: newline in constant
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1831): error C2143: syntax error: missing ')' before ';'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1834): error C2143: syntax error: missing ')' before '{'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1834): error C2059: syntax error: ')'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1834): error C2143: syntax error: missing ')' before '{'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1834): error C2143: syntax error: missing ';' before ')'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1834): error C2143: syntax error: missing ';' before '{'
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1837): error C2065: 'from': undeclared identifier
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1840): error C2065: 'from': undeclared identifier
4> .. \ .. \ source \ shared_lib \ sources \ platform \ common \ platform_common.cpp (1840): fatal error C1903: unable to recover from previous error (s); stopping compilation



Edit (tomreyn): Wrapped error message in code tags. Please use the code tag when pasting source code or application output in the future, James!
« Last Edit: 28 December 2012, 12:40:50 by tomreyn »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3961: Windows 7 / VC 2010.NET: FTBFS in platform_common.cpp
« Reply #5 on: 28 December 2012, 14:56:46 »
Try rev #: 3968

james876

  • Guest
Re: r3961: Windows 7 / VC 2010.NET: FTBFS in platform_common.cpp
« Reply #6 on: 29 December 2012, 03:59:43 »

Today, I have compiled the latest code: svn-3970, the error occurs again, :scared: perhaps a new error, this error message, thank you!

Code: [Select]
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1495): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1851): error C2601: 'replaceAll' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1869): error C2601: 'replaceAllBetweenTokens' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1877): error C2601: 'replaceAllBetweenTokens' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1909): error C2601: 'getFullFileArchiveExtractCommand' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1930): error C2601: 'executeShellCommand' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1970): error C2601: 'removeFile' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1980): error C2601: 'renameFile' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1985): error C2601: 'getFileSize' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2002): error C2601: 'executable_path' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2089): error C2601: 'searchAndReplaceTextInFile' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2149): error C2601: 'saveDataToFile' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2175): error C2601: 'copyFileTo' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2213): error C2601: 'valid_utf8_file' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2240): error C2601: 'getFileTextContents' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2271): error C2144: syntax error : 'int' should be preceded by ')'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2271): error C2512: 'Shared::PlatformCommon::ModeInfo::ModeInfo' : no appropriate default constructor available
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2271): error C2059: syntax error : ')'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2271): error C2143: syntax error : missing ';' before '{'
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2272): error C2065: 'width' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2272): error C2065: 'w' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2273): error C2065: 'height' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2273): error C2065: 'h' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2274): error C2065: 'depth' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2274): error C2065: 'd' : undeclared identifier
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2277): error C2601: 'Shared::PlatformCommon::ModeInfo::getString' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2281): error C2601: 'Shared::PlatformCommon::ValueCheckerVault::addItemToVault' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2292): error C2601: 'Shared::PlatformCommon::ValueCheckerVault::checkItemInVault' : local function definitions are illegal
4>          ..\..\source\shared_lib\sources\platform\common\platform_common.cpp(1801): this line contains a '{' which has not yet been matched
4>..\..\source\shared_lib\sources\platform\common\platform_common.cpp(2325): fatal error C1075: end of file found before the left brace '{' at '..\..\source\shared_lib\sources\platform\common\platform_common.cpp(80)' was matched

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3961: Windows 7 / VC 2010.NET: FTBFS in platform_common.cpp
« Reply #7 on: 29 December 2012, 06:54:05 »
This seems to be a VC++ problem with how files are saved that have special characters. Since your codepage affects the behavior (it works for most people compiling with vc++) I suggest you saveas each file giving these errors as UTF8 WITH BOM (you could use notepad++ to do it using the encoding type menu option and saving the file).

I will not change the encoding to UTF8 with BOM in svn as this causes problems with older gcc compilers.

see: http://stackoverflow.com/questions/331690/c-source-in-unicode

Thanks

 

anything