teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

文章を修正

2021/11/15 03:07

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- gccコンパイラ エラー「 undefined reference to `WinMain@16'」 の原因が知りたい。
1
+ makefile gccコンパイラ int main()関数を定義しているのに エラー「 undefined reference to `WinMain@16'」 の原因が知りたい。
body CHANGED
@@ -1,6 +1,10 @@
1
1
  提示コードですが以下のMain.cppを定義しているにもかかわらずなぜコマンドプロンプトのようなエラーが出るのでしょうか?
2
2
  int main()関数の引数を触ったり、しましたが原因がわかりません。これまではlinux上ではこれでコンパイル出来ていたのですがwindowに持ってきたところエラーが出ます。
3
3
 
4
+ ##### 環境
5
+ OS windows10
6
+ GNU make
7
+ g++
4
8
 
5
9
 
6
10
  参考サイト: [https://cat-in-136.github.io/2010/03/mingw32undefined-reference-to-winmain16.html](https://cat-in-136.github.io/2010/03/mingw32undefined-reference-to-winmain16.html)