unfortunately it does not work any more:
old:
Code: Select all
g++ -Wall -pthread -o "%e" "%f" -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -lshapes -L/opt/vc/lib -lOpenVG -lEGL -lwiringPi -lrt -lArduiPi_OLED $(pkg-config --cflags --libs opencv) $(pkg-config gtk+-2.0 --cflags --libs) -I/gtkiostream-1.5.0/include
(don't remember though what this -lEGL thing once was from)
new:
Code: Select all
g++ -Wall -pthread -o "%e" "%f" -I/opt/vc/include -lwiringPi -lrt -lArduiPi_OLED $(pkg-config --cflags --libs opencv) $(pkg-config gtk+-2.0 --cflags --libs) -I/gtkiostream-1.5.0/include
Code: Select all
g++ -Wall -pthread -o "hellovg_paeryn" "hellovg_paeryn.c" -I/opt/vc/include -lwiringPi -lrt -lArduiPi_OLED $(pkg-config --cflags --libs opencv) $(pkg-config gtk+-2.0 --cflags --libs) -I/gtkiostream-1.5.0/include (im Verzeichnis: /home/pi/programs/graphprogs)
hellovg_paeryn.c: In function ‘int main()’:
hellovg_paeryn.c:15:5: warning: ‘void initWindowSize(int32_t, int32_t, int32_t, int32_t)’ is deprecated (declared at /usr/include/shapes.h:83) [-Wdeprecated-declarations]
initWindowSize(20, 20, 600, 360);
^
hellovg_paeryn.c:15:36: warning: ‘void initWindowSize(int32_t, int32_t, int32_t, int32_t)’ is deprecated (declared at /usr/include/shapes.h:83) [-Wdeprecated-declarations]
initWindowSize(20, 20, 600, 360);
^
hellovg_paeryn.c:16:5: warning: ‘bool init(int32_t*, int32_t*)’ is deprecated (declared at /usr/include/shapes.h:44) [-Wdeprecated-declarations]
init(&width, &height); // Graphics initialization
^
hellovg_paeryn.c:16:25: warning: ‘bool init(int32_t*, int32_t*)’ is deprecated (declared at /usr/include/shapes.h:44) [-Wdeprecated-declarations]
init(&width, &height); // Graphics initialization
^
hellovg_paeryn.c:29:5: warning: ‘void finish()’ is deprecated (declared at /usr/include/shapes.h:45) [-Wdeprecated-declarations]
finish(); // Graphics cleanup
^
hellovg_paeryn.c:29:12: warning: ‘void finish()’ is deprecated (declared at /usr/include/shapes.h:45) [-Wdeprecated-declarations]
finish(); // Graphics cleanup
^
/tmp/ccCPUdLy.o: In function `main':
hellovg_paeryn.c:(.text+0x1c): undefined reference to `initWindowSize'
hellovg_paeryn.c:(.text+0x30): undefined reference to `init'
hellovg_paeryn.c:(.text+0x44): undefined reference to `Start'
hellovg_paeryn.c:(.text+0x54): undefined reference to `Background'
hellovg_paeryn.c:(.text+0x68): undefined reference to `Fill'
hellovg_paeryn.c:(.text+0x9c): undefined reference to `Circle'
hellovg_paeryn.c:(.text+0xb0): undefined reference to `Fill'
hellovg_paeryn.c:(.text+0x114): undefined reference to `TextMid'
hellovg_paeryn.c:(.text+0x118): undefined reference to `End'
hellovg_paeryn.c:(.text+0x120): undefined reference to `WindowOpacity'
hellovg_paeryn.c:(.text+0x140): undefined reference to `finish'
hellovg_paeryn.c:(.text+0x154): undefined reference to `SerifTypeface'
collect2: error: ld returned 1 exit status
Kompilierung fehlgeschlagen.
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "shapes.h"
int main() {
int width, height;
char s[3];
// Request a window size of 600x360 with top-left at 20,20
initWindowSize(20, 20, 600, 360);
init(&width, &height); // Graphics initialization
Start(width, height); // Start the picture
Background(0, 0, 0); // Black background
Fill(44, 77, 232, 1); // Big blue marble
Circle(width / 2, 0, width); // The "world"
Fill(255, 255, 255, 1); // White text
TextMid(width / 2, height / 2, "hello, world", SerifTypeface, width / 10); // Greetings
End(); // End the picture
WindowOpacity(256); // Make the window half opacity
// Can now see what is behind it
fgets(s, 2, stdin); // look at the pic, end with [RETURN]
finish(); // Graphics cleanup
exit(0);
}