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:

  1. add cygwin path in environment, e.g. c:\cygwin\bin\
  2. add path mapping cygwin drives in window -> preferences -> c/c++ -> debug -> source lookup path, e.g. map \cygdrive\c c:\.

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -