Author |
Topic |
|
jonni
United Kingdom
58 Posts |
Posted - 01/09/2003 : 11:55:54 AM
|
I tried to use nag function nag_real_poligamma(x,k) to fit may date, but I have next error: Exeternal DLL cannot find function ONAG:nag_real_poligamma(x,k)
#include <stdio.h> #include <data.h> #include <math.h> #include <utilities.h> void _nlsfuser2( // Fit Parameter(s): double P1, // Independent Variable(s): double x, // Dependent Variable(s): double& y) { // Beginning of editable part #include <NAG\OCN_s.h> y=nag_cosh(x);
// End of editable part }
|
|
Laurie
USA
404 Posts |
Posted - 01/09/2003 : 2:43:16 PM
|
You will need to move the include NAG header file statement. Include statements should never be inside function body. (It's ok to use include inside function body if whatever is included does not have function declarations.)
In order to add addition header files you will need to modify the template, used in this special CodeBuilder view for the NLSF. The file, nlsf.fit, is located in the NLSF subfolder of the Origin C subfolder. It's a text file that you can open in Notepad. Make your changes and then resave the template.
The reason that we don't include the NAG header files by default, is to speed up compilation. This is consistent with the default template for new C files. (If you open CodeBuilder and create a new C file, you'll see the following comments: //////////////////////////////////////////////////////////////////////////////////// // you can include just this typical header file for most Origin built-in functions and classes // and it takes a reasonable amount of time to compile, #include <origin.h> // this file include most of the other header files except the NAG header, which takes longer to compile // NAG routines //#include <OC_nag.h> // this contains all the NAG headers,
)
OriginLab Technical Support |
|
|
jonni
United Kingdom
58 Posts |
Posted - 01/09/2003 : 3:06:09 PM
|
Dear Laurie.
Thanks for help
I modefined template already but it didn't help.
my source is: #include <stdio.h> #include <data.h> #include <math.h> #include <utilities.h> #include <NAG\OCN_s.h> void _nlsfuser2( // Fit Parameter(s): double P1, // Independent Variable(s): double x, // Dependent Variable(s): double& y, // Partial Derivative(s): double& dy_P1) { // Beginning of editable part NagError fail; y=nag_real_polygamma(x,0,&fail); // End of editable part }
But I still have the same error external DLL cannot find function ONAG: nag_real_polygamma
even if I create new c file using code builder: #include <origin.h> #include <stdio.h> #include <data.h> #include <math.h> #include <utilities.h> #include <NAG\OCN_s.h> double psi(double P1,double x) { double y; NagError fail; y=nag_real_polygamma(x,P1,&fail); return y; }
I have the same error.
external DLL cannot find function ONAG: nag_real_polygamma
What should I do.
The main purpouse is fit my data be polygamma function. |
|
|
TarakDas
USA
2 Posts |
Posted - 01/09/2003 : 3:30:22 PM
|
Hi, This error could be generated due to two reasons, 1)if the function implementation is not found in the DLL, that is the header has it prototyped and the dll does not have a corresponding function with the same name. 2) The other scenario is failing to Load the DLL itself.
Plese let us know if other NAG functions have the same problem. Thanks -Tarak |
|
|
jonni
United Kingdom
58 Posts |
Posted - 01/09/2003 : 3:52:01 PM
|
yes! all ONAG.dll functions what I tried to call have the same error (I tried functions from OCN_s.h as nag_sinh; nag_cosh;nag_arcsinh;nag_real_polygamma)
1. All function has defenition in header file 2. I have ONAG.dll file
thanks for help can I call to the support and discuss the problem? |
|
|
cpyang
USA
1406 Posts |
Posted - 01/09/2003 : 3:58:40 PM
|
The only thing I can think of is that you might be using the downloaded evaluation version of Origin 7.
The ONAG.dll with a release version of Origin should be 1.6Mb in size, while in a downloaded demo it is 768K.
The full ONAG.dll is included in the demo CD, but to limit the download size, we only include a small subset in the downloaded version.
CP
Edited by - cpyang on 01/09/2003 3:59:49 PM |
|
|
jonni
United Kingdom
58 Posts |
Posted - 01/09/2003 : 4:04:40 PM
|
I have posetive result
I download nagc.dll from www.nag.com. This dll includes the same functions as ONAG.dll. I don't have any problem with compilation,when just changed ONAG.DLL to nagc.dll(renamed nagc.dll to ONAG.dll) with all functions from NAG). But when I try to execute fitting I have error: "NAG C Library license error" (I have to register my NAG library, which I downloaded. I'm waiting mail with key from them for my trial version)
It means that problem is in ONAG.dll
What should I do? |
|
|
jonni
United Kingdom
58 Posts |
Posted - 01/09/2003 : 4:14:15 PM
|
Where can I get FULL version of ONAG.dll
where can I download it??
thnaks |
|
|
Laurie
USA
404 Posts |
Posted - 01/09/2003 : 5:16:41 PM
|
I have just emailed you the full ONAG.DLL file, so you should be all set. The full file is found in the demo CD, but not in the downloadable demo. The demo CD can be requested and we can send by mail.
OriginLab Technical Support |
|
|
jonni
United Kingdom
58 Posts |
Posted - 01/09/2003 : 6:25:57 PM
|
Thank you all a lot for help!
You are doing a great job!!
All scripts are working. ( I have to undersand, Are they work right or not, but it is later? )
to be continued tomorow......... :)
It's enough for today.
Thank you for great help
Evgeniy
|
|
|
|
Topic |
|