Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Cannot link win10-lib into C++/WinRt Runtime component

クローズ
#1,253 コメント 0 件 リアクション 1 件 担当者 2 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

@ThomsonTan がすでに取り組んでいます。

2024年3月26日 から。

評価

この issue はまだ評価されていません。

説明

bug

Similar to https://github.com/microsoft/cppwinrt/issues/1053

  1. Build zlib, sqlite-uwp, win10-lib
  2. Create a new C++/WinRT Windows Runtime component
    image
  3. Include LogManager.hpp (no need to write any code)
  4. Link zlib.lib, sqlite-uwp.lib, Microsoft.Applications.Telemetry.Windows.native.lib
  5. Build C++/WinRT DLL
  6. Build errors:

1>vccorlibd.lib(init.obj) : error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker': value '1' doesn't match value '0' in MSVCRTD.lib(app_appinit.obj)
1>vccorlibd.lib(init.obj) : error LNK2005: __crtWinrtInitType already defined in MSVCRTD.lib(app_appinit.obj)

Resolution: https://stackoverflow.com/questions/34939913/mismatch-detected-for-vccorlib-lib-should-be-specified-before-msvcrt-lib-to-lin

Many repetitions of:

1>Microsoft.Applications.Telemetry.Windows.native.lib(capi.obj) : warning LNK4197: export 'DllGetActivationFactory' specified multiple times; using first specification
1>Microsoft.Applications.Telemetry.Windows.native.lib(capi.obj) : warning LNK4197: export 'DllCanUnloadNow' specified multiple times; using first specification

This seems to be due to vccorlib and C++/CX dependencies used in win10-lib. See: https://stackoverflow.com/questions/12893355/windowsstorageapplicationdatacurrent-not-found-in-c

Expected behavior: we ought to be able to link the static cpp_client_telemetry lib into our WinRT DLL without conflicts. Then we can distribute just the WinRT DLL with cpp_client_telemetry built into it.

主要言語
C
スター
102
フォーク
67
平均マージ
5日 5時間
マージ済み PR(30日)
8

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/cpp_client_telemetry のほかの issue

microsoft/cpp_client_telemetry の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。