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

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

        <small id='2gpeS'></small><noframes id='2gpeS'>

        • <bdo id='2gpeS'></bdo><ul id='2gpeS'></ul>

        <legend id='2gpeS'><style id='2gpeS'><dir id='2gpeS'><q id='2gpeS'></q></dir></style></legend>
      1. Visual Studio 2010 的奇怪“警告 LNK4042"

        Visual Studio 2010#39;s strange quot;warning LNK4042quot;(Visual Studio 2010 的奇怪“警告 LNK4042)

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

          <tfoot id='eyGwk'></tfoot>

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

                  <bdo id='eyGwk'></bdo><ul id='eyGwk'></ul>

                  本文介紹了Visual Studio 2010 的奇怪“警告 LNK4042"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我剛剛被來自 Visual Studio 2010 (C++) 的一些重要警告擊中了(相當嚴重).

                  I've just been beaten (rather hardly) on the head by some non-trivial warning from Visual Studio 2010 (C++).

                  編譯給出了以下輸出:

                  1 Debugis.obj : 警告 LNK4042: 對象指定不止一次;額外被忽略
                  1 Debugmake.obj : 警告 LNK4042: 對象指定不止一次;額外被忽略
                  1 Debugview.obj : 警告 LNK4042: 多次指定對象;額外被忽略
                  1 identity.obj : error LNK2019: 未解析的外部符號 void __cdecltest::identity::view(void) (?viewtest@@YAXXZ) 引用在函數(shù) void __cdecl test::identity::identity(void) (?identity@YAXXZ)
                  1 identity.obj : error LNK2019: unresolved external symbol void __cdecl test::identity::make(void) (?maketest@@YAXXZ) 在函數(shù) void __cdecl test 中引用::identity::identity(void) (?identity@YAXXZ)
                  1 range.obj : error LNK2019: unresolved external symbol void __cdecl test::range::is(void) (?istest@@YAXXZ) 在函數(shù) void __cdecl test 中引用::range::range(void) (?range@YAXXZ)

                  1 Debugis.obj : warning LNK4042: object specified more than once; extras ignored
                  1 Debugmake.obj : warning LNK4042: object specified more than once; extras ignored
                  1 Debugview.obj : warning LNK4042: object specified more than once; extras ignored
                  1 identity.obj : error LNK2019: unresolved external symbol void __cdecl test::identity::view(void) (?viewtest@@YAXXZ) referenced in function void __cdecl test::identity::identity(void) (?identity@YAXXZ)
                  1 identity.obj : error LNK2019: unresolved external symbol void __cdecl test::identity::make(void) (?maketest@@YAXXZ) referenced in function void __cdecl test::identity::identity(void) (?identity@YAXXZ)
                  1 range.obj : error LNK2019: unresolved external symbol void __cdecl test::range::is(void) (?istest@@YAXXZ) referenced in function void __cdecl test::range::range(void) (?range@YAXXZ)

                  鏈接器錯誤總是很難調試......但是有未解析的引用,所以我檢查了......但源格式正確......最后它擊中了我:

                  Linker errors are always a pain to debug... but there were unresolved references, and so I checked... but the source is well-formed... and finally it hit me:

                  我的文件夾層次結構如下:

                  My folder hierarchy looks like so:

                  src/
                    identity/
                      is.cpp
                      make.cpp
                      view.cpp
                    range/
                      is.cpp
                      make.cpp
                      view.cpp
                  

                  解決方案中的層次結構也是如此(我總是對其進行設置,使其模仿真實"的文件夾結構).

                  and so does the hierarchy in the Solution (I always set it up so that it mimicks the "real" folder structure).

                  和診斷輸出:

                  Debugis.obj
                  Debugmake.obj
                  Debugview.obj
                  

                  伴隨著一個警告,指出 .obj 已被傳遞給鏈接器兩次,而那個將被忽略.

                  Along with a warning which says that the .obj has been passed twice to the linker and that one will be ignored.

                  不再搜索:Visual 已經整齊地扁平化我的文件夾層次結構,因此無法整齊地編譯源代碼.

                  Search no more: Visual has neatly flatten my folder hierarchy, and therefore is unable to neatly compile the source.

                  目前,我只是想重命名文件,這應該可以解決問題......

                  At the moment, I am simply thinking of renaming the files, that should cover the issue...

                  ...但是有沒有辦法讓 Visual Studio 不扁平化文件層次結構?

                  ... but is there a way to have Visual Studio NOT flatten the file hierarchy ?

                  推薦答案

                  只是想交叉發(fā)布我認為是答案的內容,如果您打開整個項目的屬性,并更改 C 下的值/C++ ->輸出文件 ->目標文件名"如下:

                  Just wanted to cross post what I believe to be the answer, if you open the properties for the entire project, and the change the value under C/C++ -> Output Files -> "Object File Name" to be the following:

                  $(IntDir)/%(RelativeDir)/

                  $(IntDir)/%(RelativeDir)/

                  在 VS 2010 下,我相信這將消除所有目標文件的歧義(因為我相信 Windows 不會讓您在任何瘋狂的情況下在同一目錄中有兩個同名的文件).另請查看詳細信息 這里.

                  Under VS 2010, I believe this will disambiguate all of the object files (as I believe windows won't let you under any crazy circumstances have two files with the same names in the same directory). Please also check out the details here.

                  這篇關于Visual Studio 2010 的奇怪“警告 LNK4042"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Why do two functions have the same address?(為什么兩個函數(shù)的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復制構造的?)
                  mixing templates with polymorphism(混合模板與多態(tài)性)
                  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 可以編譯可變參數(shù)模板,而 clang 不能)
                    <tbody id='JkIvy'></tbody>

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

                    1. <tfoot id='JkIvy'></tfoot>

                    2. <legend id='JkIvy'><style id='JkIvy'><dir id='JkIvy'><q id='JkIvy'></q></dir></style></legend>
                        <bdo id='JkIvy'></bdo><ul id='JkIvy'></ul>

                      • <i id='JkIvy'><tr id='JkIvy'><dt id='JkIvy'><q id='JkIvy'><span id='JkIvy'><b id='JkIvy'><form id='JkIvy'><ins id='JkIvy'></ins><ul id='JkIvy'></ul><sub id='JkIvy'></sub></form><legend id='JkIvy'></legend><bdo id='JkIvy'><pre id='JkIvy'><center id='JkIvy'></center></pre></bdo></b><th id='JkIvy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JkIvy'><tfoot id='JkIvy'></tfoot><dl id='JkIvy'><fieldset id='JkIvy'></fieldset></dl></div>
                            主站蜘蛛池模板: 国产精品久久国产精品久久 | 999热精品视频 | 青青草视频免费观看 | 亚洲精品视频在线观看免费 | 国产精品成人一区二区三区 | 中文字幕综合在线 | 日韩欧美一级精品久久 | 日日操天天射 | 黄色毛片免费看 | 国偷自产av一区二区三区 | 超碰免费在 | aaaaaa大片免费看最大的 | 亚洲精品一区二三区不卡 | 亚洲手机在线 | 丝袜久久 | 欧美一级欧美三级在线观看 | 欧美日韩一区二区三区四区五区 | 国产精品久久久久久久久久久久午夜片 | 精品久久国产 | 在线一区 | 中文字字幕一区二区三区四区五区 | 久久久久中文字幕 | 久久精品国产一区 | 欧美日韩在线播放 | 日日操夜夜操天天操 | 国产黄色大片在线免费观看 | 精品九九 | 国内自拍偷拍视频 | 欧美激情综合五月色丁香小说 | 日韩精品视频中文字幕 | 国产在线观看一区二区 | 欧美日韩视频一区二区 | 一级黄色播放 | 伊人久久综合影院 | 成人在线观看欧美 | 国产一二三区免费视频 | 国产精品一区二区在线免费观看 | 亚洲一区二区电影在线观看 | 中文字幕一区在线观看视频 | 精品欧美一区二区三区久久久 | 国产精品爱久久久久久久 |