View previous topic :: View next topic |
Author |
Message |
sseidman
Joined: 24 Aug 2005 Posts: 8
|
Posted: Wed Aug 24, 2005 12:41 pm Post subject: Help using DPlot w/ gcc |
|
|
I can compile and line the CTEST programs included with the dplotlib distribution using mingw under mingwstudio, but I keep getting the LoadLibrary for DPLOTLIB.DLL failed.
Am I missing something stupid. All the libraries seem to be found correctly, as if I get the paths wrong, the compiler lets me know
Code: | #include <windows.h>
#include <stdio.h>
#include <math.h>
#include "dplot.h"
#define DPLOT_PLOT dPlot_Plot
// Step 4: the Window Procedure
int main(void)
{
DPLOT DPlot;
double tryme [500] ;
int i;
for(i=0;i<500;i++)
{
tryme[i]=sin((double)i/200.0);
}
#ifdef __GNUC__
HINSTANCE dll;
dll=LoadLibrary("Dplotlib.a");
//printf(dll);
if((dll=dPlot_Init()) == NULL)
{
printf("LoadLibrary for DPLOTLIB.DLL failed.\n");
exit(0);
}
#endif
return(0);
}
|
|
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Wed Aug 24, 2005 3:16 pm Post subject: |
|
|
Have you renamed dplotlib.dll to dplotlib.a? If so... why? And if not then this:
dll=LoadLibrary("Dplotlib.a");
is the problem. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Wed Aug 24, 2005 3:24 pm Post subject: |
|
|
My mistake, I answered that w/o taking a close enough look. I don't know what you're trying to do with
dll=LoadLibrary("Dplotlib.a");
but it's irrelevant since you're then calling dPlot_Init.
Is dplotlib.dll in the same folder as your executable? If not please move it there and try again. If that doesn't do it... I'm not familiar with mingwstudio, but if it allows you to run the executable from within that environment, it might be necessary to set the working directory to the folder where your executable is located. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
sseidman
Joined: 24 Aug 2005 Posts: 8
|
Posted: Wed Aug 24, 2005 6:37 pm Post subject: |
|
|
Thanks muchly. That did it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|