2010-11-19 81 views
1

我一直試圖在Borland C++ Builder(Windows XP)中的程序中使用UnderC庫(提供C++腳本功能),但它給我帶來了困難,我不知道如何固定。其他問題已經出現,我在網上找到了解決方案,但是這個很難用易於搜索的詞來描述。我已經添加了(到編譯器搜索路徑)包含所需文件的文件夾 - 「ucdl.h」和「ucc12.lib」(C++告訴我,我需要將.lib從coff轉換爲omf,所以我做到了;它停止給我那個錯誤)。我添加了行#include「ucdl.h」,現在它不會給我任何錯誤信息 - 但是當我運行它時,它所做的第一件事就是停止在cpu調試窗口的中間,好像我有設置一個斷點。沒有中斷點。它沒有給出任何理由說明它爲什麼停止。如果我繼續運行,它會給我一個訪問衝突錯誤。有一件事可能會或可能不會有用 - 如果在cpu調試器中,我從它暫停的位置備份了一行,它將重新解析可見程序集,然後顯示它所在的行以便先前開始一個字節。 正如代碼從那裏停止,據我所知道的,去的地步,它崩潰運行,它會(在彙編代碼中)從
___CRTL_VCL_Init到
___CRTL_VCL_Sharemem到
__roundToInt64(),在下面line:
00403204 FF25387B4000 jmp dword ptr [$ 00407b38]添加庫; Borland C++ Builder沒有理由地暫停

此行前後有許多類似的行,指向相鄰的內存位置。指針包含的地址是0x00009B47,它似乎超出了程序的範圍或任何內容,因此出現錯誤。我不知道如何解決這個問題,因爲它在第一次停止的時候不會給我任何錯誤(真的很奇怪),沒有任何源代碼與它給出錯誤的地方相關聯,並且它似乎給出了錯誤VCL初始化區域,我不知道如何添加一個庫會導致這種情況。任何想法,任何人?

另外,它似乎暫停加載borlndmm.dll後,而正常的程序不斷加載更多的DLL。事件日誌顯示:

Thread Start: Thread ID: 3028. Process ManualEventLogger.exe (4932) 
Process Start: C:\Documents and Settings\Matthew\My Documents\Borland Studio Projects\Cantrips\Manual Event Logger\Debug_Build\ManualEventLogger.exe. Base Address: $00400000.  Process ManualEventLogger.exe (4932) 
Module Load: ManualEventLogger.exe. Has Debug Info. Base Address: $00400000. Process ManualEventLogger.exe (4932) 
Module Load: ntdll.dll. No Debug Info. Base Address: $7C900000. Process ManualEventLogger.exe (4932) 
Module Load: KERNEL32.dll. No Debug Info. Base Address: $7C800000. Process ManualEventLogger.exe (4932) 
Module Load: vcl100.bpl. No Debug Info. Base Address: $52000000. Process ManualEventLogger.exe (4932) 
Module Load: rtl100.bpl. No Debug Info. Base Address: $51F20000. Process ManualEventLogger.exe (4932) 
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $77120000. Process ManualEventLogger.exe (4932) 
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $77DD0000. Process ManualEventLogger.exe (4932) 
Module Load: RPCRT4.dll. No Debug Info. Base Address: $77E70000. Process ManualEventLogger.exe (4932) 
Module Load: Secur32.dll. No Debug Info. Base Address: $77FE0000. Process ManualEventLogger.exe (4932) 
Module Load: GDI32.dll. No Debug Info. Base Address: $77F10000. Process ManualEventLogger.exe (4932) 
Module Load: USER32.dll. No Debug Info. Base Address: $7E410000. Process ManualEventLogger.exe (4932) 
Module Load: msvcrt.dll. No Debug Info. Base Address: $77C10000. Process ManualEventLogger.exe (4932) 
Module Load: ole32.dll. No Debug Info. Base Address: $774E0000. Process ManualEventLogger.exe (4932) 
Module Load: VERSION.dll. No Debug Info. Base Address: $77C00000. Process ManualEventLogger.exe (4932) 
Module Load: MPR.dll. No Debug Info. Base Address: $71B20000. Process ManualEventLogger.exe (4932) 
Module Load: IMAGEHLP.dll. No Debug Info. Base Address: $76C90000. Process ManualEventLogger.exe (4932) 
Module Load: WSOCK32.dll. No Debug Info. Base Address: $71AD0000. Process ManualEventLogger.exe (4932) 
Module Load: WS2_32.dll. No Debug Info. Base Address: $71AB0000. Process ManualEventLogger.exe (4932) 
Module Load: WS2HELP.dll. No Debug Info. Base Address: $71AA0000. Process ManualEventLogger.exe (4932) 
Module Load: OLEACC.dll. No Debug Info. Base Address: $74C80000. Process ManualEventLogger.exe (4932) 
Module Load: MSVCP60.dll. No Debug Info. Base Address: $76080000. Process ManualEventLogger.exe (4932) 
Module Load: MSIMG32.dll. No Debug Info. Base Address: $76380000. Process ManualEventLogger.exe (4932) 
Module Load: COMCTL32.dll. No Debug Info. Base Address: $5D090000. Process ManualEventLogger.exe (4932) 
Module Load: SHELL32.dll. No Debug Info. Base Address: $7C9C0000. Process ManualEventLogger.exe (4932) 
Module Load: SHLWAPI.dll. No Debug Info. Base Address: $77F60000. Process ManualEventLogger.exe (4932) 
Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $73000000. Process ManualEventLogger.exe (4932) 
Module Load: comdlg32.dll. No Debug Info. Base Address: $763B0000. Process ManualEventLogger.exe (4932) 
Module Load: oledlg.dll. No Debug Info. Base Address: $7DF70000. Process ManualEventLogger.exe (4932) 
Module Load: borlndmm.dll. No Debug Info. Base Address: $21670000. Process ManualEventLogger.exe (4932) 

回答

0

好吧...我用的設置搞亂了,我用在ucc12.dll「將文件添加到您的項目」(而不是.LIB),然後選中「複製本地「,它將文件複製到程序的本地目錄中......並且該程序在那段時間運行良好。所以,它現在可以工作......但我仍然不知道爲什麼這會起作用,或者究竟是什麼導致了之前非常奇怪的行爲。如果有人對此有任何想法,我很有興趣知道。但現在至少該計劃的工作。