C++で単純なhello worldアプリケーションを作成しますが、コンパイルは行いません。私は、ファイルmain.cpp
とMakefile
とのフォルダC:\WiiGames\e3\
を持っています。私のメイクファイルは、次のとおりです。MinGWはコンパイルされません。エラー1
build: main.cpp
C:/MinGW/bin/g++.exe main.cpp -o e3.exe
私のエラーは、次のとおりです。
C:\WiiGames\e3>make build
C:/MinGW/bin/g++.exe main.cpp -o e3.exe
make: *** [build] Error 1
C:\WiiGames\e3>
任意の助けいただければ幸いです。
マイコード:
#include <iostream>
#include <stdio.h>
#include <string>
#include <cmath>
#include <cstdlib>
#include <time.h>
int main() {
printf("Hello World!");
}
グラム++ -v:あなたは直接コマンドライン上g++.exe main.cpp -o e3.exe
を実行するとどうなり
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)
コードを入力した方が簡単に答えることができます。 – iehrlich
私はコードを追加しました。 –