2010-11-19 82 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),然后选中“复制本地“,它将文件复制到程序的本地目录中......并且该程序在那段时间运行良好。所以,它现在可以工作......但我仍然不知道为什么这会起作用,或者究竟是什么导致了之前非常奇怪的行为。如果有人对此有任何想法,我很有兴趣知道。但现在至少该计划的工作。