2011-10-15 49 views
2

我試圖從PSDK生成的IDL文件之一生成類型庫,但midl會話成功完成(ERRORLEVEL 0)沒有生成.tlb文件。目前我不知道什麼是錯的。請指教。_從PSDK IDL文件生成PASCAL綁定文件的問題

下面是一個冗長的輸出形式midl會議:

>midl emptyvc.idl /tlb .\emptyvc.tlb /I "\Program Files\Microsoft SDKs\Windows\v7.0\Include" /W4 
Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555 
Copyright (c) Microsoft Corporation. All rights reserved. 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\emptyvc.idl 
emptyvc.idl 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl 
objidl.idl 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\unknwn.idl 
unknwn.idl 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\wtypes.idl 
wtypes.idl 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\basetsd.h 
basetsd.h 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\guiddef.h 
guiddef.h 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\wtypes.idl(671) : warning MIDL2111 : identifier length exceeds 31 characters : STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2308) : warning MIDL2111 : identifier length exceeds 31 characters : FMTID_MediaFileSummaryInformation 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2499) : warning MIDL2111 : identifier length exceeds 31 characters : tagEOLE_AUTHENTICATION_CAPABILITIES 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2518) : warning MIDL2111 : identifier length exceeds 31 characters : EOLE_AUTHENTICATION_CAPABILITIES 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2616) : warning MIDL2111 : identifier length exceeds 31 characters : tagRPCOPT_SERVER_LOCALITY_VALUES 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2652) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_EXCEPTION_DONOT_HANDLE_FATAL 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2653) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_EXCEPTION_DONOT_HANDLE_FATAL 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2654) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_EXCEPTION_DONOT_HANDLE_ANY 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2660) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_RPC_THREADPOOL_SETTING_DEFAULT_POOL 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(2661) : warning MIDL2111 : identifier length exceeds 31 characters : COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\objidl.idl(3359) : warning MIDL2111 : identifier length exceeds 31 characters : APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\oleidl.idl 
oleidl.idl 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\oleidl.idl(329) : warning MIDL2111 : identifier length exceeds 31 characters : OLEMISC_RENDERINGISDEVICEINDEPENDENT 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\oleidl.idl(339) : warning MIDL2111 : identifier length exceeds 31 characters : OLEMISC_IGNOREACTIVATEWHENVISIBLE 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\oaidl.idl 
oaidl.idl 
Processing \Program Files\Microsoft SDKs\Windows\v7.0\Include\oaidl.acf 
oaidl.acf 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\emptyvc.idl(108) : warning MIDL2392 : [local] procedure without [call_as] : [ Procedure 'Initialize' ] 
\Program Files\Microsoft SDKs\Windows\v7.0\Include\emptyvc.idl(157) : warning MIDL2392 : [local] procedure without [call_as] : [ Procedure 'InitializeEx' ] 
** ERRORLEVEL is 0 at this point ** 

零件和工具使用:

  • 未修改emptyvc.idl從Windows SDK 7.0版
  • MIDL版本7.00.0555
  • CL版本14.00.50727.42

注意:我相信這不是環境問題,因爲我嘗試的第一件事是編譯其他.idl文件,並且如預期的那樣得到了.tbl結果,然後在沒有任何問題的情況下處理了TLIBIMP


這裏是CL輸出(跑由MIDL完全沉默):

dlldata.c 
dlldata.c(24) : error C2061: syntax error : identifier 'PROXYFILE_LIST_START' 
dlldata.c(24) : error C2059: syntax error : ';' 
dlldata.c(31) : error C2146: syntax error : missing ';' before identifier 'DLLDATA_ROUTINES' 
dlldata.c(38) : fatal error C1004: unexpected end-of-file found 
+1

問題的「Delphi」或「Pascal」部分在哪裏? AFAICT,這完全是一個'MIDL'問題。除了標籤中沒有提及'Delphi',除了標題外沒有提及'Pascal'。 –

回答

1

MIDL有,如果有什麼產生不產生輸出的這個有點令人討厭的習慣。您是否確認emptyvc.idl文件中有可以用typelib(類,接口,庫指令等)表示的類型?

+0

嗯,有人刪除[delphi]標籤,註定要表明我有點MSVC n00b。不,我沒有確認,但'.idl'文件對我非常好的眼睛來說非常有效。目前我想出了什麼中間產生'.c'和'.h',然後midl在它們上面完全沉默了'cl',這反過來又使預處理步驟失敗。 – OnTheFly

+0

更新了CL側的Q.你有什麼想法可能會導致問題,CL或輸入.idl文件(PSDK是更新的MS C編譯器)? – OnTheFly

+0

.idl文件是否包含一個名爲類名的庫塊? –