18,772
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;
}
$ g++ -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/i686-pc-cygwin" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/backward" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include-fixed" -I"E:\cygwin64/usr/include" -I"E:\cygwin64/usr/include/w32api" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/hello1.d" -MT"src/hello1.d" -o "src/hello1.o" "../src/hello1.cpp"
E:/cygwin64/lib/gcc/x86_64-pc-cygwin/4.9.3/cc1plus.exe: error while loading shared libraries: cygisl-10.dll: cannot open shared object file: No such file or directory
make all
Building file: ../src/hello1.cpp
Invoking: Cygwin C++ Compiler
g++ -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/i686-pc-cygwin" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/backward" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include-fixed" -I"E:\cygwin64/usr/include" -I"E:\cygwin64/usr/include/w32api" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/hello1.d" -MT"src/hello1.d" -o "src/hello1.o" "../src/hello1.cpp"
src/subdir.mk:18: recipe for target 'src/hello1.o' failed
make: *** [src/hello1.o] Error 1
我搜索了一下hello1.o没有,hello1.obj就有,但是文件不让编辑,编辑了,一build又变了回来,怎么办?
subdir.mk是eclipse自己产生的。如下:
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../src/hello1.cpp
OBJS += \
./src/hello1.o
CPP_DEPS += \
./src/hello1.d
# Each subdirectory must supply rules for building sources it contributes
src/%.o: ../src/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cygwin C++ Compiler'
g++ -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/i686-pc-cygwin" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/backward" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include" -I"E:\cygwin64/lib/gcc/i686-pc-cygwin/4.9.2/include-fixed" -I"E:\cygwin64/usr/include" -I"E:\cygwin64/usr/include/w32api" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '