2016-09-03 12 views
1

NetbeansでSSH経由でWiringPiライブラリを使用するにはどうすればよいですか?私は単純なHelloWorldプログラムを実行すると動作します。NetbeansでSSH経由でWiringPi Cライブラリを使用

これは、出力メッセージです:

Copying project files to /root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64 at [email protected] 
Building project files list... 
Checking directory structure... 
Checking previously uploaded files... 
Checking links... 
Uploading changed files: 
    Zipping 10 changed files... 
    Uploading zip to [email protected] 
    Unzipping changed files... 
Checking exec permissions... 
Uploading changed files finished successfully. 

cd '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED' 
/usr/bin/make -f Makefile CONF=Debug 
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf 
make[1]: Entering directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED' 
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/blinkingled 
make[2]: Entering directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED' 
mkdir -p build/Debug/GNU-Linux 
rm -f "build/Debug/GNU-Linux/main.o.d" 
gcc -c -g -std=c11 -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.c 
mkdir -p dist/Debug/GNU-Linux 
gcc  -o dist/Debug/GNU-Linux/blinkingled build/Debug/GNU-Linux/main.o 
build/Debug/GNU-Linux/main.o: In function `main': 
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:24: undefined reference to `wiringPiSetup' 
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:29: undefined reference to `pinMode' 
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:32: undefined reference to `digitalWrite' 
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:34: undefined reference to `delay' 
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:35: undefined reference to `digitalWrite' 
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:37: undefined reference to `delay' 
collect2: error: ld returned 1 exit status 
nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/GNU-Linux/blinkingled' failed 
make[2]: *** [dist/Debug/GNU-Linux/blinkingled] Error 1 
make[2]: Leaving directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED' 
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed 
make[1]: *** [.build-conf] Error 2 
make[1]: Leaving directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED' 
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed 
make: *** [.build-impl] Error 2 

答えて

2

は、これはかなり古い記事ですが、私は同じ問題を持っていたと私はので、もし私が今、解決策を下に書いて、それを解決したので、 )

コンパイルコマンドにいくつかのパラメータ、特にバイナリへのパスを追加し、-lwiringpiオプションを追加するだけです。

これをNetBeansで実行するには、プロジェクトを右クリックしてプロパティを右クリックします。そこから、ビルド - > Cコンパイラ。今

、音声追加オプションを見つけ、それを開いて次のようにコピー&ペースト:/

-Iは/ usr/localは、-L/usr/local/libディレクトリ-lwiringPiが含ま

(ありますあなたがライブラリの場所を変更した場合、配線の標準インストールへのパスは、それに応じてパスを変更します)

これは少なくとも私にとってはうまくいくはずです。

さようなら

EDIT、それが誰かを助けたホープ:

私はあなたがそうでなければwiringPiが動作しない、rootユーザーとしてsshをしなければならないことを追加するのを忘れ。

あなたがしなければならないことについては

passwdのルート

sudoのナノは、/ etc/ssh/sshd_config

をrootのパスワードを設定して、はい

、再起動するのPermitRootLoginを変更するには

関連する問題