In the past two days, I want to see how the legendary iPhone application is made.
Taking this idea as a preliminary attempt, the first problem encountered was the establishment of the Development Environment on Windows. After all, it was just fun to buy a Mac and it was too impulsive. After all, there was already a local database, I still don't know how long the heat will last.
The establishment of Windows-based objective-C development and running environment can use a series of components provided by gunstep.
Four software packages are mainly used:
Gnustep msys System
Gnustep Core
Gnustep devel
Cairo backend
Gunstep official website http://wwwmain.gnustep.org/experience/Windows.html
The installation sequence is also as follows. To separate it from OS, I installed the gunstep package to D:/gnustep.
Then we can write a hello World program to test whether helloworld. m is set up in the environment.
# Include <stdio. h> <br/> int main (void) <br/>{< br/> printf ("Hello world! "); <Br/> return 0; <br/>}< br/>
Below we compile and run helloworld. m respectively (save path D:/iworkspace)
Compile
1. Choose Start> All Programs> gunstep> shell to pop up mingw32 :~ Window
In this shell, general Linux commands should be supported. I tried a few commands, which are easy to use.
$ Pwd
/Home/Administrator: the installation directory D:/gnustep/home/Administrator
2. Go to the directory of our helloworld. M file.
$ Cd d:/iworkspace
$ Ls
Helloworld. m
3. Enter the GCC command to compile the code.
$ Gcc-O helloworld. m
PS: The-O parameter is used to specify the name of the program to be generated.
$ Ls
Helloworld.exe helloworld. m
Helloworld.exe is the compiled executable file.
Run
Helloworld.exe is also executed in the shellwindow
$./Helloworld
Hello world!
So far, our initial goal has been completed and the environment has been set up successfully.
01:25:26