Fdfs version is 5.03
1. First create a C + + project in Eclipse named fastdfs_v5.03
2, the Fastdfs source extracted after the copy to the newly created project directory, and then in the Ecipse refresh under the project can see the new copy of the file as follows:
3. Modify the make.sh in the project directory, add the location to the absolute directory, and remove the compilation optimization (so that the program executes in sequence)
1) Add two lines at the beginning of the make.sh
cd/users/bigfish/documents/workspace/c++/fastdfs_v5.03 (modified to absolute path) pwd
2) Removal of compilation optimizations
cflags= '-wall-d_file_offset_bits=64-d_gnu_source ' if ["$DEBUG _flag" = "1"]; then cflags= "$CFLAGS-G-o0-ddebug_flag" else cflags= "$CFLAGS-o3" fi---Add a 0 after the third row-O
4, modify the code in the debug mode of operation do not enter the daemon mode
1) Modify the Storage/fdfs_storaged.c file as follows:
#ifndef Debug_flagdaemon_init (False), #endif-The red part is added, and if it is DEBUG, do not enter daemon mode to run
5. Configuring Eclipse
1) Select the project Properties C + + Build page, remove the option to use the Default Build command, enter the compile command in the build command text box
sh/users/bigfish/documents/workspace/c++/fastdfs_v5.03/make.sh--path according to its own settings
2) Select the project properties C + + general-> Paths and Symbols---> includes and GNU C add the paths included at compile time
/users/bigfish/documents/workspace/c++/fastdfs_v5.03/storage/fdht_client/users/bigfish/documents/workspace/c++ /fastdfs_v5.03/tracker/users/bigfish/documents/workspace/c++/fastdfs_v5.03/client/users/bigfish/documents/ workspace/c++/fastdfs_v5.03/storage/users/bigfish/documents/workspace/c++/fastdfs_v5.03/common--according to its own path setting
3) Select Project Properties Run/debug Settings Create a new Run command
Enter executed programs in main---C + + Applications text box
/users/bigfish/documents/workspace/c++/fastdfs_v5.03/storage/fdfs_storaged
Enter startup parameters in Arguments---Program Arguments text box
/users/bigfish/documents/workspace/c++/fastdfs_v5.03/conf/storage.conf
All right, finish it.