gccでコンパイルする際の「c」言語に問題があります。
- 私はWindowsXP内で(gcc-core、gcc-g ++、gdb、makeおよびその他のサポートパッケージ)で「Cygwin」を使用しています。
- このパス「C:\Cygwin\」に「Cygwin」をインストールしました。
- 私のホームディレクトリ: "C:\ Cygwin \ home \ Bhanu Pratap"
- 「C:\ Cygwin \ home\BhanuPratap」の下にある作業ディレクトリ内に「cs50.h」と「cs50.c」をコピーしました。
これは私のhello.cファイル内のコードです
#include "cs50.h"
#include <stdio.h>
int
main(void){
string name = "David";
printf("O hai, %s!\n", name);
}
これはbash(Cygwin)の下でのコマンドです
gcc -o hello hello.c -lc50
このエラーが発生します:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/id: cannot find -lcs50
collect2: Id returned 1 exit status
私が間違っているところを助けてください?