I am using Sshsecureshellclient-3[1].2.9.exe for Linux C programming on Windows XP-SP2, let's talk about how to use this software first:
Install Sshsecureshellclient-3[1].2.9.exe locally, create a username and password on the server, and then open the SSH Secure Shell client,enter key or click Quick Connect to enter the target (I don't understand , barking) IP, enter user name, enter key, enter password. Now you should have entered Linux, where all the Linux commands can be used, beginners may want to knock a few common commands to try!
From the simplest hello word to the more complex library references, of course how to write generic makefile is limited to the level, without discussion.
1, Hello Word
1), the procedure:
#include <stdio.h>
int main (void)
{
printf ("Hello, word\n");
return 0;
}
Name is HELLOWORD.C
2), Operation:
Go into the SSH Secure Shell Client and use the CD path name to enter the directory where your HELLOWORD.C resides,
Then Gcc-o Helloword HELLOWORD.C, the following will show the compilation of the situation, there are errors and warnings will be listed, no will not appear and return to the directory you just entered, to run the input./helloword, so you'll see Hello, word
2, compile multiple. C and. h Files of the program, then need to write makefile
1), the procedure:
#include "mytool1.h"
#include "mytool2.h"
int main(int argc,char **argv)
{
mytool1_print("hello");
mytool2_print("hello");
}
Name is MAIN.C
#include "mytool1.h"
void mytool1_print(char *print_str)
{
printf("This is mytool1 print %s\n",print_str);
}
Name is mytool1.c
#ifndef _MYTOOL_1_H
#define _MYTOOL_1_H
void mytool1_print(char *print_str);
#endif
Name is Mytool1.h
#include "mytool2.h"
void mytool2_print(char *print_str)
{
printf("This is mytool2 print %s\n",print_str);
}
Name is mytool2.c
#ifndef _MYTOOL_2_H
#define _MYTOOL_2_H
void mytool2_print(char *print_str);
#endif
Name is Mytool2.h