私はWindows 7 OSを持っています。PETSc Web ページの指示に従いました。VS 2005 のコマンド プロンプトで、次のコマンドを使用して cygwin を開き、PETSc をインストールしました。
./configure --with-cc='win32fe cl' --with-fc=0 --with-mpi=0 --download-f2cblaslapack
Web ページから次の例を実行しようとしました。
cd src/ksp/ksp/examples/tutorials
make ex2
ex2.c は ac プログラム コードです。次のエラーが表示されます。
$ make ex2
makefile:18: /conf/variables: No such file or directory
makefile:19: /conf/rules: No such file or directory
makefile:1151: /conf/test: No such file or directory
make: *** No rule to make target `/conf/test'. Stop.
これは何が原因ですか?
(そしてもっと重要なこと)どうすれば修正できますか?
*編集: 一般的な回答も使用できます。なぜなら、現時点では Google で何を検索すればよいかさえわからず、すべてについて PETSc サポートに連絡するだけでは気が進まないからです。
Ubuntuで作業することにしました。それでは、これが契約です。インストール後、次のように書きます。
gcc -I$PETSC_DIR/include -L$PETSC_DIR/$PETSC_ARCH/lib -libpetsc ex2
コマンドラインで。エラーメッセージが表示されます:
/usr/bin/ld: -libpetsc ex2 が見つかりません: 関数
_start': (.text+0x1bc4): multiple definition of
_start 内に /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o :(.text+0x0): ここで最初に定義 ex2: 関数_fini': (.fini+0x0): multiple definition of
_fini 内' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o :(.fini+0x0): 最初にここで定義 ex2:(.rodata+0x0):_IO_stdin_used' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o:(.rodata.cst4+0x0): first defined here ex2: In function
__data_start' の複数定義: (.data+0x0):__data_start' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o:(.data+0x0): first defined here ex2: In function
__data_start' の複数定義: (.data+0x8):__dso_handle' /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o:(.data+0x0): first defined here ex2: In function
_initの複数定義': (.init+0x0): `_init' の複数定義 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o:( .init+0x0): ここで最初に定義された collect2: ld が 1 つの終了ステータスを返しました