The function gsl_rng_alloc() from GSL, called from a program compiled with Dev
C++, gives an access violation error when my program is executed under WIndows
(Vista). The error seems to be in Dev C++ and not in the GSL, since the
program runs fine in another system when compiled using XCode.
Is there a new version of Dev C++ in which this problem is solved? Any other
advice? Please explain it clearly, since I am new to Dev C++.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error seems to be in Dev C++ and not in the GSL
I doubt that, Dev-C++ is merely an IDE and is used for editing, building and
launching your code, but has no bearing on the execution of it. The compiler
used by Dev-C++ is MinGW/GCC; this is responsible for code generation from
your source; it is highly unlikely that it generated incorrect code from
correct source. After all, it is essentially the same GCC compiler that XCode
uses, only built for Windows.
The most likely cause of an access violation is an error in _your _code;
apply Occam's Razor, and don't
go looking for complex answers to simple problems; apart from an error in your
code being teh most likly explanation, it is also the only one you will be
able to do a thing about, so blaming your
tools is
unlikely to help.
the program runs fine in another system when compiled using XCode.
A program apparently running fine on another system is no proof of
correctness. For example, the behaviour of a system when you overrun a buffer
is undefined; that means anything can happen, including apparently
nothing. You most likely have a bug that was simply latent in another
environment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a new version of Dev C++ in which this problem is solved?
As I said, you are blaming the wrong thing, but Dev-C++ uses MinGW/GCC, that
is a project hosted at http://www.mingw.org, where you
may obtain a newer version. Dev-C++ itself is no longer maintained.
To find your code error, you should use a debugger. Unfortunately Dev-C++
integrated debugger interface sucks and is hardly worth the effort. For that
reason you would be far better off using VC++ 2008 Express; it is free, up-to-
date, has greater functionality than Dev-C++, is less buggy, and has a best-
in-class debugger.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The function gsl_rng_alloc() from GSL, called from a program compiled with Dev
C++, gives an access violation error when my program is executed under WIndows
(Vista). The error seems to be in Dev C++ and not in the GSL, since the
program runs fine in another system when compiled using XCode.
Is there a new version of Dev C++ in which this problem is solved? Any other
advice? Please explain it clearly, since I am new to Dev C++.
I doubt that, Dev-C++ is merely an IDE and is used for editing, building and
launching your code, but has no bearing on the execution of it. The compiler
used by Dev-C++ is MinGW/GCC; this is responsible for code generation from
your source; it is highly unlikely that it generated incorrect code from
correct source. After all, it is essentially the same GCC compiler that XCode
uses, only built for Windows.
The most likely cause of an access violation is an error in _your _code;
apply Occam's Razor, and don't
go looking for complex answers to simple problems; apart from an error in your
code being teh most likly explanation, it is also the only one you will be
able to do a thing about, so blaming your
tools is
unlikely to help.
A program apparently running fine on another system is no proof of
correctness. For example, the behaviour of a system when you overrun a buffer
is undefined; that means anything can happen, including apparently
nothing. You most likely have a bug that was simply latent in another
environment.
As I said, you are blaming the wrong thing, but Dev-C++ uses MinGW/GCC, that
is a project hosted at http://www.mingw.org, where you
may obtain a newer version. Dev-C++ itself is no longer maintained.
To find your code error, you should use a debugger. Unfortunately Dev-C++
integrated debugger interface sucks and is hardly worth the effort. For that
reason you would be far better off using VC++ 2008 Express; it is free, up-to-
date, has greater functionality than Dev-C++, is less buggy, and has a best-
in-class debugger.