Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=3233108
By: nobody

The following sample code cutted form the GSL user's manual:
==========
#include <stdio.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>

int
main (void)
{
  const gsl_rng_type *T;
  gsl_rng *r;

  int i, n = 10;
  double mu = 3.0;

  /* create a generator chosen by the 
     environment variable GSL_RNG_TYPE */

  //gsl_rng_env_setup();

  //T = gsl_rng_default;
  r = gsl_rng_alloc (T);

  /* print n random variates chosen from 
     the poisson distribution with mean 
     parameter mu */

  for (i = 0; i < n; i++) 
    {
      unsigned int k = gsl_ran_poisson (r, mu);
      printf (" %u", k);
    }

  printf ("\n");
  return 0;
}
=========
First I compile the programs with GSL statically and it runs correctlly.Then
I try to compile the code with GSL dynamically, the compilation is successful,
but when I run the program I get a runtime error (a dialog window shows that
something wrong with libgsl.dll). Can someone tell me what's the problem in
running the sample code with dynamically linking?

ps. I compile the code by Dev-C++, under Windows XP

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=74807


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to