全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:806
推到 Plurk!
推到 Facebook!

舊版元件無法compile問題

答題得分者是:P.D.
linwinshin
一般會員


發表:8
回覆:13
積分:4
註冊:2015-03-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2016-03-30 16:12:38 IP:58.99.xxx.xxx 訂閱
各位前輩好好久沒用delphi了.最近想到用以前delphi的元件監視目錄及檔案變化.可是用xe6無法編譯.元件如付.errormessgae:[dcc32Error]SHChangeNotify.pas(121):E1025Unsupportedlanguagefeature:'importofDLLsymbolbyordinal'想請教前輩協助謝謝
------
林文信
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#2 引用回覆 回覆 發表時間:2016-03-30 23:09:27 IP:118.169.xxx.xxx 未訂閱
請你到
project->option->output --c/c
最後一項
c/c output file generation 原本是 " Generate all C Builder files (including package libs) "
改為 " Generate DCUs only "
收工!!

我實際搞了一個 dpk, 確認通過

原因這是谷哥哥告訴我的!
出處 http://bcbjournal.org/forums/viewtopic.php?f=10&t=1809

For example, if you attempt to import a DLL by ordinal value, the compiler reports "E1025 Language feature not supported" because .hpp generation is not compatible with importing a DLL by ordinal value. However, you can import a DLL by ordinal value if you turn off .hpp generation. Go to the Project > Options > Output - C/C page, and for the option C/C Output file generation, select a value that does not include headers, such as "Generate DCUs only."
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2016-03-30 23:11:40 IP:118.169.xxx.xxx 未訂閱
但建議你把舊的uses 改為這樣
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
{$IFNDEF Delphi3orHigher}
Winapi.OLE2,
{$ELSE}
Winapi.ActiveX, System.Win.ComObj,
{$ENDIF}
Winapi.ShlObj;


ps. xe6 與 xe10 可能有存放位置不同, 如果有錯的, 建議你找找看正確的加載
linwinshin
一般會員


發表:8
回覆:13
積分:4
註冊:2015-03-05

發送簡訊給我
#4 引用回覆 回覆 發表時間:2016-03-31 14:55:28 IP:220.132.xxx.xxx 訂閱
依版主所提示的終於可以了.謝謝版主. 

(希望DELPHI再續往日雄風)
------
林文信
系統時間:2024-04-24 1:41:12
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!