Configuring Ice Builder in VS2017 after update to 3.7

MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

Hi ZeroC team,

I tried to update Ice Builder and the SDK to version 3.7.1 but when trying to set the new Ice home directory the property page tells me that only Ice version 3.6 is accepted.

I tried to find the missing information to fix it my own, but unfortunately I was not successful.

What am I missing here?

Thanks for your support
Markus!

Answers

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Markus,
    With Ice 3.7 you don't need to set Ice Home, you should use the C++ NuGet packages see https://doc.zeroc.com/ice/3.7/release-notes/using-the-windows-binary-distributions

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    Thank you for the hint Jose!

    I think installed the NuGet packages I need. I installed the UWP packeges as well because I'm developing a Windows Store App.

    When Bulding my project though, I now get the following error:
    1>LINK : fatal error LNK1104: Datei "Ice37uwp.lib" kann nicht geöffnet werden.

    Any idea why this happens?

    Regards
    Markus

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Markus,

    What UWP packages did you install, zeroc.ice.uwp.v141? Installing it should pull the dependencies zeroc.ice.uwp.v141.x64 (= 3.7.1) and zeroc.ice.uwp.v141.x86 (= 3.7.1) which contains the libraries for each arch

    What arch are you building form?

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    Hi Jose,

    here are the packages I have installed:

    When I look at directory 'zeroc.ice.uwp.v141.x64.3.7.1\build\native\lib\x64\Release' it looks like this:

    I'm trying to build both x64 and x86. Error message is the one I send before in both cases.

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Try removing zeroc.ice.v141 you don't need that package for UWP builds

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    Same result

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    The fact that your project wants to use ice37uwp.lib instead of ice37uwp++11.lib indicates that it is picking the C++98 mapping , the default for Visual Studio 2017 is to pick the C++11 mapping and is the only C++ mapping supported for UWP projects.

    You can change that in the "Ice Builder" page

    do you see the C++11 mapping selected in your project?

    If that doesn't help can you post the build log, specially you should check if the code is compiled with /D ICE_CPP11_MAPPING and if the linker is adding the correct library path /LIBPATH:"D:\3.7\ice-demos\cpp11\packages\zeroc.ice.uwp.v141.x64.3.7.1\build\native\lib\x64\Debug"

    For example build with MSBuild <solution-file> /fileLogger /v:d from command line and upload msbuild.log so we can check the build errors.

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    After switching to C++11 I have to fix a ton of compiler errors now.
    If I have any problems after that I will send you the log file.

    Thank you very much so far for your quick support!

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    Good Morning!

    I adapted my code ater switching to C++ 11 mapping, but still I get some errors I've never seen before:

    Visual Studio build error:
    ...
    1>D:\Dev_x64\artho\modules\remotesdk\trunk\project_win10\packages\zeroc.ice.uwp.v141.3.7.1\build\native\include\Ice/Comparable.h(200): fatal error C1001: Interner Compilerfehler.
    1>(Compilerdatei "f:\dd\vctools\compiler\cxxfe\sl\p1\c\gramut.c", Zeile 6017)
    ...

    I also attached the msbuild.log which failes with a different error.

    Sorry it is all in German!

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    That internal compiler error seems a bug we saw with earlier versions of VS 2017, are you using the last update?

    I build our demos with Visual Studio 2017 Version: 15.8.4 and haven't found any issues.

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Markus,

    Seems this is actually a different bug in Visual Studio 2017, can you try to replace Comparable.h in zeroc.ice.uwp.v141.3.7.1\build\native\include\Ice by https://github.com/pepone/ice/blob/3.7/cpp/include/Ice/Comparable.h and let us know if that solves the issue.

    The new headers includes a workaround for this Visual Studio 2017 bug

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    Hi Jose,

    after updating Visual Studio to 15.8.5 and replacing Comparable.h my error list looks like this:

    (When compiling for Platform 10.0.10240.0)


    (When compiling for Platform 10.0.16299.0 and newer)

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Regarding the first error it is likely caused because we build Ice with target platform "10.0.14393.0" we will check if it is possible to build with "10.0.10240.0"

    Regarding the second error is not clear to me what is this about, seems like a problem creating the package, I don't think this is related to using Ice in your project, but if you can provide a sample project to reproduce the issue I will be happy to look at it.

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development
    edited September 2018

    Ok, after reinstalling the Windows Platform SDK I succeeded compiling without error. Unfortunately when running my app I'm back where I initially started:

    This access exception was the reason for me to Update Windows 10, Update Ice SDK, update Visual Studio and all the plugins needed...

    Any idea?

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi,

    We believe this could be a problem with the build configuration but is hard to say without being able to reproduce it, the best way to figure this out is to provide a minimal sample that help us reproduce the problem, you can try modifying the UWP hello demo

    The error is happening during static initialization and you will just need the Slice definitions required to reproduce the issue and a minimal main to start the application to be able to reproduce it.

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    Your stack trace shows an error during value factory registration ... which is obvious for us but possibly less for you.

    For each Slice class, slice2cpp generates a C++ class and registers a factory for this class during static initialization. And it's the registration of the factory for your CsTransferObject class that is failing here, because it's attempting to lock a mutex that is not initialized yet.

    As Jose suggested, the best would be to provide a small example that reproduces the problem. I suggest you start with your own application, then remove all your C++ code and keep just a few Slice classes in your Slice definitions. Then create a trivial main function and see if your program still crashes at startup during the registration of the class/value factories.

    Best regards,
    Bernard

  • MarkusMarkus Member Markus OrschulkoOrganization: High Speed Vision GmbHProject: Windows Store App Development

    Hi,

    I had to switch the project for the last couple of weeks.

    Now, with a fresh mind set I finally made my app run again.

    My code started crashing after I extended a class in my App.xml.h to implement an interface which had dependancies to some Ice includes.

    So as soon as I removed '#include <Ice/FactoryTableInit.h>' from my App.xml.h, put the include together with my class definition into my App.xml.cpp I got it to work again.

    Thank you both Jose and Bernard for your help during the process!

Sign In or Register to comment.