LoginSignup
1
0

More than 1 year has passed since last update.

visual studioでのクロスプラットフォーム開発の設定

Posted at

Visual Studioとubuntuを使ってクロスプラットフォーム開発を行っていたときのメモ
pthreadを使ってコードを書いていたらコンパイルできなかった。

手動でコンパイルするときは-pthreadオプションをつけるためそこの問題の模様。
解決方法は簡単だった。

環境

Windows10
Visual Studio2019 or 2022
C言語

リモートアクセス先:ubuntu20.04

プロパティから設定

ソリューションエクスプローラから現在のプロジェクトを選択
image.png
プロパティを開く
image.png
構成プロパティ>リンカー>コマンドラインを開く
追加のオプションに"-pthread"を追加して適用するだけ。
image.png

ちなみに……

初めて記事を書きました。
書き方がわからん……

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0