Compilation error
crazyBaboon opened this issue · 2 comments
crazyBaboon commented
I installed the library on Ubuntu-Mate 17.04, apparently without problems. Now I went to the slope-master/demos directory and tried to compile (what is the right compilation tag?) simple.c:
gcc simple.c -lm -o simple pkg-config --cflags --libs gtk+-3.0
I got the error:
In function `main':
simple.c:(.text+0x29): undefined reference to `slope_chart_new'
simple.c:(.text+0x13b): undefined reference to `slope_xyscale_new'
simple.c:(.text+0x144): undefined reference to `slope_chart_get_type'
simple.c:(.text+0x168): undefined reference to `slope_chart_add_scale'
simple.c:(.text+0x18a): undefined reference to `slope_xyseries_new_filled'
simple.c:(.text+0x1a1): undefined reference to `slope_scale_add_item'
collect2: error: ld returned 1 exit status
How do I sort this out?
elvismt commented
Try adding the -lslope flag in addition to -lm in your command line. If you still get in trouble let me know.
crazyBaboon commented
That worked thanks! I have added the compilation command to the read me file.