DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help using DPlot w/ gcc

 
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C#
View previous topic :: View next topic  
Author Message
sseidman



Joined: 24 Aug 2005
Posts: 8

PostPosted: Wed Aug 24, 2005 12:41 pm    Post subject: Help using DPlot w/ gcc Reply with quote

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
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Aug 24, 2005 3:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Aug 24, 2005 3:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sseidman



Joined: 24 Aug 2005
Posts: 8

PostPosted: Wed Aug 24, 2005 6:37 pm    Post subject: Reply with quote

Thanks muchly. That did it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C# All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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