当前位置: 首页>>代码示例>>Python>>正文


Python ccompiler.LinkError方法代码示例

本文整理汇总了Python中distutils.ccompiler.LinkError方法的典型用法代码示例。如果您正苦于以下问题:Python ccompiler.LinkError方法的具体用法?Python ccompiler.LinkError怎么用?Python ccompiler.LinkError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在distutils.ccompiler的用法示例。


在下文中一共展示了ccompiler.LinkError方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: try_link

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import LinkError [as 别名]
def try_link(self, body, headers=None, include_dirs=None, libraries=None,
                 library_dirs=None, lang="c"):
        """Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            self._link(body, headers, include_dirs,
                       libraries, library_dirs, lang)
            ok = 1
        except (CompileError, LinkError):
            ok = 0

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok 
开发者ID:glmcdona,项目名称:meddle,代码行数:20,代码来源:config.py

示例2: try_run

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import LinkError [as 别名]
def try_run(self, body, headers=None, include_dirs=None, libraries=None,
                library_dirs=None, lang="c"):
        """Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            src, obj, exe = self._link(body, headers, include_dirs,
                                       libraries, library_dirs, lang)
            self.spawn([exe])
            ok = 1
        except (CompileError, LinkError, DistutilsExecError):
            ok = 0

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok


    # -- High-level methods --------------------------------------------
    # (these are the ones that are actually likely to be useful
    # when implementing a real-world config command!) 
开发者ID:glmcdona,项目名称:meddle,代码行数:26,代码来源:config.py

示例3: try_link

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import LinkError [as 别名]
def try_link(self, body, headers=None, include_dirs=None, libraries=None,
                 library_dirs=None, lang="c"):
        """Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            self._link(body, headers, include_dirs,
                       libraries, library_dirs, lang)
            ok = True
        except (CompileError, LinkError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:20,代码来源:config.py

示例4: try_run

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import LinkError [as 别名]
def try_run(self, body, headers=None, include_dirs=None, libraries=None,
                library_dirs=None, lang="c"):
        """Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            src, obj, exe = self._link(body, headers, include_dirs,
                                       libraries, library_dirs, lang)
            self.spawn([exe])
            ok = True
        except (CompileError, LinkError, DistutilsExecError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok


    # -- High-level methods --------------------------------------------
    # (these are the ones that are actually likely to be useful
    # when implementing a real-world config command!) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:26,代码来源:config.py

示例5: try_link

# 需要导入模块: from distutils import ccompiler [as 别名]
# 或者: from distutils.ccompiler import LinkError [as 别名]
def try_link (self, body,
                  headers=None, include_dirs=None,
                  libraries=None, library_dirs=None,
                  lang="c"):
        """Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            self._link(body, headers, include_dirs,
                       libraries, library_dirs, lang)
            ok = 1
        except (CompileError, LinkError):
            ok = 0

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok 
开发者ID:ofermend,项目名称:medicare-demo,代码行数:22,代码来源:config.py


注:本文中的distutils.ccompiler.LinkError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。