久久久久久久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) 引用在函數 void __cdecl test::identity::identity(void) (?identity@YAXXZ)
                  1 identity.obj : error LNK2019: unresolved external symbol void __cdecl test::identity::make(void) (?maketest@@YAXXZ) 在函數 void __cdecl test 中引用::identity::identity(void) (?identity@YAXXZ)
                  1 range.obj : error LNK2019: unresolved external symbol void __cdecl test::range::is(void) (?istest@@YAXXZ) 在函數 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 ?

                  推薦答案

                  只是想交叉發布我認為是答案的內容,如果您打開整個項目的屬性,并更改 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模板網!

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

                  相關文檔推薦

                  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 不能)
                    <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>
                            主站蜘蛛池模板: 日韩精品一区二区视频 | 亚洲二三区| 久久成人毛片 | 国产一级自拍 | 欧美大片18 | 精品日韩一区二区三区 | 日韩午夜在线观看 | 亚洲精品91天天久久人人 | 久久99精品久久久久久琪琪 | 三级av网站| 日韩在线不卡视频 | 99国产精品99久久久久久粉嫩 | 国产成人av网站 | 色婷婷成人 | 国产精品99久久久久久久久久久久 | av综合网站| av片在线观看 | 国产精品天堂 | 国产成人精品一区二区三区四区 | 欧美伊人久久 | 一区在线视频 | 成人黄色录像 | 97免费在线 | 青青在线 | 欧美一区二区三区视频 | 黄色三级视频网站 | 国产精品一区一区三区 | 国产无限资源 | 亚洲激情五月 | 一级片免费视频 | 国产成人小视频 | 色婷婷av一区二区三区之e本道 | av免费观看在线 | 超碰在线小说 | 热久久中文字幕 | 中文字幕在线不卡 | 一区二区福利 | 国产强伦人妻毛片 | 欧美成人精品一区二区三区在线看 | 欧美日韩国产一区二区 | 精品欧美黑人一区二区三区 |