I'm new with PLplot and Cmake. I've spent hours looking over tutorials, instructions, and posts, but still can't figure this out. I keep getting these three errors:
1>main.obj : error LNK2001: unresolved external symbol "public: thiscall plstream::plstream(void)" (??0plstream@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void thiscall plstream::init(void)" (?init@plstream@@QAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: int __thiscall plstream::parseopts(int ,char const * ,int)" (?parseopts@plstream@@QAEHPAHPAPBDH@Z)
I'm trying to follow the example from http://plplot.sourceforge.net/examples.php?demo=00&lbind=C%2B%2B.
Here's part of my code:
//Standard constructor (I have it in a class)
plot(int num, const char** word)
//Arrays of values
PLFLT x[NSIZE_], y[NSIZE_];
//Maximums and minimums
PLFLT xmin = 0.0, xmax = 1.0, ymin = 0.0, ymax = 100.0;
//Prepare data to be ploted
for(int i = 0; i < NSIZE_; i++)
x[i] = (PLFLT) (i) / (PLFLT) (NSIZE_ - 1);
y[i] = ymax * x[i]*x[i];
//Set the PLplot data stream
pls_ = new plstream();//<--------This causes one of the errors.
pls_->parseopts(&num, word, PL_PARSE_FULL);//<----This one too.
pls_->init();//<------------------------------This one as well.
//pls_ is a private member variable of type plstream*
Here's my setup:
-I'm using Microsoft Visual Studio 2012.
-I'm running Windows 7 Enterprise 64-Bit.
-I have linked to the PLplot SVN trunk site, so my PLplot version is the most recent.
-I built PLplot for C++ using the CMake-GUI. I selected "Visual Studio 11" as the project generator. All other options I left at their default values.
-Once I built PLplot with Cmake, I went into visual studio and linked to every PLplot library and include folder I could find.
I find it strange that there aren't any files that end with ".lib" in the PLplot directories (except for COPYING.LIB, but I'm pretty sure that's not what I need). Do I have to manually rename some of the files Cmake made to make them .lib files? Any help with this would be greatly appreciated. Thanks!