Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jakub_L_Intel
Employee
219 Views

Universal Windows Driver - OneCore linking problem - Visual Studio 2015

Jump to solution

I wanted to rebuild existing solution to make it Universal API compliant. The story is that when I added linking to onecoreuap.lib Visual Studio returns many errors about "unresolved external symbol" to some functions I am using. Yet, I found those functions in the UniversalDDIs.xml so I guess that this API should be supported. Below you'll find the specifics:

Project A:

- Lang: C++

- Target Platform Version: 10.0.15063.0

- Configuration Type: Static Library (.lib)

- Platform Toolset: Visual Studio 2015 (v140)

- Additional Dependencies: $(WindowsSDK_LibraryPath)\$(Platform)\OneCoreUAP.lib

- Ignore Specific Default Libraries: kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;

- Output: ProjectA.Lib

Project B:

- Lang: C++

- Target Platform Version: 10.0.15063.0

- Configuration Type: Dynamic Library (.dll)

- Platform Toolset: Visual Studio 2015 (v140)

- Additional Dependencies: $(WindowsSDK_LibraryPath)\$(Platform)\OneCoreUAP.lib; ProjectA.Lib

- Ignore Specific Default Libraries: kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;

- Output: ProjectB.dll

 

Sample output:

When I try to build the solution I get the below errors:

Error LNK2001 unresolved external symbol __imp_PathIsRelativeA (ProjectA.lib)

Error LNK2001 unresolved external symbol __imp_PathAppendW (ProjectA.lib)

Error LNK2001 unresolved external symbol __imp_PathRemoveFileSpecA (ProjectA.lib)

These 3 funcs are part of Shlwapi.dll and I found in UniversalDDIs.xml that in UWD they are supported from api-ms-win-core-shlwapi-legacy-l1-1-0.dll

 

Possible solution

I'll be truly thankful if you could tell me, what am I doing wrong or what else should I do or link to to make it work :)

 

0 Kudos
1 Solution
jimdempseyatthecove
Black Belt
219 Views

See: https://stackoverflow.com/questions/42598785/static-linking-on-windows-os

You may need to add: Shlwapi.lib

Perform a Google search for: __imp_PathFileExistsA

You will find additional information.

Jim Dempsey

View solution in original post

1 Reply
jimdempseyatthecove
Black Belt
220 Views

See: https://stackoverflow.com/questions/42598785/static-linking-on-windows-os

You may need to add: Shlwapi.lib

Perform a Google search for: __imp_PathFileExistsA

You will find additional information.

Jim Dempsey

View solution in original post

Reply