1. 程式人生 > >DLL檔案編譯出錯[email protected] already defined

DLL檔案編譯出錯[email protected] already defined

編譯MFC DLL程式時出現

Error2error LNK1169: one or more multiply defined symbols foundE:\C++\HookTest\CopyFileDetour\CFDetour\Debug\1t.dll11t 1
Error1 error LNK2005: [email protected] already defined in 1t.objE:\C++\HookTest\CopyFileDetour\CFDetour\1t\mfcs100ud.lib(dllmodul.obj)1t

1t為測試的dll工程名稱

錯誤解決方法:

位置:Project->Propertie->C/C++->Preprocessor->Preprocessor Definitions

原句”WIN32;_DEBUG;_WINDOWS;_USRDLL;DATALOG_EXPORTS;%(PreprocessorDefinitions)“把裡面_USRDLL刪除掉就可以解決此問題。極有可能是加了#include <afx.h>引起這個問題的。

之後可能會出現如下錯誤雖然不影響程式的編譯執行

3IntelliSense: #error directive: Please use the /MD switch for _AFXDLL buildsd:\vs2010c++\vc\atlmfc\include\afxver_.h 813

可以通過以下設定更改

  Project ->Property->Configuration Properties->C/C++->Code Generation->Runtime Library,在Runtime Library下選中Multithreaded    DLL或Debug Multithreaded DLL。


相關推薦

DLL檔案編譯出錯<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c49b80a8a889a5adaa84f5f6">[email&#160;protected]a> already defined

編譯MFC DLL程式時出現 Error2error LNK1169: one or more multiply defined symbols foundE:\C++\HookTest\CopyFi

SQL Server資料庫mdf檔案中了勒索病毒<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fc9f8e858c889998a39d8f9d9293bc9f939f97">[email&#160;p

SQL,資料庫,勒索病毒,mdf檔案中毒,[email protected]_email *SQL Server資料庫mdf檔案中了勒索病毒[email protected]_email。副檔名變為[email protected]_email SQL Serv

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cabaa2ba8abfa4a6a3a4a1">[email&#160;protected]a>刪除檔案失敗原因

最近做我網站的更換頭像功能時,涉及到了PHP的檔案上傳。 我採用的方案是使用者先上傳到伺服器,伺服器再上傳到阿里雲的OSS,中間會有一個把圖片臨時儲存到伺服器的過程。於是在使用php的@unlink(刪除指定檔案)方法時發現了刪除失敗的問題。 開始以為是我的路徑名寫錯了,後來確認這個引數

github解決hexo d命令出錯error: 推送一些引用到 '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d7b0bea397b0bea3bfa2b5f9b4b8ba">[email&

error: 推送一些引用到 '[email protected]:xxxx.github.io.git' 失敗 FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/tro

在Spring Boot YML配置檔案中使用MAVEN變數@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0472657644">[email&#160;protected]a>

在application.properties字尾的配置檔案中我們如下使用MAVEN變數: [email protected]@ @執行時符號會自替換成MAVEN變數配置好的值,但是換成YML配置檔案不行了,會報錯,如下配置即可解決: eureka:   cl

mac/linux/centos通過 ssh <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="21534e4e5561">[email&#160;protected]a>方式連線如何上傳檔案都阿里雲

目錄1、mac上傳檔案到Linux伺服器scp 檔名 使用者名稱@伺服器ip:目標路徑如:scp /Users/test/testFile [email protected]:/test/2、mac上傳資料夾到Linux伺服器,與上傳檔案相比多加了-rscp -r

windows RabbitMQ搭建出錯 *Could not contact node <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e5978487878c91a5">[email&#160;pr

\rabbit\rabbitmq_server-3.6.6\sbin> rabbitmq-plugins.bat  enable  rabbitmq_management Plugin configuration unchanged. Applying plugin

MyEclipse破解中遇到的問題Ⅱ(run.bat檔案一閃而過,或者報錯)<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fbdbcbacfbcb9ba">[email&#160;protected

MyEclipse破解中遇到的問題Ⅱ(run.bat檔案一閃而過,或者報錯) 系統: 破解檔案出現問題(這個沒有提示錯誤,而在10.0裡面那個破解檔案,出現的提示是: .Exception in thread “main” java.lang.ClassNo

shell腳本中的$# $0 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f8dcb8">[email&#160;protected]a> $* $$ $! $?的意義

腳本 $* width 上一個 pre shell int .cn height 轉載自:http://www.cnblogs.com/davygeek/p/5670212.html 今天學寫腳本遇到一些變量不認識,在此做下記錄。 變量 含義 $0 當前腳本的文件

shell中$*與<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b296f2">[email&#160;protected]a>的區別

劃分 位置 一個 這也 差異 獨立 [email protected] 情況 雙引號 $*所有的位置參數,被作為一個單詞 註意:"$*"必須被""引用 [email protected] 與$*同義,但是每個參數都是一個獨立的""引用字串,這就意味著參數

Spring4.0系列<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aa9f87eae9c5c4cec3dec3c5c4cbc6">[email&#160;protected]a>

one window 標識 cto ace ted ada bsp 布爾 這篇文章介紹Spring 4的@Conditional註解。在Spring的早期版本你可以通過以下方法來處理條件問題: 3.1之前的版本,使用Spring Expression Langua

Spring高級話題<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b29ff2f7dcd3d0ded7">[email&#160;protected]a>***註解的工作原理

sso metadata bool logs tcl task ota -c ann 出自:http://blog.csdn.net/qq_26525215 @EnableAspectJAutoProxy @EnableAspectJAutoProxy註解 激活Aspe

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="297a595b40474e69685c5d465e405b4c4d">[email&#160;protected]a>註解與自動裝配(轉發)

配置 調用方法 support autowired 信息 ann over 反射機制 test 1 配置文件的方法我們編寫spring 框架的代碼時候。一直遵循是這樣一個規則:所有在spring中註入的bean 都建議定義成私有的域變量。並且要配套寫上 get 和 se

linux bash Shell特殊變數:Shell $0, $#, $*, <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8aaeca">[email&#160;protected]a>, $?

在linux下配置shell引數說明 前面已經講到,變數名只能包含數字、字母和下劃線,因為某些包含其他字元的變數有特殊含義,這樣的變數被稱為特殊變數。  例如,$ 表示當前Shell程序的ID,即pid,看下面的程式碼: [[email protected] /]$ ec

spring <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="62000d0d16222103010a0703000e07">[email&#160;protected]a>中value的理解

先看原始碼 /** * Names of the caches in which method invocation results are stored. * <p>Names may be used to determine the target cache (or cac

{<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="733e3c3f3f2a342136363d203323213c273c3d3e323a3f5d303c3e">[email&#160;protecte

近日,復旦解密安全團隊發現GandCrab4.0活躍度提升,跟蹤到多起GandCrab4.0變種勒索事件,現釋出安全預警,提醒廣大使用者預防GandCrab4.0勒索。 目前復旦解密已經可以成功解密GandCrab4.0變種採用RSA+AES加密演算法 mg中毒檔案可以在一個小時解決.電話151691214

Springboot註解<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="260b0b666549485254494a4a4354">[email&#160;protected]a>和@RestCon

1.使用@Controller 註解,在對應的方法上,檢視解析器可以解析return 的jsp,html頁面,並且跳轉到相應頁面;若返回json等內容到頁面,則需要加@ResponseBody註解 [email protected]註解,相當於@[email protected

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5b2c3e391b33">[email&#160;protected]a>,c小總結

問題0:元素內聯元素,行內元素,行內塊元素.         內聯: 寬高M,P都有效         行內元素:無寬高,內容撐開,M,P左右有效  

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5400313a273b2632383b2379142032">[email&#160;protected]a>_export詳解

Tensorflow經常看到定義的函式前面加了“@tf_export”。例如,tensorflow/python/platform/app.py中有: @tf_export('app.run') def run(main=None, argv=None): """Runs the progr