Unresolved external SHCreateItemFromParsingName referenced VCL.LIB / Dialogs

孤街醉人 提交于 2019-12-11 09:46:40

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/4403887/unresolved-external-shcreateitemfromparsingname-referenced-vcl-lib-dialogs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!