FortranのG95コンパイルエラー

このQ&Aのポイント
  • FortranのG95コンパイルエラーについて
  • エラーメッセージ「libf95.a(main.o)」の意味と解決方法
  • XPのSP3でのG95コンパイルエラーの対処法
回答を見る
  • ベストアンサー

FortranのG95コンパイルエラー

お世話になります。 先日業務の参考に技術書を購入しました。 その技術書には計算するためのFotranのソースプログラムが付属されており、それを実行するためコンパイラのG95をインストールしました。 ですがコンパイルを実行すると以下のエラーが出てしまいます。 c:/g95/bin/../lib/gcc-lib/i686-pc-mingw32/4.1.2//libf95.a(main.o):(.text+0x32):undefined reference to `_MAIN_' このエラーをグーグルで「libf95.a(main.o)」をキーワードに調べてみましたが英語のページに当たり、まるで理解できませんでした。 G95は技術書の付属CDに入っていたので出来るはずなのですが。 このエラーの原因をご存知の方がいらしたらよろしくお願いします。 [追記] OSはXPのSP3です。

質問者が選んだベストアンサー

  • ベストアンサー
  • f272
  • ベストアンサー率46% (8011/17120)
回答No.2

ソースプログラムから実行プログラムを作るには,大きく分けて「コンパイル」と「リンク」という手順を踏む。 g95というコマンドはその2つの手順の両方を順番に行う。 「コンパイル」だけなら,ひとつのサブルーチンだけを与えてもエラーにはならないが,それでは実行可能なプログラムはできない。すべてのサブルーチンとメインルーチンをコンパイル,リンクすることが必要である。 書かれているエラーメッセージから推測すると,あなたのやっていることはたとえば g95 data1.f のように,ひとつのルーチンだけで実行可能なプログラムを作れと言っているようだ。これでは必要なサブルーチンがないと怒られて当然だろう。 g95 data1.f data2.f data3.f data4.f datmake.f elemdat.f graph-r.f smart-graph.f topology.f とすべてのファイルを指定してコンパイル,リンクすることが必要である。(もちろんこれ以外に必要なものがあればそれも)

Quasar0312
質問者

お礼

exeファイルが作れました。 同じ場所にファイルが有ればメインをコンパイルすると他のとまとめてコンパイルしてくれると思っていました。 全部指示しなければならないんですね。 おかげで解決しました。 ありがとうございました。

その他の回答 (1)

  • f272
  • ベストアンサー率46% (8011/17120)
回答No.1

そのソースプログラムにはちゃんとmain programがあるの? ソースプログラムのファイル名は? プログラムは固定書式かそれとも自由書式か?

Quasar0312
質問者

お礼

回答ありがとうございます。 おかげで間違いに気付くことができ、一歩前進できました。

Quasar0312
質問者

補足

ファイル名は「data1.f」です。 改めて技術書を見直したらどうやらこれはサブルーチン?らしく本体では無かったようです。 本体らしき「datmake.f」をコンパイルすると次のエラーが出ました。 C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x1fb1):undefined reference to `_elemdat_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x1fd5):undefined reference to `_topology_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x1ff5):undefined reference to `_data2_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x2015):undefined reference to `_data3_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x202e):undefined reference to `_data4_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x2040):undefined reference to `_graphr_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x2052):undefined reference to `_selem_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x2064):undefined reference to `_spoin_' C:\DOCUME~1\ユーザー名\LOCALS~1\Temp/ccTAKhwg.o:datmake.f:(.text+0x20ae):undefined reference to `_data1_' 同じフォルダには data1.f data2.f data3.f data4.f datmake.f dims.i      (計算に必要な数値?らしきものが記述) elemdat.f graph-r.f smart-graph.f  (中身にspoin,selemが記述されていた) topology.f が入ってます。 「ccTAKhwg.o」というファイルは付属していませんでしたし,ソースファイル内にも「ccTAKhwg」の記述はありませんでした。PC全体でファイル検索してもありませんでした。 Fortranというプログラムはこの本ではじめて知った物なのでまったくの素人です。そもそもプログラミングそのものも多少かじった程度でほとんど知りません。 質問の回答にはどんな情報が必要かわからないので、もしかしたら足りないのかもしれません。 プログラムの中身を見てもらった方が手っ取り早いのかもしれませんが自分で作った物ではないのでそれも出来ません。 分かりにくいかもしれませんがアドバイスをよろしくお願いします。

関連するQ&A

  • g95プログラムからg++関数を呼び出したい。

    g95プログラムからg++関数を呼び出したい。 いつもお世話になっています。 Fortran(g95)プログラムからg++関数を呼び出したいのですが、 実行できません。 どのようにすればよいか、教えて頂けませんでしょうか。 (ちなみにg77からC++を呼ぶことはできました。) ===環境設定=== OS:WindowsXP(pro) C++コンパイラ :MinGW g++ (gcc version 3.4.5) Fortranコンパイラ:MinGW g95 (gcc version 4.1.2) Fortranコンパイラ:MinGW g77 (gcc version 3.4.5) ===使用したソース=== <Fortran> ファイル名:f.f    write(*,*) "Hello Fortran World."    call funchelloc()    end ※実際には、各行先頭に半角スペース6個が入ります。 <C++> ファイル名:funcC.cpp #include <stdio.h> #include <iostream> int main(void) {   printf("hello C world!\n");   return 0; } ※見やすくするため、全角スペースでインデントしています。 ===実行手順=== >g++ -c funcC.cpp >g95 -c f.f >g95 f.o funcC.o -lstdc++ c:/mingw/lib///libstdc++.a(eh_throw.o):eh_throw.cc:(.text+0x7b): undefined reference to `_ _w32_sharedptr_unexpected' c:/mingw/lib///libstdc++.a(eh_throw.o):eh_throw.cc:(.text+0x8c): undefined reference to `_ _w32_sharedptr_terminate' c:/mingw/lib///libstdc++.a(eh_globals.o):eh_globals.cc:(.text+0x4e): undefined reference t o `__w32_sharedptr' c:/mingw/lib///libstdc++.a(eh_globals.o):eh_globals.cc:(.text+0xb9): undefined reference t o `__w32_sharedptr' c:/mingw/lib///libstdc++.a(eh_globals.o):eh_globals.cc:(.text+0x179): undefined reference to `__w32_sharedptr' c:/mingw/lib///libstdc++.a(eh_globals.o):eh_globals.cc:(.text+0x186): undefined reference to `__w32_sharedptr' c:/mingw/lib///libstdc++.a(eh_globals.o):eh_globals.cc:(.text+0x1e3): undefined reference to `__w32_sharedptr' c:/mingw/lib///libstdc++.a(eh_globals.o):eh_globals.cc:(.text+0x1ef): more undefined refer ences to `__w32_sharedptr' follow c:/mingw/lib///libstdc++.a(eh_terminate.o):eh_terminate.cc:(.text+0x67): undefined referen ce to `__w32_sharedptr_terminate' c:/mingw/lib///libstdc++.a(eh_terminate.o):eh_terminate.cc:(.text+0x97): undefined referen ce to `__w32_sharedptr_unexpected' c:/mingw/lib///libstdc++.a(eh_terminate.o):eh_terminate.cc:(.text+0xb3): undefined referen ce to `__w32_sharedptr_terminate' c:/mingw/lib///libstdc++.a(eh_terminate.o):eh_terminate.cc:(.text

  • Windowsコモンコントロールのcygwin/gccコンパイルエラー

    以下のサイトのようなWindowsコモンコントロールのプログラムをcygwin/gccコンパイルするとエラーがでます。 (sourceのサイト) http://wisdom.sakura.ne.jp/system/winapi/common/common16.html (ビルドコマンド) gcc -mwindows -mno-cygwin -o main.exe main.cpp (エラー出力) undefined reference to `_ImageList_Destroy@4' undefined reference to `_InitCommonControls@0' undefined reference to `_ImageList_Create@20' undefined reference to `_ImageList_ReplaceIcon@12' undefined reference to `_ImageList_ReplaceIcon@12' collect2: ld returned 1 exit status make: *** [main.exe] Error 1 Windowsコモンコントロールを含んだプログラムをcygwin/gccコンパイルするにはどうすればよいでしょうか? コンパイルは出来ないのでしょうか? よろしくお願いします。

  • ctime_r宣言が無いのに何故かコンパイルが通る

    MinGW 5.1.3 (Full Install) で以下のソースをコンパイルしたところ、ctime_rが何処にも宣言されていないのに何故かコンパイルが通りました。 /* a.c */ #include <time.h> int main() {  //(実行エラーにはなるはずだが、コンパイルは出来るはず)  ctime_r(NULL, NULL);  return 0; } $ gcc -v -c a.c Reading specs from C:/MyPrograms/MinGW/lib/gcc/mingw32/3.4.2/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.2 (mingw-special) cc1 -quiet -v -iprefix C:\MyPrograms\MinGW\bin\../lib/gcc/mingw32/3.4.2/ a.c -quiet -dumpbase a.c -auxbase a -version -o ./ccyAbaaa.s ignoring nonexistent directory "C:/MyPrograms/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.2/include" ignoring nonexistent directory "/mingw/mingw32/include" ignoring nonexistent directory "/mingw/include" #include "..." search starts here: #include <...> search starts here: C:/MyPrograms/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include C:/MyPrograms/MinGW/bin/../lib/gcc/mingw32/3.4.2/include End of search list. GNU C version 3.4.2 (mingw-special) (mingw32) compiled by GNU C version 3.4.2 (mingw-special). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 as -o a.o ./ccyAbaaa.s ところがリンクはエラーになります。 $ gcc -v a.o (略) ld -Bdynamic C:/MyPrograms/MinGW/lib/crt2.o C:/MyPrograms/MinGW/lib/gcc/mingw32/3.4.2/crtbegin.o -LC:/MyPrograms/MinGW/lib/gcc/mingw32/3.4.2 -LC:/MyPrograms/MinGW/lib/gcc -LC:/MyPrograms/MinGW/mingw32/lib -LC:/MyPrograms/MinGW/lib a.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt C:/MyPrograms/MinGW/lib/gcc/mingw32/3.4.2/crtend.o a.o:a.c:(.text+0x3a): undefined reference to `ctime_r' なぜコンパイルはできるんだろうと思ったのですが、やはりインクルードパスにあるヘッダ群に ctime_r らしきものはやはり見当たりません。 $ find . -type f | xargs grep "ctime_r" $ find C:/MyPrograms/MinGW/include -type f | xargs grep "ctime_r" $ find C:/MyPrograms/MinGW/lib/gcc/mingw32/3.4.2/include -type f | xargs grep "ctime_r" $ なぜコンパイルが通っているのでしょうか? [補足] このテストを行う前に GnuWin32 の libgw32c(glibc互換ライブラリで、この中のtime.hはctime_rを含む) をインストールしてコンパイル&リンクを試みましたが、やはりリンクエラーが出ていました $ gcc -I/path/to/glibc a.c -lgw32c undefined reference to `ctime_r' 今回の質問のテストを行う前にlibgw32cライブラリはアンインストールしています。

  • MinGWのg++で分割コンパイルエラー

    MinGW環境でC++の勉強を始めました。 簡単なサンプルのコンパイルをしてみたのですが、ソースファイルを一括してコンパイルすると問題ないのですが、個別にコンパイルしようとするとエラーがでてしまいまいます。 原因や対処法をご存じの方がいらっしゃいましたらご教示下さい。 一括でコンパイルすると問題なし bash-3.1$ g++ -Wl,--enable-auto-import main.cpp point.cpp -lstdc++ 個別にコンパイルしようとした場合 bash-3.1$ g++ -Wl,--enable-auto-import -o main.o main.cpp C:\DOCUME~1\user\LOCALS~1\Temp\ccZrVmLp.o:main.cpp:(.text+0x16): undefined reference to `Point::Point()' C:\DOCUME~1\user\LOCALS~1\Temp\ccZrVmLp.o:main.cpp:(.text+0x32): undefined reference to `Point::Point(int, int)' C:\DOCUME~1\user\LOCALS~1\Temp\ccZrVmLp.o:main.cpp:(.text+0x3e): undefined reference to `Point::println()' C:\DOCUME~1\user\LOCALS~1\Temp\ccZrVmLp.o:main.cpp:(.text+0x4a): undefined reference to `Point::println()' collect2: ld returned 1 exit status ※ -Wl,--enable-auto-importは、他の警告を消すために入れました、無くても質問の問題に変化はありませんでした。 サンプルソース ---main.cpp--- #include<iostream> #include "point.h" using namespace std; int main(){ Point p1,p2(4,5); p1.println(); p2.println(); return 0; } ----------- ---point.h--- class Point { private: int x, y; static int count; public: Point(); Point( int, int ); void set( int, int ); void println(); }; ------------- ---point.cpp--- #include<iostream> #include"point.h" using namespace std; int Point::count; Point::Point(){ this->x = this->y = 0; ++count; } Point::Point(int ax, int ay){ this->x = ax; this->y = ay; ++count; } void Point::set( int ax, int ay ){ this->x = ax; this->y = ay; } void Point::println(){ cout << "Point(" << x << "," << y << ")" << endl; } ----------- bash-3.1$ g++ -v Using built-in specs. COLLECT_GCC=D:\MinGW\bin\g++.exe COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.5.0/configure --enable-languages=c,c++,ada,fortran,obj c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r untime-libs --disable-werror --build=mingw32 --pref

  • MPIを用いたFortranプログラムのコンパイル エラー

    前回(http://okwave.jp/kotaeru.php3?q=2361804)に続いてエラーで困っています。 バンド構造などをシミュレーションできるソフトPHASE ver. 4.00を下のサイトからダウンロードし、makeしようとしたのですが出来ません。 http://www.fsis.iis.u-tokyo.ac.jp/result/software/? OS Fedora Core 5 Linux Fortranコンパイラ intel Fortran Compiler 9.0 for Linux Cコンパイラ gcc MPI mpich-1.2.7 PHASEはMPIを使ったFortranのプログラムで、オブジェクトファイルは作られたのですが、最後のリンクのところで下のようなエラーが出てしまいます。 /opt/intel/fc/9.0/lib/libifcore.a(for_open_proc.o): In function `for__compute_filename.':./src/libfor/for_open_proc.c:(.text+0xc14): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /opt/intel/mpich/lib/libmpich.a(p4_secure.o): In function `start_slave':p4_secure.c:(.text+0x80): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking この後に次のような/usr/lib/libc.a ... undefined reference to ...という形のエラーが43行あります。 /usr/lib/libc.a(iofclose.o):(.eh_frame+0x121): undefined reference to `__gcc_personality_v0' /usr/lib/libc.a(iofflush.o): In function `fflush': undefined reference to `_Unwind_Resume' どうやらglibcが関係しているような気がするのですが、自分ではどうすればよいのか分かりません。 エラーの意味とその対処法をお願いします。

  • コンパイル時のエラー

    UNIXでサーバー、クライアントのCプログラミングをテキストどおりに書いてコンパイルしたのですが、以下のエラーが出ます。gcc, ccでコンパイルすると以下のようになるのですが、これはどういうことなのでしょうか?何が原因なのでしょうか?よろしくお願いいたします。 gcc unix_server.c /var/tmp/ccvpay1f1.o: In function `main': /var/tmp/ccvpay1f1.o(.text+0x8c): undefined reference to `socket' /var/tmp/ccvpay1f1.o(.text+0x104): undefined reference to `unllnk' /var/tmp/ccvpay1f1.o(.text+0x118): undefined reference to `bind' /var/tmp/ccvpay1f1.o(.text+0x150): undefined reference to `listen' /var/tmp/ccvpay1f1.o(.text+0x1a8): undefined reference to `accept' cc unix_server.c ld: /usr/lib/cmplrs/cc/crtn.o: Error: Unresolved: rindex socket bzero bcopy unllnk bind listen accept

  • Fedora7で libpthread.aをリンクすると、コンパイルエラーになってしまいました

    はじめまして、 Fedora7でマルチスレッドのプログラムをビルドし、 libpthread.aをリンクしたところ、コンパイルエラーになってしまいました。 Fedora4~5では、起きなかったため、 libpthread.aのバージョン変更により、問題がおきたのではないかと思っております。 libpthreadのバージョンは2.6-4で [root@localhost]# rpm -qf /usr/lib/libpthread.a glibc-devel-2.6-4 glibc-develをダウングレードしようと思いましたが、 glibc-commonの依存関係が厳しく、forceしてもうまくいきませんでした。 makeのエラーは下記の内容で、main.cppにlibpthread.aをリンクしてビルドすると、 libpthread.a内で使ってる関数がundefinedでこけてしまいます。 ネットを検索して、pthreadのについて書かれているサイトを読みましたが、あまり見つからずどうして良いやらわからない状態です。 ttp://uyota.asablo.jp/blog/2007/01/27/1142762 Fedora7でlibpthread.aをリンクし、 undefinedを回避して、うまくビルドする方法をご存知でしたら、お教えください。 ---------------- エラー内容 [root@localhost test]# make make clean make[1]: ディレクトリ `/src/test' に入ります rm Main.o removed `Main.o' make[1]: ディレクトリ `/src/test' から出ます make test make[1]: ディレクトリ `/src/test' に入ります g++ -c -o Main.o Main.cpp g++ -o test Main.o /usr/lib/libpthread.a -lpthread /usr/lib/libpthread.a(pthread_create.o): In function `pthread_create': (.text+0xca3): undefined reference to `_dl_stack_flags' /usr/lib/libpthread.a(pthread_create.o): In function `pthread_create': (.text+0x1126): undefined reference to `_dl_stack_flags' /usr/lib/libpthread.a(ptw-accept.o): In function `accept': (.text+0x23): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-accept.o): In function `accept': (.text+0x52): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-send.o): In function `__send': (.text+0x23): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-send.o): In function `__send': (.text+0x52): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-pause.o): In function `__pause_nocancel': (.text+0x18): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-pause.o):(.text+0x3b): more undefined references to `__syscall_error' follow /usr/lib/libpthread.a(init.o): In function `__pthread_initialize_minimal': (.text+0x16c): undefined reference to `__libc_setup_tls' /usr/lib/libpthread.a(init.o): In function `__pthread_initialize_minimal': (.text+0x328): undefined reference to `_dl_init_static_tls' /usr/lib/libpthread.a(init.o): In function `__pthread_initialize_minimal': (.text+0x34d): undefined reference to `_dl_wait_lookup_done' /usr/lib/libpthread.a(ptw-read.o): In function `__read_nocancel': (.text+0x26): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-read.o): In function `__read_nocancel': (.text+0x56): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-open.o): In function `__open_nocancel': (.text+0x26): undefined reference to `__syscall_error' /usr/lib/libpthread.a(ptw-open.o): In function `__open_nocancel': (.text+0x56): undefined reference to `__syscall_error' /usr/lib/libpthread.a(sigaction.o): In function `__libc_sigaction': (.text+0x60): undefined reference to `_dl_sysinfo_dso' /usr/lib/libpthread.a(sigaction.o): In function `sigaction': (.text+0x19a): undefined reference to `_dl_sysinfo_dso' collect2: ld はステータス 1 で終了しました make[1]: *** [test] エラー 1 make[1]: ディレクトリ `/src/test' から出ます make: *** [build] エラー 2 -- [root@localhost]# cat /etc/ld.so.conf /usr/lib include ld.so.conf.d/*.conf

  • WinGWのC++コンパイラの設定について

    WinGWのC++コンパイラの設定について いつもお世話になっています。 C++ソースをコンパイルできなくて困っています。 原因は何なのでしょうか。 >g++ SampleC.cc Info: resolving __fmode by linking to __imp___fmode (auto-import) Info: resolving __fpreset by linking to __imp___fpreset (auto-import) C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: warning: a uto-importing has been activated without --enable-auto-import specified on the c ommand line. This should work unless it involves constant data structures referencing symbols from auto-imported DLLs. /mingw/lib/crt2.o:crt1.c:(.text+0x37): undefined reference to `__cpu_features_in it' /mingw/lib/crt2.o:crt1.c:(.text+0x89): undefined reference to `_pei386_runtime_r elocator' fu000001.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname' fu000002.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname' fu000004.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname' fu000005.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o:(.idata$4+0x0): undefined reference to `_nm___fmode' nmth000003.o:(.idata$4+0x0): undefined reference to `_nm___fpreset' collect2: ld returned 1 exit status ソース内容 /* hello world program */ #include <stdio.h> int main(void) { printf("hello world!\n"); return 0; }

  • FFTWでコンパイルができません。

    FFTWでコンパイルができません。 http://www32.atwiki.jp/amaeda/pages/12.html ↑のソースファイルをコンパイルすると以下のエラーが出ます。↓ >gcc -o fftw1D fftw1D.c -lfftw3 -lm (MinGW) c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot find -lfftw3 collect2: ld returned 1 exit status FFTWはわからないので、教えてください。

  • コンパイルエラーの意味

    最近プログラミングの勉強を始めた初心者です。作成したプログラムをコンパイルしたところ以下のようなエラーが出ましたがなんのエラーなのかまったく分かりません… 初歩的な質問で申し訳ありませんが教えてください! /user/lib/libcygwin.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to'WinMain@16' collect2: ld returned 1 exit status

専門家に質問してみよう