BCB 如何使用 VC 的 Obj 檔案 |
尚未結案
|
dan59314
中階會員 發表:121 回覆:107 積分:86 註冊:2002-08-16 發送簡訊給我 |
請問各位先進, 我在 BCB 內import VC 產生的 OBJ 檔案,Compile 後出現以下訊息 [Linker Error] 'F:\SOURCECODE\BCB\CONSOLE\FOS2DONGLE200310\ENCODE\ENCODE.OBJ' contains invalid OMF record, type 0x4c (possibly COFF) 請問要如何能正確使用 VC 的 obj 檔呢? 軟還要更軟,我的Artwork
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=27674 Chinese Girl in Rhino3D
http://rhino3d.com/gallery/figure/girl.htm 發表人 - taishyang 於 2004/02/16 14:51:22
|
RaynorPao
版主 發表:139 回覆:3622 積分:7025 註冊:2002-08-12 發送簡訊給我 |
引言: 請問各位先進, 我在 BCB 內import VC 產生的 OBJ 檔案,Compile 後出現以下訊息 [Linker Error] 'F:\SOURCECODE\BCB\CONSOLE\FOS2DONGLE200310\ENCODE\ENCODE.OBJ' contains invalid OMF record, type 0x4c (possibly COFF) 請問要如何能正確使用 VC 的 obj 檔呢? 軟還要更軟,我的Artwork http://delphi.ktop.com.tw/topic.php?TOPIC_ID=27674 Chinese Girl in Rhino3D http://rhino3d.com/gallery/figure/girl.htmfy 你好: 據小弟我所知是不行的,比較可行的方式,是將自己拿到的 *.obj 或 *.lib, 先利用 VC 包裝成 DLL 再給 BCB 使用,與這篇文章中的做法類似,先參考看看 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=33420 -- Enjoy Researching & Developing --
------
-- 若您已經得到滿意的答覆,請適時結案!! -- -- 欲知前世因,今生受者是;欲知來世果,今生做者是 -- -- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 -- |
dan59314
中階會員 發表:121 回覆:107 積分:86 註冊:2002-08-16 發送簡訊給我 |
引言: fy 你好: 據小弟我所知是不行的,比較可行的方式,是將自己拿到的 *.obj 或 *.lib, 先利用 VC 包裝成 DLL 再給 BCB 使用,與這篇文章中的做法類似,先參考看看 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=33420謝謝 RaynorPao 兄,再請問 obj 檔要怎麼包裝成 DLL 呢?我看了連結的文章,好像沒有提到呢。 軟還要更軟,我的Artwork http://delphi.ktop.com.tw/topic.php?TOPIC_ID=27674 Chinese Girl in Rhino3D http://rhino3d.com/gallery/figure/girl.htm |
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
引言:Hi fy: C++Builder uses different format (OMF) of object files (OBJ) and libraries (LIB) than MS Visual C++ (COFF). As I can guess DirectX SDK is compiled with VC++. C++Builder includes utility called COFF2OMF to convert COFF files to OMF ones. You can found this COFF2OMF.EXE in CBUILDER\BIN directory where CBUILDER means dir you've installed C++Builder. Good Luck!!!引言: fy 你好: 據小弟我所知是不行的,比較可行的方式,是將自己拿到的 *.obj 或 *.lib, 先利用 VC 包裝成 DLL 再給 BCB 使用,與這篇文章中的做法類似,先參考看看 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=33420謝謝 RaynorPao 兄,再請問 obj 檔要怎麼包裝成 DLL 呢?我看了連結的文章,好像沒有提到呢。 軟還要更軟,我的Artwork http://delphi.ktop.com.tw/topic.php?TOPIC_ID=27674 Chinese Girl in Rhino3D http://rhino3d.com/gallery/figure/girl.htm /*生活是一種藝術,用心生活才能享受生活*/ |
dan59314
中階會員 發表:121 回覆:107 積分:86 註冊:2002-08-16 發送簡訊給我 |
引言: C Builder uses different format (OMF) of object files (OBJ) and libraries (LIB) than MS Visual C (COFF). As I can guess DirectX SDK is compiled with VC . C Builder includes utility called COFF2OMF to convert COFF files to OMF ones. You can found this COFF2OMF.EXE in CBUILDER\BIN directory where CBUILDER means dir you've installed C Builder.AxSoft 兄, Actually I'd tried implib.exe and coff2omf.exe but in vain. It seems only work for *.lib. Thank you. Any other idea? 軟還要更軟,我的Artwork http://delphi.ktop.com.tw/topic.php?TOPIC_ID=27674 Chinese Girl in Rhino3D http://rhino3d.com/gallery/figure/girl.htm |
Royce520
高階會員 發表:18 回覆:157 積分:100 註冊:2002-09-13 發送簡訊給我 |
|
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
|
RaynorPao
版主 發表:139 回覆:3622 積分:7025 註冊:2002-08-12 發送簡訊給我 |
引言: 謝謝 RaynorPao 兄,再請問 obj 檔要怎麼包裝成 DLL 呢?我看了連結的文章,好像沒有提到呢。 fy 你好: 其實方法都是很相似的,請參考以下的說明 (> < src="http://delphi.ktop.com.tw/loadfile.php?TOPICID=10003806&CC=223734"> -- Enjoy Researching & Developing --
------
-- 若您已經得到滿意的答覆,請適時結案!! -- -- 欲知前世因,今生受者是;欲知來世果,今生做者是 -- -- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 -- |
dan59314
中階會員 發表:121 回覆:107 積分:86 註冊:2002-08-16 發送簡訊給我 |
引言: fy 你好: 其實方法都是很相似的,請參考以下的說明 (1)為了配合說明,所以小弟我必須先做幾項假設,因為我並不清楚你拿到的 *.h, *.obj 裡面有哪些可用的、已經被宣告的 function,因此,在此假設 : 你拿到的檔案分別為 VcObj.h, VcObj.obj,而裡面有一個被宣告在 *.h 裡面的 function,其原型為 int ObjAdd(int a, int b); .........感謝 RaynorPao 兄, 我照您教的方法,成功產生了 LIB 檔,但是產生 DLL檔時又失敗了。出現以下訊息: VCDLL.cpp Linking... Creating library Debug/VCDLL.lib and object Debug/VCDLL.exp LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library VCLIB.lib(VcLib.obj) : error LNK2001: unresolved external symbol "void __cdecl ReadProductInfo(int,struct product_s *)" (?ReadProductInfo@@YAXHPAUproduct_s@@@Z) VCLIB.lib(VcLib.obj) : error LNK2001: unresolved external symbol "char * __cdecl KeyStatusMessage(int)" (?KeyStatusMessage@@YAPADH@Z) Debug/VCDLL.dll : fatal error LNK1120: 2 unresolved externals Error executing link.exe. VCDLL.dll - 3 error(s), 1 warning(s) 附上Project Sources 和原始檔案檔案,能否麻煩您再幫我看看問題在哪裡?? 原始檔案: encode.obj 和 customer.h Project: [VCLIB] , [VCDLL] http://delphi.ktop.com.tw/loadfile.php?TOPICID=14124764&CC=315896 軟還要更軟,我的Artwork http://delphi.ktop.com.tw/topic.php?TOPIC_ID=27674 Chinese Girl in Rhino3D http://rhino3d.com/gallery/figure/girl.htm 發表人 - fy 於 2004/02/18 17:27:25 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |