[問題] 沒有.h的dll如何呼叫
開發平台(Platform): (Ex: Win10, Linux, ...)
Windows10
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
Visual Studio 2017
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
N/A
問題(Question):
主管從別的team那邊拿到了一包DLL的source code
說要更改裡面某一個函式的功能
我看了半天改好之後也成功rebuild出 .dll & .lib
想說要自己寫測試exe去呼叫才發現這包dll沒有entry point那支cpp的header
檔案結構大概是
A.cpp (DLLMain在這)
A.def
A.sln (還有其他VS相關檔案略過)
B.cpp
B.h
C.cpp
C.h
A.cpp include B.h & C.h
A.def寫了
LIBRARY A
EXPORTS
Fun_a
Fun_b
Fun_c
餵入的資料(Input):
N/A
預期的正確結果(Expected Output):
能夠讓我呼叫dll裡面的Fun_a、Fun_b、Fun_c
錯誤結果(Wrong Output):
沒有A.h不知道怎麼include dll
可能是我不太能理解def的機制???
程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)
N/A
補充說明(Supplement):
請指教 謝謝QQ
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.136.48.105
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1544410842.A.BA8.html
※ 編輯: nepholi (220.136.48.105), 12/10/2018 11:02:02
→
12/10 11:57,
6年前
, 1F
12/10 11:57, 1F
推
12/10 11:59,
6年前
, 2F
12/10 11:59, 2F
推
12/10 12:15,
6年前
, 3F
12/10 12:15, 3F
→
12/10 12:16,
6年前
, 4F
12/10 12:16, 4F
→
12/10 19:05,
6年前
, 5F
12/10 19:05, 5F
推
12/10 20:04,
6年前
, 6F
12/10 20:04, 6F
→
12/11 01:14,
6年前
, 7F
12/11 01:14, 7F
→
12/11 01:14,
6年前
, 8F
12/11 01:14, 8F
→
12/11 01:15,
6年前
, 9F
12/11 01:15, 9F
→
12/11 02:39,
6年前
, 10F
12/11 02:39, 10F
→
12/11 10:55,
6年前
, 11F
12/11 10:55, 11F