Reputation: 402
I've created a new VCL form using RAD Studio 10 Seattle.
I added a NotificationCenter at design time. Then I compiled it and ran it successfully.
But when I made the following two steps:
1. Went to
Project -> Options -> C++ Linker
and unchecked the "Link with Dynamic RTL" option.
2. Went to
Project -> Options -> Packages -> Runtime packages
and unchecked the "Link with runtime packages" option.
These options are unchecked in order to make the .exe standalone i.e. to be able to execute the .exe file without the IDE. So when these options are unchecked all libraries and packages are linked to the .exe file.
But now when I compile it, at link stage it gives me the following errors:
[ilink64 Error] Error: Unresolved external 'SHStrDupW' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.Notification.o
[ilink64 Error] Error: Unresolved external 'WindowsDeleteString' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|Winapi.UI.Notifications.o
[ilink64 Error] Error: Unresolved external 'RoInitialize' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.WinRT.o
[ilink64 Error] Error: Unresolved external 'RoUninitialize' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.WinRT.o
[ilink64 Error] Error: Unresolved external 'WindowsGetStringRawBuffer' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.WinRT.o
[ilink64 Error] Error: Unresolved external 'WindowsCreateString' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.WinRT.o
[ilink64 Error] Error: Unresolved external 'RoGetActivationFactory' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.WinRT.o
[ilink64 Error] Error: Unresolved external 'RoActivateInstance' referenced from D:\PROGRAM FILES\EMBARCADERO\EMBARCADERO\STUDIO\17.0\LIB\WIN64\RELEASE\RTL.A|System.Win.WinRT.o
So I searched my
Embarcadero/17.0/
directory for reference in the first linker error SHStrDupW
and found three files with extenstion .h or .hpp and included them into my project, but the same results followed.
Does anyone have idea how to fix this bug, I would appreciate all kind of help? :)
P.S: It doesn't matter if I compile it for win32 or win64 OS.
Upvotes: 0
Views: 1099
Reputation: 596582
The linker errors are referring to Win32/WinRT API functions. You need to add Shlwapi.lib
and runtimeobject.lib
to your project to resolve those references.
Upvotes: 1