Author |
Topic  |
|
Benoit78
USA
2 Posts |
Posted - 07/08/2013 : 10:54:07 AM
|
Hello!
I'm trying to fit my data with an integral function, with an existing example (http://www.originlab.com/www/helponline/Origin/en/mergedProjects/Tutorial/Tutorial/Fitting_with_Integral_using_NAG_Library.html).
When I tried to compile "oc_nag8.h" as follows (using the example above):
#include <origin.h> // Add your special include files here. // For example, if you want to fit with functions from the NAG library, // add the header file for the NAG functions here. #include <oc_nag8.h> // Add code here for other Origin C functions that you want to define in this file, // and access in your fitting function. struct user { double amp, center, width; };
The compiler returns "Error, variable not declared" in the part marked with italic. What is my mistake?
Thanks. |
|
Penn
China
644 Posts |
Posted - 07/08/2013 : 9:54:30 PM
|
Hi,
I have tried the example, it works in Origin 9. Did the error also happen when you tried the example, or just in your integral function? With the information currently you provided, I cannot reproduce the error you mentioned. Please tell which version of Origin you are using. And better that you can provide the entire steps and code if you are using your own integral function (not the one in the example).
Penn |
 |
|
Benoit78
USA
2 Posts |
Posted - 07/09/2013 : 12:30:23 PM
|
The integral function that I tried was the same one in the example. I'm using Origin Pro 8. Does it make this error? |
 |
|
Penn
China
644 Posts |
Posted - 07/09/2013 : 9:36:54 PM
|
Hi,
Please note that the minimum version required for this tutorial is Origin 8 SR6. And I have tried in this version, it works. Please make sure that you have updated to the highest service release (SR6) for Origin 8. If not, you can do it by menu Help: Check for Updates or from this page.
Penn |
 |
|
pcmapuia
2 Posts |
Posted - 08/26/2013 : 07:52:45 AM
|
quote: Originally posted by Penn
Hi,
Please note that the minimum version required for this tutorial is Origin 8 SR6. And I have tried in this version, it works. Please make sure that you have updated to the highest service release (SR6) for Origin 8. If not, you can do it by menu Help: Check for Updates or from this page.
Penn
Hi Penn, I am also facing the same problem as Benoit78 though I'm using Origin 8.5(SR1). I have tested the given example (http://www.originlab.com/www/helponline/Origin/en/mergedProjects/Tutorial/Tutorial/Fitting_with_Integral_using_NAG_Library.html)without any modification in Origin 9 as well, but it didn't work. Thinking my OS(windows 8) caused the error, I got tested in windows 7 giving the same problem. The exact compilation error report is as follows -
Linking... Done! compiling... _nlfnag_integration_fitting.fit C:\Users\pc\Documents\OriginLab\85\User Files\OriginC\NLSF\_nlfnag_integration_fitting.fit(46) :Error, Variable "struct user { double amp, center, width;
}" not declared C:\Users\pc\Documents\OriginLab\85\User Files\OriginC\NLSF\_nlfnag_integration_fitting.fit(46) :Error, general compile error C:\Users\pc\Documents\OriginLab\85\User Files\OriginC\NLSF\_nlfnag_integration_fitting.fit(27) :Error, error(s) found in compiling function _nlsfnag_integration_fitting Compile Failed! If this could be fixed, I thought of implementing for my desired integral...I'll be very glad if you could help. I've been struggling for more than a week.. |
 |
|
Penn
China
644 Posts |
Posted - 08/28/2013 : 01:42:40 AM
|
Hi,
I have tried this tutorial lots of times, in several versions (8.5, 8.5.1, 8.6, and 9.0), but no luck to reproduce the error you mentioned. Maybe you can send the FDF file (under <User Files Folder>\fitfunc\) to us by clicking on the "Send File to Tech support" link at the top-right corner of this page. Then we can see if there is any clue on why this error message happens.
Penn |
 |
|
pcmapuia
2 Posts |
Posted - 08/28/2013 : 08:51:44 AM
|
Thanks...Penn I have just sent my FDF file saved as TXT file since I can't upload FDF file... |
 |
|
|
Topic  |
|
|
|