zoukankan      html  css  js  c++  java
  • ifcopenshell在VS2015下的编译

    源起

      今天使用 IfcOpenShell的IfcConvert ,因为是开源的所以就想自己编译下,编译过程中遇到不少问题,因此记录下来

    什么是IfcOpenShell?

    IfcOpenShell是一个开源(LGPL)软件库,可帮助用户和软件开发人员使用IFC文件格式。

    开始前的准备

       visual studio 2015,设置环境变量  参考
       git,设置环境变量 
       cmake,设置环境变量

      源码下载 https://github.com/IfcOpenShell/IfcOpenShell

    1.执行脚本

      运行cmd脚本不是直接打开windows的cmd运行的,而是打开vs的cmd

      打开VS,工具——>外部工具

      命令是机器上的cmd的地址

    C:WindowsSystem32cmd.exe

      参数是vs的VsDevCmd.bat的地址

    /k "C:Program Files (x86)Microsoft Visual Studio 14.0Common7ToolsVsDevCmd.bat"

      初始目录

    D:ifcvsIfcOpenShellwin

      根据实际路径修改

       点确定后,在工具栏就可以看到了

      打开刚才配置的 Command Prompt

      (1)运行脚本 build-deps

    build-deps.cmd "Visual Studio 14 2015 Win64" Debug

      说明:

      可能发生错误,大部分原因是网络情况不好库文件下载中断,多运行几遍,或者翻墙再执行

      (2)运行脚本 run-cmake.bat

    run-cmake.bat "Visual Studio 14 2015 Win64"

      默认为支持IFC2X3版本,如果需要IFC4版本

    run-cmake.bat "Visual Studio 14 2015 Win64" -DUSE_IFC4=1

       说明:

        如果出现Looking for pthread.h - not found

        原因:build-dep命令下载了icu-58.2-vs2015,但未将其解压缩到deps-vs2015-x64-installed/icu。这导致run-cmake退出并出现有关UNICODE的错误

        解决:

          手动提取icu文件

            deps/icu-58.2-vs2015/include/unicode -> deps-vs2015-x64-installed/icu/include/unicode

            deps/icu-58.2-vs2015/lib64 -> deps-vs2015-x64-installed/icu/lib

      构建生成的文件写入了build-vs2015-x64中

    2.编译

      IfcOpenShell.sln在build-vs2015-x64中,用VS2015打开

      编译

      编译后在 build-vs2015-x64/Debug 下

    2.测试

      复制IfcConvert.exe到D:ifc

      运行 IfcConvert cylinders.ifc cylinders.dae

      查看 cylinders.dae

     注:

      上面生成的为Debug的,如果想生成Release的,步骤为

        (1)build-deps.cmd "Visual Studio 14 2015 Win64" Release

        (2)run-cmake.bat "Visual Studio 14 2015 Win64"

        (3)用VS2015打开IfcOpenShell.sln

        (4)生成

        

  • 相关阅读:
    微服务热部署,jrebel激活破解
    微服务改代码热部署
    MYBATIS框架的映射关系
    postgrepsql数据库保留两位有效数字
    It's likely that neither a Result Type nor a Result Map was specified
    idea启动微服务项目报错
    微服务自动加载common包
    No function matches the given name and argument types. You might need to add explicit type casts postgrepsql数据库
    "Connect to localhost:9000 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect",
    链表的排序 (选择和冒泡)
  • 原文地址:https://www.cnblogs.com/baby123/p/11157887.html
Copyright © 2011-2022 走看看