Logo
1.12
  • Introduction
  • Install
  • Getting Started
  • Using packages
  • Creating Packages
  • Uploading Packages
  • Developing packages
  • Package apps and devtools
  • Mastering Conan
  • Systems and cross building
  • Extending Conan
  • Integrations
  • Howtos
  • Reference
    • Commands
      • Consumer commands
      • Creator commands
      • Package development commands
        • conan source
        • conan build
        • conan package
        • conan link
      • Misc commands
      • Output
      • Return codes
    • conanfile.txt
    • conanfile.py
    • Generators
    • Profiles
    • Build helpers
    • Tools
    • Configuration files
    • Environment variables
    • Hooks [EXPERIMENTAL]
  • Videos and links
  • FAQ
  • Changelog
conan

This document is for a "1.X" legacy Conan version, which is no longer recommended. Please update to Conan 2, click here to read the Conan 2 documentation

šŸ” Scan for vulnerabilities in your packages with the new conan audit command. Register now.

  • Reference
  • Commands
  • conan link
  • Edit on GitHub

conan link

$ usage: conan link [-h] [--remove] [-l LAYOUT] [target] reference

Links a conan reference (e.g lib/1.0@conan/stable) with a local folder path.

positional arguments:
target                Path to the package folder in the user workspace
reference             Reference to link. e.g.: mylib/1.X@user/channel

optional arguments:
-h, --help            show this help message and exit
--remove              Remove linked reference (target not required)
-l LAYOUT, --layout LAYOUT
                        Relative or absolute path to a file containing the
                        layout. Relative paths will be resolved first relative
                        to current dir, then to local cache "layouts" folder

This command puts a package in ā€œEditable modeā€, and consumers of this package will use it from the given user folder instead of using it from the cache. The path pointed by target should exist and contain a conanfile.py.

Examples:

  • Put the package cool/version@user/dev in editable mode, using the layout specified by the file win_layout.

$ conan link . cool/version@user/dev --layout=win_layout
  • Remove the ā€œEditable modeā€, use again package from the cache:

$ conan link --remove cool/version@user/dev
Previous Next

© Copyright 2016-2018, JFrog.

Built with Sphinx using a theme provided by Read the Docs.
Version: 1.12
Versions
2.16
2.15
2.14
2.13
2.12
2.11
2.10
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
2

1
1.66
1.65
1.64
1.63
1.62
1.61
1.60
1.59
1.58
1.57
1.56
1.55
1.54
1.53
1.52
1.51
1.50
1.49
1.48
1.47
1.46
1.45
1.44
1.43
1.42
1.41
1.40
1.39
1.38
1.37
1.36
1.35
1.34
1.33
1.32
1.31
1.30
1.29
1.28
1.27
1.26
1.25
1.24
1.23
1.22
1.21
1.20
1.19
1.18
1.17
1.16
1.15
1.14
1.13
1.12
1.11
1.10
1.9
1.8
1.7
1.6
1.5
1.4
1.3
Downloads
PDF