aliyun / aliyun-oss-cpp-sdk

Aliyun OSS SDK for C++
Other
184 stars 88 forks source link

mingw64-gcc编译失败 #60

Open sspring opened 4 years ago

sspring commented 4 years ago

项目组统一开发环境在msys2(https://www.msys2.org )下面,尝试使用mingw64-gcc编译时出错。

  1. gcc版本(9.2.0) gcc -v结果如下: Using built-in specs. COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-9.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++ --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --enable-plugin --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld Thread model: posix gcc version 9.2.0 (Rev2, Built by MSYS2 project)

  2. Windows版本

    
    C:\Users\Spring>systeminfo

Host Name: DESKTOP-NDNVDO9 OS Name: Microsoft Windows 10 Pro OS Version: 10.0.18363 N/A Build 18363 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Registered Owner: Spring Registered Organization: N/A Product ID: 00330-80000-00000-AA870 Original Install Date: 12/19/2019, 9:43:32 AM System Boot Time: 2/3/2020, 9:43:58 AM System Manufacturer: ASUS System Model: All Series System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 60 Stepping 3 GenuineIntel ~3401 Mhz BIOS Version: American Megatrends Inc. 1802, 1/28/2014 Windows Directory: C:\Windows System Directory: C:\Windows\system32 Boot Device: \Device\HarddiskVolume3 System Locale: zh-cn;Chinese (China) Input Locale: en-us;English (United States) Time Zone: (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi Total Physical Memory: 16,255 MB Available Physical Memory: 7,219 MB Virtual Memory: Max Size: 22,872 MB Virtual Memory: Available: 10,486 MB Virtual Memory: In Use: 12,386 MB Page File Location(s): C:\pagefile.sys Domain: WORKGROUP Logon Server: \DESKTOP-NDNVDO9

3. 编译过程

mkdir build && cd build cmake ../aliyun-oss-cpp-sdk-1.7.0 -G "Unix Makefiles" make



4. 出错日志截图
![image](https://user-images.githubusercontent.com/7046668/74702434-faf78280-5244-11ea-84a8-0fe33313995b.png)

5. 特殊说明  
测试过vs2017编译和linux下的gcc7.4编译均正常。
lindaqqiu commented 4 years ago

遇到了同样的问题,不知道怎么解决

surecn commented 3 years ago

include 《locale》 引入这个头文件就OK