[ eclipse c cpp ] มาเขียน cpp ด้วย eclipse กันเถอะ how to build, compile, add external library path, set environment variable
You can get "Eclipse IDE for C/C++ Developers" from Eclipse download
Create New File
New > Source File
Build
build (Ctrl+B)
add external library (-l)
set environment variable
eclipse tips
- 'open declaration (F3)' in eclipse is 'go to definition' in virtual studio
- eclipse comment multiple line highlight the line and "ctrl + /" uncomment use the same shortkey "ctrl + /"
#include <stdio.h>
int main(){
printf("Hello");
}
Trick : exclude from build
If you have multiple main() file you may wanna exclude some file from build, otherwise you will got an error "multiple definition of main".
right click at the file that you wanna exclude > Properties
related topic : create c++ shared library in eclipse
see other eclipse topic
right click at the file that you wanna exclude > Properties
related topic : create c++ shared library in eclipse
see other eclipse topic
ความคิดเห็น