Photon-Windows-Sdk_v4-1-9-0 Demos use vs2017 15.7.4 build release faild.

1>------ 已启动全部重新生成: 项目: demo_windows_basics_vc15, 配置: release_windows_mt Win32 ------
1>BasicsApplication.cpp
1>Photon_lib.cpp
1>StdIO_main.cpp
1>StdIO_UIListener.cpp
1>LINK : fatal error C1047: 对象或库文件“..\..\..\Common-cpp\lib\Common-cpp_vc15_release_windows_mt_Win32.lib”是使用比创建其他对象所用编译器旧的编译器创建的;请重新生成旧的对象和库
1>LINK : fatal error LNK1257: 代码生成失败
1>已完成生成项目“demo_windows_basics_vc15.vcxproj”的操作 - 失败。
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========

Comments

  • 1>------ Rebuild All started: Project: demo_windows_basics_vc15, Configuration: release_windows_mt Win32 ------
    1>BasicsApplication.cpp
    1>Photon_lib.cpp
    1>StdIO_main.cpp
    1>StdIO_UIListener.cpp
    1>LINK : fatal error C1047: The object or library file '..\..\..\Common-cpp\lib\Common-cpp_vc15_release_windows_mt_Win32.lib' was created with an older compiler than other objects; rebuild old objects and libraries
    1>LINK : fatal error LNK1257: code generation failed
    1>Done building project "demo_windows_basics_vc15.vcxproj" -- FAILED.
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


  • screenshop
  • vadimvadim ✭✭✭
    What Photon SDK version do you use?
    What are compiler and linker versions? You can check versions by running cl.exe and link.exe from vs command prompt.
  • Photon-Windows-Sdk_v4-1-10-0

    C:\Program Files\Microsoft Visual Studio\2017\Enterprise>cl
    Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26431 for x86
    Copyright (C) Microsoft Corporation. All rights reserved.

    C:\Program Files\Microsoft Visual Studio\2017\Enterprise>link
    Microsoft (R) Incremental Linker Version 14.14.26431.0
    Copyright (C) Microsoft Corporation. All rights reserved.
  • vadimvadim ✭✭✭
    Just noticed that Photon SDK version was specified in the topic title :)
    So you upgraded to the latest and have the same error.

    Photon libs are built with version 19.00 compiler.
    Microsoft states that libraries code should be compatible with obj files built with the compiler of the same major version except the case when static libraries or object files are compiled with the /GL (whole program optimization) compiler switch: https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017

    Photon release libraries are built with /GL option. Demo code is also optimized in release configuration. Switching to debug disables both optimizations and fixes the issue.
    Release configuration with /GL disabled (for demo code only) works for me also.

    We will look how it's possible to have optimized libraries and user code simultaneously when using 19.14 compiler next week when my colleague Stefan is back from vacation.
  • Hi @lpp168.

    Thank you for reporting this.

    The next release (which will likely be released next week already) will contain libs that are built with that VS2017 version.

    For the time being please follow the advice that @vadim gave you and build with "whole program optimization" turned off.
  • Hi @lpp168.

    4.1.10.2 is available in our download section now.
Sign In or Register to comment.