Saturday, 6 October 2007

Eclipse Setting for C/C++

Eclipse for C/C++ enables a lot of features personalized.

I am quite used to use STANDARD MAKE Project, within which I can decide when and how to compile the C/C++ code.

The fig. is what favorite setting for C/C++ make project, the essential is:

g++ ${resource_name} -g -o ${project_name}.

Here, -g for g++ is debug information option, it can be omitted. I prefer Cygwin as default provider of compilers, when you finish Cygwin, everything is done, much convenient for use compared with Mingw.
Right click in the code file you are working on, select "Create Make Target", you will find that everything is there, you don't need to modify anything in the setting. Just run the new created Build command by double click from the view of Make Project from Windows>Show View, here we are, your executable comes out.

The amazing thing is not only for C/C++, even more, it can be used in composing latex stuff. When you create the new project, latex one but you want to make it in the C/C++ Standard Make environment, modify the setting command to:

latex ${resource_name}
or pdflatex ${resource_name}

Now when you create new Build patch from your file, you can decide when and how your compile the latex files. Very personalized.

No comments:

My photo
London, United Kingdom

Facebook & Twitter