2016-05-09 12 views
2

私はWindowsストアアプリケーション用のユニバーサルウィンドウにC++ライブラリを移植しようとしています。 私が間違ってやっているか疑問に思うのWindows 10windowsストア認定キット - C++ライブラリ検証の問題

にVisual Studioで2015 v14.0.24720.00更新1をx86の開発者のコ​​マンドプロンプトを使用して - すべてがコンパイルされ、以下のフラグを持つ微リンク:

cl /nologo /FoBuild\Obj\Windows\Release\[OBJ_FILE].obj /c /MD /Ox /W4 /EHsc /FRBuild\Obj\Windows\Release\ -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -D_CRT_SECURE_NO_WARNINGS -DDEFINE_WINDOWS_UNIVERSAL /AI "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\store\references" /WX /ZW /D "WINAPI_FAMILY=2" -IBuild\Include [SOURCE].cpp

と:

link /nologo /opt:ref /map Ws2_32.lib /APPCONTAINER /dll /out:Build\Obj\Windows\Release\myDll.dll [OBJ_FILE.obj]*

確実に標準FUあるべきもののために珍しい探してダサく検証エラーの全体の束を取得 さらに、これらのサポートされていないAPIの多くは、サポートされていないと宣言されているにもかかわらず、ホワイトリストファイルに実際に存在するようです。明示的 ないそれがすべて/ ZW/EHsc/Dで罰金コンパイルとしてここに記載されているように、「WINAPI_FAMILY = 2」スイッチ私が間違ってやっているのかわからhttps://msdn.microsoft.com/en-us/library/hh700130.aspx

そのページの状態のドキュメントそのCRT関数のいずれかを使用することWindows 8.x Storeアプリケーションでは許可されていないため、/ ZWフラグを使用するとコンパイル時エラーが発生します。腕のツールチェーン上でさえ、すべてコンパイルされます。

また、いくつかのリファレンスがvcruntime140にあり、いくつかがapi-ms-win-crt - *。dllにある理由については困惑しています。

誰でもこれらの問題にどのような光を当てることができますか?

下記のエラーの完全なリスト

乾杯

イアン

◦API _time64 in api-ms-win-crt-time-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _cexit in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _crt_atexit in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _execute_onexit_table in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _initialize_narrow_environment in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _initialize_onexit_table in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _initterm in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _initterm_e in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _invalid_parameter_noinfo_noreturn in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _register_onexit_function in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _seh_filter_dll in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API abort in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API terminate in api-ms-win-crt-runtime-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _strdup in api-ms-win-crt-string-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API strncat in api-ms-win-crt-string-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API strncmp in api-ms-win-crt-string-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API strncpy in api-ms-win-crt-string-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API __acrt_iob_func in api-ms-win-crt-stdio-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API __stdio_common_vfprintf in api-ms-win-crt-stdio-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API __stdio_common_vsnprintf_s in api-ms-win-crt-stdio-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API __stdio_common_vsprintf in api-ms-win-crt-stdio-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API fflush in api-ms-win-crt-stdio-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API _callnewh in api-ms-win-crt-heap-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API calloc in api-ms-win-crt-heap-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API free in api-ms-win-crt-heap-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API malloc in api-ms-win-crt-heap-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API rand in api-ms-win-crt-utility-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API srand in api-ms-win-crt-utility-l1-1-0.dll is not supported for this application type. myDll.dll calls this API. 
◦API [email protected]@[email protected]@[email protected] in vccorlib140.dll is not supported for this application type. myDll.dll calls this API. 
◦API [email protected]@[email protected]@[email protected] in vccorlib140.dll is not supported for this application type. myDll.dll calls this API. 
◦API _CxxThrowException in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __CxxFrameHandler3 in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __std_exception_copy in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __std_exception_destroy in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __std_terminate in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __std_type_info_destroy_list in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __telemetry_main_invoke_trigger in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __telemetry_main_return_trigger in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API __vcrt_InitializeCriticalSectionEx in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API _except_handler4_common in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API _purecall in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API memcpy in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API memmove in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API memset in vcruntime140.dll is not supported for this application type. myDll.dll calls this API. 
◦API [email protected]@@YAXXZ in msvcp140.dll is not supported for this application type. myDll.dll calls this API. 
◦API [email protected]@@[email protected] in msvcp140.dll is not supported for this application type. myDll.dll calls this API. 
◦API [email protected]@@[email protected] in msvcp140.dll is not supported for this application type. myDll.dll calls this API. 
◦API CreateEventA in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API CreateEventW in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API CreateSemaphoreA in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API GetModuleHandleW in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API InitializeCriticalSection in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API SetUnhandledExceptionFilter in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API TerminateProcess in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API TlsAlloc in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API TlsFree in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API TlsGetValue in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API TlsSetValue in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API UnhandledExceptionFilter in kernel32.dll is not supported for this application type. myDll.dll calls this API. 
◦API WaitForSingleObject in kernel32.dll is not supported for this application type. myDll.dll calls this API. 

答えて

0

答えは、私はWindows用のvs2013ツールチェーン8.1ライブラリーではなく、vs2015に対して構築するために必要なことです。ユニバーサルC++ランタイムへの依存性をチェックすることを忘れないでください。そうしないと、dllをロードできなくなります。 Cで

使用vcvars.bat:\プログラムファイル(x86の)は、MicrosoftのVisual Studio \ 12.0 \ VC

コンパイラ:

CL/NOLOGO /FoBuild\Obj\Windows\Release\MyObj.obj - D "UNICODE"/D "UNICODE"/FU "C:\ Program/C/MD/Ox/c/W4/EHsc/FRBuild \ Obj \ Windows \ Release \ -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -DDEFINE_WINDOWS_UNIVERSAL -D_CRT_SECURE_NO_WARNINGS/D" _WINDLL "/ D" Windowsの\ Windows \ 8.1 \ ExtensionSDKs \ Microsoft.VCLibs \ 12.0 \ References \ CommonConfiguration \ neutral \ platform.winmd "/ FU" C:\ Program Files(x86)\ Windows Kits \ 8.1 \ References \ CommonConfiguration \ Neutral \ Windows.winmd "/ FU" C:\ Program Files(x86)\ Windowsキット\ 8.1 \ References \ CommonConfigurati \ Neutral \ Windows.winmd "/ WX/ZW/ZW:nostdlib/D" WINAPI_FAMILY = WINAPI_FAMILY_APP "/ D" WRL_NO_DEFAULT_LIB "/ Gy/Zc:インライン/ Zc:wchar_t/TP -IBuild \ Include MySrc.cpp

リンカ:

リンク/ NOLOGO/OPT:REF /マップWS2_32.LIBてKernel32.lib/APPCONTAINER/DYNAMICBASE/NXCOMPAT/MACHINE:X86/SUBSYSTEM:WINDOWS/LIBPATH: "C:\プログラムファイル(x86の) \ Microsoft Visual Studio 12.0 \ VC \ lib \ store "/ dll /out:Build\Obj\Windows\Release\myDll.dll [ビルド\ Obj \ Windows \ Release *。OBJ]

も参照してください:

https://social.msdn.microsoft.com/Forums/en-US/b4d0ca1a-6b35-49e2-9074-886cc36f80d4/uwpc-store-apps-compiling-c-library-on-command-line-causes-rejections?forum=wpdevelop

https://blogs.msdn.microsoft.com/vcblog/2012/09/28/c-runtime-for-windows-8-store-apps/

乾杯 イアン