c++ - Run doesn't work in Eclipse with Cygwin toolchain -
i trying configure eclipse use cygwin toolchain. wrote simple c++ program check have setup things correctly.
#include <fstream> using namespace std; int main() { ofstream fout("output.txt"); fout << "hi" << endl; fout.close(); return 0; }
the build button compiles program , generates executable , can run it.
however when click on run button in eclipse doesn't run program. rather confused since debug button runs program correctly (so issue should not not finding cygwin1.dll).
the run button works if set toolchain mingw.
i using eclipse kepler service release 1 , cygwin date.
i search bit couldn't find answer how fix this. suggestion might cause of problem?
the following solved problem me:
- add cygwin
path
in environment, e.g.c:\cygwin\bin\
- add path mapping cygwin drives in
window -> preferences -> c/c++ -> debug -> source lookup path
, e.g. map\cygdrive\c
c:\
.
Comments
Post a Comment