久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <small id='nTf81'></small><noframes id='nTf81'>

      <i id='nTf81'><tr id='nTf81'><dt id='nTf81'><q id='nTf81'><span id='nTf81'><b id='nTf81'><form id='nTf81'><ins id='nTf81'></ins><ul id='nTf81'></ul><sub id='nTf81'></sub></form><legend id='nTf81'></legend><bdo id='nTf81'><pre id='nTf81'><center id='nTf81'></center></pre></bdo></b><th id='nTf81'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nTf81'><tfoot id='nTf81'></tfoot><dl id='nTf81'><fieldset id='nTf81'></fieldset></dl></div>
      <tfoot id='nTf81'></tfoot><legend id='nTf81'><style id='nTf81'><dir id='nTf81'><q id='nTf81'></q></dir></style></legend>
        <bdo id='nTf81'></bdo><ul id='nTf81'></ul>

        調試和發布庫鏈接與 CMAKE (VISUAL STUDIO)

        Debug and Release Library Linking with CMAKE (VISUAL STUDIO)(調試和發布庫鏈接與 CMAKE (VISUAL STUDIO))
      1. <small id='Iw53Y'></small><noframes id='Iw53Y'>

        <legend id='Iw53Y'><style id='Iw53Y'><dir id='Iw53Y'><q id='Iw53Y'></q></dir></style></legend>
          <bdo id='Iw53Y'></bdo><ul id='Iw53Y'></ul>
                <tbody id='Iw53Y'></tbody>

                <tfoot id='Iw53Y'></tfoot>

                1. <i id='Iw53Y'><tr id='Iw53Y'><dt id='Iw53Y'><q id='Iw53Y'><span id='Iw53Y'><b id='Iw53Y'><form id='Iw53Y'><ins id='Iw53Y'></ins><ul id='Iw53Y'></ul><sub id='Iw53Y'></sub></form><legend id='Iw53Y'></legend><bdo id='Iw53Y'><pre id='Iw53Y'><center id='Iw53Y'></center></pre></bdo></b><th id='Iw53Y'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Iw53Y'><tfoot id='Iw53Y'></tfoot><dl id='Iw53Y'><fieldset id='Iw53Y'></fieldset></dl></div>
                2. 本文介紹了調試和發布庫鏈接與 CMAKE (VISUAL STUDIO)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  已經有一個線程,但實際上并沒有幫助.我希望能夠鏈接例如 Foo.lib 用于 Release 配置和 Foo_d.lib 用于 Debug 配置,我怎樣才能做到這一點?如果我這樣做:

                  There was already a Thread which did not help really. I want to be able to link for example Foo.lib for Release Config and Foo_d.lib for Debug Config , how can I achieve this? If I do this:

                  target_link_libraries(MyEXE debug Foo_d)
                  target_link_libraries(MyEXE optimized Foo)
                  

                  那么我的項目中有兩個庫用于調試配置?為什么沒有發布選項?

                  then I have both libraries in my project for the debug config? Why is there no Release option?

                  非常感謝!

                  推薦答案

                  當你的庫是項目的一部分或者你是使用 find_package 命令的配置模式導入它(參見 文檔 和 example).如果你不能修改 3rd 方,它會產生 Config.cmake(它可能不使用 cmake 工具或者您不想這樣做)答案是模擬這樣的過程:

                  There is no problems when your library is a part of the project or you're importing it using config mode of find_package command (see documentation and example). In case you can't modify 3rd party so it will produce <package>Config.cmake (it may not use cmake tool or you don't want to do it) the answer is to emulate such process:

                  add_library(foo STATIC IMPORTED)
                  set_target_properties(foo PROPERTIES IMPORTED_LOCATION_DEBUG "/path/to/foo-d.lib")
                  set_target_properties(foo PROPERTIES IMPORTED_LOCATION_RELEASE "/path/to/foo.lib")
                  
                  target_link_libraries(MyEXE foo)
                  

                  請注意,與調試"/優化"功能不同,這種方法不僅限于調試/發布配置:

                  note that unlike "debug"/"optimized" feature such approach is not limited to Debug/Release configs:

                  set_target_properties(foo PROPERTIES IMPORTED_LOCATION_MINSIZEREL "/path/to/foo-small.lib")
                  

                  你還有一些好東西,比如INTERFACE_INCLUDE_DIRECTORIES:

                  also you've got some goodies like INTERFACE_INCLUDE_DIRECTORIES:

                  set_target_properties(foo PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "/path/to/foo/includes")
                  
                  include_directories("/path/to/foo/includes") # this line not needed
                  target_link_libraries(MyEXE foo) # this command will add "/path/to/foo/includes" for you
                  

                  和傳遞鏈接:

                  add_library(boo STATIC IMPORTED)
                  set_target_properties(boo PROPERTIES IMPORTED_LOCATION_DEBUG "/path/to/boo-d.lib")
                  set_target_properties(boo PROPERTIES IMPORTED_LOCATION_RELEASE "/path/to/boo.lib")
                  
                  add_library(foo STATIC IMPORTED)
                  set_target_properties(foo PROPERTIES IMPORTED_LOCATION_DEBUG "/path/to/foo-d.lib")
                  set_target_properties(foo PROPERTIES IMPORTED_LOCATION_RELEASE "/path/to/foo.lib")
                  
                  set_target_properties(foo PROPERTIES INTERFACE_LINK_LIBRARIES boo) # foo depends on boo
                  
                  target_link_libraries(MyEXE foo) # boo will be linked automatically
                  

                  當然,您可以使用常規的 cmake 命令,例如 find_libraryfind_package(... MODULE) 來估計位置,而不是對其進行硬編碼.

                  Of course you can use regular cmake commands like find_library and find_package(... MODULE) to estimate locations instead of hardcoding them.

                  這篇關于調試和發布庫鏈接與 CMAKE (VISUAL STUDIO)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Why do two functions have the same address?(為什么兩個函數的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復制構造的?)
                  mixing templates with polymorphism(混合模板與多態性)
                  When should I use the keyword quot;typenamequot; when using templates(我什么時候應該使用關鍵字“typename?使用模板時)
                  Dependent name resolution amp; namespace std / Standard Library(依賴名稱解析命名空間 std/標準庫)
                  gcc can compile a variadic template while clang cannot(gcc 可以編譯可變參數模板,而 clang 不能)

                  <small id='bbOR7'></small><noframes id='bbOR7'>

                    <tbody id='bbOR7'></tbody>
                    <tfoot id='bbOR7'></tfoot>
                  1. <i id='bbOR7'><tr id='bbOR7'><dt id='bbOR7'><q id='bbOR7'><span id='bbOR7'><b id='bbOR7'><form id='bbOR7'><ins id='bbOR7'></ins><ul id='bbOR7'></ul><sub id='bbOR7'></sub></form><legend id='bbOR7'></legend><bdo id='bbOR7'><pre id='bbOR7'><center id='bbOR7'></center></pre></bdo></b><th id='bbOR7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='bbOR7'><tfoot id='bbOR7'></tfoot><dl id='bbOR7'><fieldset id='bbOR7'></fieldset></dl></div>

                    <legend id='bbOR7'><style id='bbOR7'><dir id='bbOR7'><q id='bbOR7'></q></dir></style></legend>
                            <bdo id='bbOR7'></bdo><ul id='bbOR7'></ul>

                            主站蜘蛛池模板: 久久精品视频一区二区三区 | 免费看黄色小视频 | 91一区二区三区在线观看 | 中文字幕在线一区 | 一区二区三区精品视频 | 成人av电影在线 | 日本一级淫片免费啪啪3 | 亚洲午夜三级 | 久久久久久91香蕉国产 | 国产精品爱久久久久久久 | 亚洲国产欧美91 | 一区二区日韩精品 | 日本天天操 | 久久久久久国产精品 | 另类在线 | 精品久久久久久亚洲精品 | 欧美日韩精品免费 | 91最新在线视频 | 久久av.com| 国产精品亚洲二区 | 91九色在线观看 | 91国在线视频 | 红桃视频一区二区三区免费 | 丁香久久 | 午夜欧美一区二区三区在线播放 | 日本午夜视频 | 国产午夜精品久久久 | 国产午夜精品一区二区三区在线观看 | 黄色a级一级片 | 精品国产乱码久久久久久中文 | 精品欧美视频 | 91久久久久久久久久久久久 | 国产羞羞视频在线观看 | 国产精品一区二区免费看 | 国产你懂的在线观看 | 色吊丝2288sds中文字幕 | 亚洲精久久久 | 国产精品99久久久久久动医院 | 精品av | 中文字幕免费在线观看 | 男女啪啪网址 |