C/C ++ Compiler
Gcc
Pre-processing, compiling, assembly, and linking)
Common commands:
G ++-compile C ++
Gcc-compile C
-I. Find the header file.
E. g ++ Foo. C-I/home/xiaowp/include-O foo
-L find the library file
E. g ++ Foo. C-L/home/xiaowp/lib-lfoo-O foo
Reference
Http://www.linuxdby.com/articlesdisplay.php? Newsid= 234
Http://www.linuxdby.com/articlesdisplay.php? Newsid= 235
Http://tech.ccidnet.com/pub/article/c309_a102603_p1.html
GDB
Make
Mingw-- Implementation of GCC in window
Depvelopement Tool
Eclipse CDT
Create a managed make C ++ Project
Generate makefile automatically. in C/C ++ build, Tool Setting can select to modify many G ++ parameters.
Generate so
G ++ test. cpp-FPIC-shared-O libtest. So
If it is better to generate a token as dllin windows, the ld.exe cannot find ltest error will be reported when the link is closed. Stupid.
Reference
Http://bbs.chinaunix.net/forum/viewtopic.php? T = 373418
Reference so
Specify
C:/Java/Eclipse/workspace/testmanage> G ++ testm. cpp-I c:/Java/Eclipse/workspace/
Testso-l c:/Java/Eclipse/workspace/testso-llibtest. So-O testm
Specify
In C/C ++ build, Tool Setting sets the header file of gcc C ++ compiler-> directories and the library file of gcc C ++ linker --> libaries respectively.
You also need to set the path
Window: set the path and add the So path. Otherwise, the LD cannot be found.
Linux: LD_LIBRARY_PATH
Window: When the EXE file is successfully generated, copy so to the current directory of the exe. Execution successful
Reference
Http://sourceforge.net/mailarchive/forum.php? Forum_id = 5119 & max_rows = 25 & Style = nested & viewmonth = 200406
Use C functions in C ++
E. g extern int Hello ();