未解析的外部 SHCreateItemFromParsingName 引用的 VCL.LIB/对话框

发布于 2024-10-06 14:06:04 字数 1154 浏览 0 评论 0原文

我有一个 C++ Builder 应用程序,正在从 C++ Builder 6 移植到 Windows XP 上的 XE。

许多第三方控件也在使用中。

我正在使用 Dynamic RTL = False 进行编译

如果我在没有运行时包的情况下进行编译,我会收到主题错误消息:

[ILINK32 Error] Error: Unresolved external 'SHCreateItemFromParsingName' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\8.0\LIB \WIN32\RELEASE\VCL.LIB|Dialogs

如果我使用运行时包进行编译,错误就会消失。

谷歌搜索发现 SHCreateItemFromParsingName 与可以通过 WinAPI 调用调用的常见控制对话框有关。

我在新的/单独的项目中使用所有第 3 方控件;因此这个问题确实似乎是一个简单的#define 或其他东西......(不确定)

我在我的项目源中找不到任何会导致此问题的内容。我的项目中确实有一个 TOpenDialog 和一个 TSaveDialog,它们替换了 CBuilder6 中使用的同名旧 TMC 组件(TntOpenDialog、TntSaveDialog),以提供相同的 Unicode 支持。转换为 VCL 附带的版本并没有解决这个问题。

有一个 Embarcadero 线程讨论了这个问题,但那个人似乎通过创建 #define 来构建他们的 WinXP 和新兼容性应用程序来解决。在 XE 下,我将 C++ 编译器选项设置为针对 Windows XP 和更高版本,但这也不起作用。

尝试添加:

“#define WINVER 0x0502”

“#define _WIN32_WINNT 0x0502”

每个 MSDN 链接: http://msdn.microsoft.com/en -us/library/aa383745%28v=vs.85%29.aspx

无济于事。

除了 Open/SaveDialog 组件之外,有人有任何建议或以前见过这个吗?

I have a C++ Builder application I'm porting from C++ Builder 6 to XE on Windows XP.

A number of 3rd party controls are in use as well.

I'm compiling with Dynamic RTL = False

If I compile without run time packages I get the subject error message:

[ILINK32 Error] Error: Unresolved external 'SHCreateItemFromParsingName' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\8.0\LIB\WIN32\RELEASE\VCL.LIB|Dialogs

If I compile with run time packages the error goes away.

Googling around reveals the SHCreateItemFromParsingName has to do with common control dialogs one can invoke with WinAPI calls.

All 3rd party controls I use work in a new/separate project; thus this problem does appear to be a simple #define or something.... (not sure)

I can not find anything in my project source that would cause this. I do have an TOpenDialog and a TSaveDialog in my project that replaced an older TMC components of the same names (TntOpenDialog, TntSaveDialog) that were used in CBuilder6 to give Unicode support for the same. Converted to the ones that ship with the VCL has not resolved this problem.

There is an Embarcadero thread on this but that person appear to solve by creating #define's to build their app for WinXP and new compatibility. Under XE, I set the C++ Compiler option to target Windows XP and newer and that did not work either.

Tried adding:

"#define WINVER 0x0502"

"#define _WIN32_WINNT 0x0502"

per MSDN link here:
http://msdn.microsoft.com/en-us/library/aa383745%28v=vs.85%29.aspx

to no avail.

Other than the Open/SaveDialog components, anyone have any advise or seen this before?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唔猫 2024-10-13 14:06:04

好的,花了两天时间,当我将其发布到这里时,我找到了解决方案。

在构建配置(右键单击|编辑)下

,在应用程序下有一个未选中的复选框“启用运行时主题”。

检查了一下,问题现在消失了。

OK, spent two days on this and as soon as I post it here, I found the solution.

Under the Build Configuration (right click | edit )

Under Application there is a check box "Enable runtime themes" that was unchecked.

Checked it and problem now gone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文