[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Can you help me in compiling gsl in Microsoft vc++ 6.0?
From: |
Iwasawa, Kazuhiro, GCM |
Subject: |
[Help-gsl] Can you help me in compiling gsl in Microsoft vc++ 6.0? |
Date: |
Fri, 16 Jun 2006 15:06:29 -0400 |
I added all.lib files in the project, and copied all .dll and *.lib into
the project folder.
Then I compiled the following in the main code:
#include "stdafx.h"
#include <config.h>
#include <stdlib.h>
#include <gsl/gsl_ieee_utils.h>
#include <gsl/gsl_qrng.h>
#include <gsl/gsl_test.h>
void test_sobol(void)
{
int status = 0;
double v[3];
/* int i; */
/* test in dimension 2 */
gsl_qrng * g = gsl_qrng_alloc(gsl_qrng_sobol, 2);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.25 || v[1] != 0.75 );
gsl_qrng_get(g, v);
status += ( v[0] != 0.375 || v[1] != 0.375 );
gsl_qrng_free(g);
gsl_test (status, "Sobol d=2");
status = 0;
/* test in dimension 3 */
g = gsl_qrng_alloc(gsl_qrng_sobol, 3);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.25 );
gsl_qrng_get(g, v);
status += ( v[0] != 0.375 || v[1] != 0.375 || v[2] != 0.625 );
gsl_test (status, "Sobol d=3");
status = 0;
gsl_qrng_init(g);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.25 );
gsl_qrng_get(g, v);
status += ( v[0] != 0.375 || v[1] != 0.375 || v[2] != 0.625 );
gsl_qrng_free(g);
gsl_test (status, "Sobol d=3 (reinitialized)");
}
void test_nied2(void)
{
int status = 0;
double v[3];
/* int i; */
/* test in dimension 2 */
gsl_qrng * g = gsl_qrng_alloc(gsl_qrng_niederreiter_2, 2);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.75 || v[1] != 0.25 );
gsl_qrng_get(g, v);
status += ( v[0] != 0.25 || v[1] != 0.75 );
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.625 || v[1] != 0.125 );
gsl_qrng_free(g);
gsl_test (status, "Niederreiter d=2");
status = 0;
/* test in dimension 3 */
g = gsl_qrng_alloc(gsl_qrng_niederreiter_2, 3);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.75 || v[1] != 0.25 || v[2] != 0.3125 );
gsl_qrng_get(g, v);
status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.5625 );
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.625 || v[1] != 0.125 || v[2] != 0.6875 );
gsl_test (status, "Niederreiter d=3");
status = 0;
gsl_qrng_init(g);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.75 || v[1] != 0.25 || v[2] != 0.3125 );
gsl_qrng_get(g, v);
status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.5625 );
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
gsl_qrng_get(g, v);
status += ( v[0] != 0.625 || v[1] != 0.125 || v[2] != 0.6875 );
gsl_qrng_free(g);
gsl_test (status, "Niederreiter d=3 (reinitialized)");
}
int main(int argc, char* argv[])
{
gsl_ieee_env_setup ();
test_sobol();
test_nied2();
exit (gsl_test_summary ());
return 0;
}
But, I am getting the following errors:
gsl\gsl_qrng.h(98) : error C2054: expected '(' to follow 'inline'
c:\gsl\include\gsl\gsl_qrng.h(98) : error C2082: redefinition of formal
parameter 'gsl_qrng_get'
c:\gsl\include\gsl\gsl_qrng.h(99) : error C2082: redefinition of formal
parameter 'inline'
c:\gsl\include\gsl\gsl_qrng.h(99) : error C2143: syntax error : missing
';' before 'type'
c:\gsl\include\gsl\gsl_qrng.h(100) : error C2082: redefinition of formal
parameter 'gsl_qrng_get'
c:\gsl\include\gsl\gsl_qrng.h(100) : error C2143: syntax error : missing
';' before '{'
niederreiter-2.c
c:\gsl\include\gsl\gsl_qrng.h(98) : error C2054: expected '(' to follow
'inline'
c:\gsl\include\gsl\gsl_qrng.h(98) : error C2082: redefinition of formal
parameter 'gsl_qrng_get'
c:\gsl\include\gsl\gsl_qrng.h(99) : error C2082: redefinition of formal
parameter 'inline'
c:\gsl\include\gsl\gsl_qrng.h(99) : error C2143: syntax error : missing
';' before 'type'
c:\gsl\include\gsl\gsl_qrng.h(100) : error C2082: redefinition of formal
parameter 'gsl_qrng_get'
c:\gsl\include\gsl\gsl_qrng.h(100) : error C2143: syntax error : missing
';' before '{'
qrng.c
c:\gsl\include\gsl\gsl_qrng.h(98) : error C2054: expected '(' to follow
'inline'
c:\gsl\include\gsl\gsl_qrng.h(98) : error C2082: redefinition of formal
parameter 'gsl_qrng_get'
c:\gsl\include\gsl\gsl_qrng.h(99) : error C2082: redefinition of formal
parameter 'inline'
c:\gsl\include\gsl\gsl_qrng.h(99) : error C2143: syntax error : missing
';' before 'type'
c:\gsl\include\gsl\gsl_qrng.h(100) : error C2082: redefinition of formal
parameter 'gsl_qrng_get'
c:\gsl\include\gsl\gsl_qrng.h(100) : error C2143: syntax error : missing
';' before '{'
Generating Code...
Error executing cl.exe.
Creating browse info file...
test_gsl.exe - 18 error(s), 0 warning(s)
-----------------------------------------
*******************************************************************
*
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorized
to retain, read, copy or disseminate this message or any part of
it.
*******************************************************************
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] Can you help me in compiling gsl in Microsoft vc++ 6.0?,
Iwasawa, Kazuhiro, GCM <=