terminal - (Mac OSX) Adding libraries to C -specifically gnuplot -
i begineer trying code in c. working on mac , using xcode. past experience has been java using eclipse , pretty straight forward. have no experience terminal.
i required learn bit of c project working on , learning of syntax coming along okay, @ point need include libraries in c program. attempting make plots gnuplots.
i have downloaded gnuplot-4.6.3 repository , not know how install files. have been looking around , have tried using terminal use ./configure command when in gnuplot-4.6.3 directory. don't know doing don't know go next or next.
sorry if trivial, have never done before , cannot find tutorial on do.
thanks can offer.
i recommend using macports installing third-party tools , libraries. knows dependencies required , install them part of installation.
- download macports.org.
- install it, , allow modify
~/.profile
/opt/local/bin
in$path
(any issueexport path=/opt/local/bin:$path
command line). sudo port selfupdate
sudo port install gnuplot
now install library /opt/local/lib
include files in /opt/local/include
, add library xcode project. select target , in build phases tab open link binary libraries , press +
button , select add other. find /opt/local/lib/libgnuplot.a
(i assuming that's it's called; don't have installed self):
now add /opt/local/include
header search paths compiler can find gnuplot header files. select target , in build setting type in "header search" in search box. double-click on header search path in target column (or project column right) , add /opt/local/include
:
Comments
Post a Comment