From: Peter W. <pet...@gm...> - 2020-07-22 19:38:50
|
Hello Plplot I am at present migrating some PlPlot programs from Windows 10 to linux (mint 64 bit), To facilitate this I have downloaded cmake and Plplot-5.15.0.tar.gz from your website. Following the instructions from your wiki I built an installation consisting of static libraries. In order to test the installation I wrote a very simple program PlPlotTest.c: #include <stdio.h> #include "plplot.h" int main() { printf("Plotting example\n"); plsdev("ps"); plsfnam("TestPlplot.ps");plinit(); plenv(-1.0 , 1.0 ,-1.0,1.0,1,2); pljoin(-0.5,-0.5,0.5,0.5); plend(); printf("Plot finished\n"); return 1; } and attempted to compile it with gcc -c -I /home/peter/plplot/install_directory/include/plplot PlPlotTest.c gcc -o PlPlotTest.exe PlPlotTest.o -L /home/peter/plplot/install_directory/lib -lplplot -lcsirocsa -lqsastime -lm -lX11 An object file PlPlotTest.o was generated with no errors, but the linking failed with the messages: /usr/bin/ld: /home/peter/plplot/install_directory/lib/libplplot.a(xwin.c.o): in function `plD_init_xw': xwin.c:(.text+0x470): undefined reference to `pthread_mutexattr_init' /usr/bin/ld: xwin.c:(.text+0x481): undefined reference to `pthread_mutexattr_settype' /usr/bin/ld: xwin.c:(.text+0x519): undefined reference to `pthread_create' /usr/bin/ld: /home/peter/plplot/install_directory/lib/libplplot.a(xwin.c.o): in function `plD_tidy_xw': xwin.c:(.text+0xcd0): undefined reference to `pthread_cancel' /usr/bin/ld: xwin.c:(.text+0xcec): undefined reference to `pthread_join' collect2: error: ld returned 1 exit status I am very new to linux. Can you tell me what the linking should be? Best Wishes, Peter -- Peter Williams pet...@gm... 27 Ramsbury Road, St. Albans, AL1 1SN, UK |