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

有關Delphi8 製作 Dll的問題

尚未結案
S1990xyz
一般會員


發表:6
回覆:13
積分:3
註冊:2003-03-03

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-03-25 13:39:10 IP:210.208.xxx.xxx 未訂閱
請問一下各位先進, 我用Delphi8做了一個Dll 開啟另外一個Project然後add reference 到Project中, 一Compile就出現 [Fatal Error] Could not import assembly 'Library1' because it contains namespace 'Borland.Delphi.System' 不過讓C# builder加入Reference就可以Work..., 我查了一下Help 裡面的意思應該是Borland.Delphi.System這個Namespace只能由 Borland.Delphi.dll呼叫... 不知道怎麼解ㄟ... :(
code6421
版主


發表:43
回覆:223
積分:208
註冊:2002-08-16

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-03-26 00:02:06 IP:61.216.xxx.xxx 未訂閱
引言: 請問一下各位先進, 我用Delphi8做了一個Dll 開啟另外一個Project然後add reference 到Project中, 一Compile就出現 [Fatal Error] Could not import assembly 'Library1' because it contains namespace 'Borland.Delphi.System' 不過讓C# builder加入Reference就可以Work..., 我查了一下Help 裡面的意思應該是Borland.Delphi.System這個Namespace只能由 Borland.Delphi.dll呼叫... 不知道怎麼解ㄟ... :(
use package(not library) to create regular .NET Assemblies. Just coding... Taiwan:http://code6421.ktop.com.tw China:http://home.hoolee.com/~code6421
------
Just codeing...
S1990xyz
一般會員


發表:6
回覆:13
積分:3
註冊:2003-03-03

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-03-26 10:30:13 IP:210.208.xxx.xxx 未訂閱
謝謝Code6421的解答 很欣賞你的風雪之閣 聽說四月份要出書囉 加油加油!!
suckin
一般會員


發表:13
回覆:26
積分:7
註冊:2003-06-16

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-04-07 17:05:54 IP:61.221.xxx.xxx 未訂閱
請問 Code6421, 您的意思是把原來的 .net Web Service 改為 Package, 再在 Asp.net Application 中 reference 它嗎? 請問這該如何使用 package , 可否舉個例子或說明一下. 謝謝.
microbean
初階會員


發表:1
回覆:43
積分:38
註冊:2004-04-09

發送簡訊給我
#5 引用回覆 回覆 發表時間:2004-04-09 18:52:38 IP:210.58.xxx.xxx 未訂閱
可以參考一下下面的文章 有詳細的說明 : http://www.pinnaclepublishing.com/html/main.isx?sub=52&story=2679 The reason is simple, but surprising. The fact that the Library project contained no external references resulted in the fact that the Borland.Delphi.System unit was linked into it. And adding this Library Assembly to another Delphi for .NET project, which also contains the Borland.Delphi.System unit, leads to a Fatal Error message that says that it couldn't import assembly Library1 because it contains namespace Borland.Delphi.System (which is also included in the new project itself). In order to solve this problem, you need to reload the Library Assembly project in the IDE, and right-click on the Library1 project node to add a reference to the Borland.System.dll. This way, the Library Assembly will still use the Borland.Delphi.System unit, but from an external assembly reference. Like a runtime package. And this time, the Library1.dll will even be 6,656 bytes! Now when you add the Library1.dll Assembly to a Delphi for .NET project, it will compile just fine, since both the Library1.dll assembly and the Delphi for .NET project will refer to the same external Borland.System.dll. 補充一下 : 我實際測過 文中應該是要 add "Borland.Delphi.dll" 而不是 "Borland.System.dll" (下載 sample source 就可以看到) 此法於 Win Form 中適用 , 於 Vcl Form 中 有問題. 發表人 - microbean 於 2004/04/09 19:38:20
suckin
一般會員


發表:13
回覆:26
積分:7
註冊:2003-06-16

發送簡訊給我
#6 引用回覆 回覆 發表時間:2004-04-12 11:33:04 IP:61.221.xxx.xxx 未訂閱
Thank's for microbean
系統時間:2024-05-21 12:04:16
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!