简体   繁体   English

增加了图书馆; Borland C ++ Builder无故暂停

[英]Added library; Borland C++ Builder pauses without reason

I've been trying to use the UnderC library (gives c++ scripting functionality) in a program in Borland C++ Builder (in Windows XP), but it's giving me difficulties that I'm not sure how to fix. 我一直在尝试在Borland C ++ Builder(在Windows XP中)的程序中使用UnderC库(提供c ++脚本功能),但是却给我带来了不确定的解决方法的麻烦。 Other problems that've come up, I found solutions to them online, but this one is hard to describe with easily searchable words. 出现了其他问题,我在网上找到了解决方案,但是很难用易于搜索的词来形容。 I've added (to the compiler search path) the folder that contains the files needed - "ucdl.h" and "ucc12.lib" (C++ told me I needed to convert the .lib from coff to omf, so I did; it stopped giving me that error). 我已经在编译器搜索路径中添加了包含所需文件的文件夹-“ ucdl.h”和“ ucc12.lib”(C ++告诉我我需要将.lib从coff转换为omf,所以我做了;它不再给我那个错误)。 I added the line #include "ucdl.h", and now it doesn't give me any error messages - but when I run it, the first thing it does is stop in the middle of the cpu debugging window, as though I had set a breakpoint. 我添加了行#include“ ucdl.h”,现在它不给我任何错误消息-但是当我运行它时,它要做的第一件事是停在cpu调试窗口的中间,就好像我已经设置一个断点。 There are no break points. 没有断点。 It doesn't give any reason as to why it stopped. 它没有给出任何停止原因。 If I have it continue running, it then gives me an access violation error. 如果我让它继续运行,则会给我一个访问冲突错误。 One thing that may or may not be useful - if, in the cpu debugger, I back up a line from where it paused, it reparses the visible assembly, and the line it was on is then shown to begin a byte earlier. 可能有用或可能无效的一件事-如果在cpu调试器中我从暂停的位置备份了一行,它重新解析了可见的程序集,然后显示该行所在的行早于一个字节开始。 As the code runs from where it stops, as far as I can tell, to get to where it crashes, it goes (in the assembly code) from 据我所知,代码从停止的地方开始运行,直到崩溃的地方,它从汇编代码中
___CRTL_VCL_Init into ___CRTL_VCL_Init进入
___CRTL_VCL_Sharemem into ___CRTL_VCL_Sharemem进入
__roundToInt64(), at the following line: __roundToInt64(),在以下行:
00403204 FF25387B4000 jmp dword ptr [$00407b38] 00403204 FF25387B4000 jmp dword ptr [$ 00407b38]

This line is preceded and followed by many similar lines, pointing to adjacent memory locations. 此行之前和之后是许多相似的行,指向相邻的内存位置。 The address contained by the pointer is 0x00009B47, which appears to be out of the program's range or whatever, and thus gives an error. 指针包含的地址是0x00009B47,它似乎超出了程序的范围或任何范围,因此产生错误。 I'm not sure how to address this problem, since it doesn't give me any errors when it first stops (really weird), there's no source code associated with where it gives the error, and it seems to give the error in a VCL initialization area, and I don't know how the addition of a library would cause that. 我不确定如何解决此问题,因为它在第一次停止时并没有给我任何错误(真的很怪异),没有与产生错误的位置相关的源代码,并且似乎在VCL初始化区域,我不知道添加库会如何导致这种情况。 Any ideas, anyone? 有什么想法吗?

Oh, also, it appears to pause just after loading borlndmm.dll, whereas a normal program keeps loading more dlls. 哦,而且,在加载borlndmm.dll之后,它似乎暂停了,而普通程序则继续加载更多的dll。 The event log shows: 事件日志显示:

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)

Ok...I was messing with the settings, and I used "add a file to your project" on ucc12.dll (as opposed to .lib), and then checked "copy local", which copies the file to the program's local directory...and the program worked fine that time. 好的...我搞砸了设置,我在ucc12.dll(而不是.lib)上使用“向您的项目添加文件”,然后选中“复制本地”,将文件复制到程序的本地目录...程序在那个时候运行良好。 So, it works now...but I still have no idea why that worked, or what exactly was causing the very odd behavior before. 因此,它现在可以工作了……但是我仍然不知道为什么它可以工作,或者究竟是什么导致了以前非常奇怪的行为。 If anybody has any ideas about that, I'd be interested to know. 如果有人对此有任何想法,我很想知道。 But at least the program's working, now. 但是,至少该程序现在可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM