The International Simutrans Forum

 

Author Topic: r9872 SDL2 not compile  (Read 271 times)

0 Members and 1 Guest are viewing this topic.

Offline Andarix

  • *
  • Posts: 295
  • Languages: de
r9872 SDL2 not compile
« on: June 11, 2021, 10:18:16 PM »
Linux

Quote
...
2021-06-11T22:04:01.3196030Z ===> HOSTCXX sys/simsys_s2.cc
2021-06-11T22:04:01.8263483Z sys/simsys_s2.cc: In function ‘const char* dr_get_locale()’:
2021-06-11T22:04:01.8266428Z sys/simsys_s2.cc:795:2: error: ‘SDL_Locale’ was not declared in this scope
2021-06-11T22:04:01.8268303Z   SDL_Locale *loc = SDL_GetPreferredLocales();
2021-06-11T22:04:01.8269686Z   ^~~~~~~~~~
2021-06-11T22:04:01.8296433Z sys/simsys_s2.cc:795:2: note: suggested alternative: ‘SDL_LogWarn’
2021-06-11T22:04:01.8298690Z   SDL_Locale *loc = SDL_GetPreferredLocales();
2021-06-11T22:04:01.8300087Z   ^~~~~~~~~~
2021-06-11T22:04:01.8302318Z   SDL_LogWarn
2021-06-11T22:04:01.8304237Z sys/simsys_s2.cc:795:14: error: ‘loc’ was not declared in this scope
2021-06-11T22:04:01.8305877Z   SDL_Locale *loc = SDL_GetPreferredLocales();
2021-06-11T22:04:01.8307066Z               ^~~
2021-06-11T22:04:01.8308714Z sys/simsys_s2.cc:795:14: note: suggested alternative: ‘log’
2021-06-11T22:04:01.8310306Z   SDL_Locale *loc = SDL_GetPreferredLocales();
2021-06-11T22:04:01.8311780Z               ^~~
2021-06-11T22:04:01.8312617Z               log
2021-06-11T22:04:01.8314532Z sys/simsys_s2.cc:795:20: error: ‘SDL_GetPreferredLocales’ was not declared in this scope
2021-06-11T22:04:01.8316399Z   SDL_Locale *loc = SDL_GetPreferredLocales();
2021-06-11T22:04:01.8317632Z                     ^~~~~~~~~~~~~~~~~~~~~~~
2021-06-11T22:04:01.8462195Z sys/simsys_s2.cc:795:20: note: suggested alternative: ‘SDL_RenderGetScale’
2021-06-11T22:04:01.8463642Z   SDL_Locale *loc = SDL_GetPreferredLocales();
2021-06-11T22:04:01.8464343Z                     ^~~~~~~~~~~~~~~~~~~~~~~
2021-06-11T22:04:01.8464925Z                     SDL_RenderGetScale
2021-06-11T22:04:01.8939419Z make: *** [build/default/sys/simsys_s2.o] Error 1
2021-06-11T22:04:01.8947884Z common.mk:50: recipe for target 'build/default/sys/simsys_s2.o' failed
2021-06-11T22:04:01.8957055Z ##[error]Process completed with exit code 2.

Windows

Quote
,,,
2021-06-11T22:00:42.1572343Z "D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj" (default target) (1) ->
2021-06-11T22:00:42.1573131Z (ClCompile target) ->
2021-06-11T22:00:42.1574137Z   sys\simsys_s2.cc(795): error C2065: 'SDL_Locale': undeclared identifier [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1575471Z   sys\simsys_s2.cc(795): error C2065: 'loc': undeclared identifier [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1576882Z   sys\simsys_s2.cc(795): error C3861: 'SDL_GetPreferredLocales': identifier not found [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1578258Z   sys\simsys_s2.cc(796): error C2065: 'loc': undeclared identifier [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1579578Z   sys\simsys_s2.cc(797): error C2065: 'loc': undeclared identifier [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1580781Z   sys\simsys_s2.cc(797): error C2227: left of '->language' must point to class/struct/union/generic type [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1581983Z   sys\simsys_s2.cc(797): error C2660: 'strncpy': function does not take 2 arguments [D:\a\simutrans\simutrans\Simutrans-SDL2.vcxproj]
2021-06-11T22:00:42.1582650Z
2021-06-11T22:00:42.1583027Z     10 Warning(s)
2021-06-11T22:00:42.1583408Z     7 Error(s)
2021-06-11T22:00:42.1583959Z
2021-06-11T22:00:42.1584407Z Time Elapsed 00:01:23.45
2021-06-11T22:00:43.3812604Z Copy-Item: D:\a\_temp\9f84c621-8159-4231-b97b-5822d5b84fc9.ps1:3
2021-06-11T22:00:43.3820876Z Line |
2021-06-11T22:00:43.3823471Z    3 |  copy Simutrans_SDL2.exe simutrans\Simutrans.exe
2021-06-11T22:00:43.3824602Z      |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-06-11T22:00:43.3825618Z      | Cannot find path 'D:\a\simutrans\simutrans\Simutrans_SDL2.exe' because it does not exist.
2021-06-11T22:00:43.3826568Z 
2021-06-11T22:00:43.4059572Z ##[error]Process completed with exit code 1.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1440
Re: r9872 SDL2 not compile
« Reply #1 on: June 11, 2021, 10:40:24 PM »
SDL2-2.0.14 is minimum required for SDL_Locale.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10818
  • Languages: De,EN,JP
Re: r9872 SDL2 not compile
« Reply #2 on: June 12, 2021, 01:05:37 PM »
Ok, r9873 adds define to check for that.

Offline Andarix

  • *
  • Posts: 295
  • Languages: de
Re: r9872 SDL2 not compile
« Reply #3 on: June 13, 2021, 12:50:55 PM »
work

thanks