怎麼在XP底下建構Linux C的開發環境? |
尚未結案
|
nise777
一般會員 發表:5 回覆:6 積分:2 註冊:2004-10-29 發送簡訊給我 |
大家好
小弟現在想寫一簡單的hello程式
一端linux一端BCB,它們能互相say hello
可是我沒有兩台電腦
之前用VMware-workstation灌了Linux
因為等級差了些,電腦跑不太動
請問大大們,有其他建構開發環境的方法嗎? <註> 更明白一點的說
小弟買了一本金禾出版的Linux C/C++網路程式設計
書本的範例都有include
|
chris_shieh
高階會員 發表:46 回覆:308 積分:240 註冊:2004-04-26 發送簡訊給我 |
try Cygwin
http://cygwin.com/
你可以利用Cygwin開發程式
它提供模擬Linux API 的功能
但是程式如果需要拿到Linux 環境下執行
你還是必須重新在Linux 下重新Compile
因為他畢竟只是模擬而已 What Is Cygwin?
Cygwin is a Linux-like environment for Windows. It consists of two parts:
A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
A collection of tools, which provide Linux look and feel.
The Cygwin DLL works with all non-beta, non "release candidate", ix86 32 bit versions of Windows since Windows 95, with the exception of Windows CE. What Isn't Cygwin?
Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want to get it running on Windows.
Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality. Compatibility with ANSI
The following functions are compatible with ANSI: stdio
clearerr, fclose, feof, ferror, fflush, fgetc, fgetpos, fgets, fopen, fprintf, fputc, fputs, fread, freopen, fscanf, fseek, fsetpos, ftell, fwrite, getc, getchar, gets, perror, printf, putc, putchar, puts, remove, rename, rewind, scanf, setbuf, setvbuf, sprintf, sscanf, tmpfile, tmpnam, vfprintf, ungetc, vprintf, vsprintf, string
memchr, memcmp, memcpy, memmove, memset, strcat, strchr, strcmp, strcoll, strcpy, strcspn, strerror, strlen, strncat, strncmp, strncpy, strpbrk, strrchr, strspn, strstr, strtok, strxfrm stdlib
abort, abs, assert, atexit, atof, atoi, atol, bsearch, calloc, div, exit, free, getenv, labs, ldiv, longjmp, malloc, mblen, mbstowcs, mbtowc, qsort, rand, realloc, setjmp, srand, strtod, strtol, strtoul, system, wcstombs, wctomb time
asctime, gmtime, localtime, time, clock, ctime, difftime, mktime, strftime signals
raise, signal ctype
isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper math
acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod, frexp, ldexp, log, log10, modf, pow, sin, sinh, sqrt, tan, tanh misc
localeconv, setlocale, va_arg, va_end, va_start Compatibility with POSIX.1
The following functions are compatible with POSIX.1: Process Primitives (Section 3)
fork, execl, execle, execlp, execv, execve, execvp, wait, waitpid, _exit, kill, sigemptyset, sigfillset, sigaddset, sigdelset, sigismember, sigaction, pthread_sigmask, sigprocmask, sigpending, sigsuspend, alarm, pause, sleep, pthread_kill, pthread_sigmask Process Environment (Section 4)
getpid, getppid, getuid, geteuid, getgid, getegid, setuid, setgid, getgroups, getlogin, getpgrp, setsid, setpgid, uname, time, times, getenv, ctermid, ttyname, isatty, sysconf Files and Directories (Section 5)
opendir, readdir, rewinddir, closedir, chdir, getcwd, open, creat, umask, link, mkdir, unlink, rmdir, rename, stat, fstat, access, chmod, fchmod, chown, utime, ftruncate, pathconf, fpathconf Input and Output Primitives (Section 6)
pipe, dup, dup2, close, read, write, fcntl, lseek, fsync Device- and Class-Specific Functions (Section 7)
cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed, tcdrain, tcflow, tcflush, tcgetattr, tcgetpgrp, tcsendbreak, tcsetattr, tcsetpgrp Language-Specific Services for the C Programming Language (Section 8)
abort, exit, fclose, fdopen, fflush, fgetc, fgets, fileno, fopen, fprintf, fputc, fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar, gets, perror, printf, putc, putchar, puts, remove, rewind, scanf, setlocale, siglongjmp, sigsetjmp, tmpfile, tmpnam, tzset System Databases (Section 9)
getgrgid, getgrnam, getpwnam, getpwuid Synchronization (Section 11)
sem_init, sem_destroy, sem_wait, sem_trywait, sem_post, pthread_mutex_init, pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock Memory Management (Section 12)
mmap, mprotect, msync, munmap Thread Management (Section 16)
pthread_attr_init, pthread_attr_destroy, pthread_attr_setstacksize, pthread_attr_getstacksize, pthread_create, pthread_exit, pthread_self, pthread_equal Thread-Specific Data Functions (Section 17)
pthread_key_create, pthread_setspecific, pthread_getspecific, pthread_key_delete
|
nise777
一般會員 發表:5 回覆:6 積分:2 註冊:2004-10-29 發送簡訊給我 |
|
azi
一般會員 發表:10 回覆:39 積分:9 註冊:2002-05-27 發送簡訊給我 |
我看了這篇之後蠻有興趣,去下載安裝,也看了使用說明文件,想請教一下,
我們要如何把寫好的程式碼copy過去?
他也沒有 vi,我們除了用echo之外可以用什麼編輯文字?
引言: try Cygwin http://cygwin.com/ 你可以利用Cygwin開發程式 它提供模擬Linux API 的功能 但是程式如果需要拿到Linux 環境下執行 你還是必須重新在Linux 下重新Compile 因為他畢竟只是模擬而已--- Azi
------
--- Azi |
chris_shieh
高階會員 發表:46 回覆:308 積分:240 註冊:2004-04-26 發送簡訊給我 |
引言: 我看了這篇之後蠻有興趣,去下載安裝,也看了使用說明文件,想請教一下, 我們要如何把寫好的程式碼copy過去? 他也沒有 vi,我們除了用echo之外可以用什麼編輯文字?你還是可以直接在Windows 下面存取該cygwin 目錄 所以可以把你的檔案放過去 就可以直接在cygwin 模擬Linux 環境下讀取引言: try Cygwin http://cygwin.com/ 你可以利用Cygwin開發程式 它提供模擬Linux API 的功能 但是程式如果需要拿到Linux 環境下執行 你還是必須重新在Linux 下重新Compile 因為他畢竟只是模擬而已--- Azi |
azi
一般會員 發表:10 回覆:39 積分:9 註冊:2002-05-27 發送簡訊給我 |
|
azi
一般會員 發表:10 回覆:39 積分:9 註冊:2002-05-27 發送簡訊給我 |
|
nise777
一般會員 發表:5 回覆:6 積分:2 註冊:2004-10-29 發送簡訊給我 |
引言: 再作個補充說明:我有去查Cygwin User's Guide。 在Chapter 4有提到Programming with Cygwin以及GCC。 不過我實際執行gcc卻也是'command not found'!! 是否哪裡還要設定? 請有經驗的仁兄指點一二。我的可以ㄝ 用記事本把程式打好後,存成hello.c(放C槽內) 然後 gcc -c c:/hello.c gcc -o hello c:/hello.c 之後在C:/cygwin/home/你的電腦名稱 那個資料夾裡就有執行檔了ㄝ 其實我還不是很上手< > 也不是很懂 討論討論啦 < >引言: 在請教一下:我安裝了cygwin,不過他似乎沒有C 的Compiler。 還是有其他的版本? --- Azi--- Azi |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |