This forum has been archived. Please start a new discussion on GitHub.

I could not slice my ice file with slice2cpp.exe if I write include <Glacier2\>

I used -I param in command line but the included file includes other ice files too.
then I specified the include path in ice.msbuilder extenion in vs2017 ,but still not to know how to work.
and I run in Nuget package manage command line with slice2cpp but It still can not open include file.

and my ice file is

pragma once

include <Glacier2/>

module Interface
// 消息反馈类型枚举
enum MsgType
// 机器人报错
MsgError = 1,
// 机器人定位
MsgLocation = 2,
// 机器人急停
MsgEmergency = 3,
// 通用信息
MsgGeneral = 4

interface IMESFunctions

    void RobotStateMsg(MsgType type, int MsgCode);

    void JobFinish(int iTaskID, string strTaskMark);


interface IServerFunctions extnds Glacier2::Session
    bool Login(string strUser,IMESFunctions* pFuncs);

void Logout(string strUser);

    bool CheckRobotState();

    bool SendTask(string taskMark,int ExecCnt);

    void ExitApp();



  • xdm
    xdm La Coruña, Spain

    This seems related to the Chinese characters in your root path, I was able to reproduce the problem trying to build a project in D:\登录至服务器\hello but same project works fine when build in D:\hello\hello I'm still debugging the cause of this meanwhile you can rename the root directory to workaround the issue.


  • I modified the path name,
    but errors come next like:
    1>D:\ice-csharp\slice\Glacier2\ error : : ignoring invalid global metadata cpp:doxygen:include:Glacier2/Glacier2.h' 1>D:\ice-csharp\slice\Glacier2\ error : 1>D:\ice-csharp\slice\Glacier2\ error : : ignoring invalid global metadatacpp:doxygen:include:Glacier2/Glacier2.h'
    1>D:\ice-csharp\slice\Glacier2\ error :
    1>D:\ice-csharp\slice\Ice\ error : : ignoring invalid global metadata cpp:doxygen:include:Ice/Ice.h' 1>D:\ice-csharp\slice\Ice\ error : 1>D:\ice-csharp\slice\Ice\ error : : ignoring invalid global metadatacpp:doxygen:include:Ice/Ice.h'
    1>D:\ice-csharp\slice\Ice\ error :smile:

    I think the file has some character which belongs to doxygen make this.

  • xdm
    xdm La Coruña, Spain

    That seems like a different project, the included path D:\ice-csharp\slice\ doesn't match the NuGet package of the previous project, can you turn on the "Detailed" build output in "Options > Projects and Solutions > Build and Run" and post the complete build log

  • the log file is attached,thank you for your concern

    log.txt 35.8K
  • xdm
    xdm La Coruña, Spain

    Seems your C++ project is using package but that is not correct you should use (for VS 2017) or (for VS 2015)

    The official packages don't include slice2cpp.exe seems you build it your self or copied it from a different distribution, I guess it does not match the 3.7.1 version and that is why you see the errors related to the ignoring invalid global metadata

    You should uninstall package from the C++ projects and then install the

  • The slice passed!!! Thank you!!! Jose