The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Fitfun file of v7.5 doesn't work in v8.0
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cellbiophysics

S. Korea
Posts

Posted - 02/26/2008 :  11:46:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 8.0 SR1
Operating System: Window XP

Hi,

I upgraded Origin 7.5 to 8.0 SR1. I have been using Origin to fit the data. I have a fitting function which is working well in Origin 7.5. But, After upgrading, I just added the fitting function file (used in Origin 7.5) to Origin 8. But, it doesn't work.

There are some error codes if I compile the fitting function file in Origin 8. Error codes are as follows;

================================================================
Linking...

Done!

compiling...
_nlfFR_3con_2d.fit

C:\Program Files\OriginLab\Origin8\OriginC\system\ORgObj.h(1822) :Error, Function argument lpcstr is not used inside the function body

C:\Program Files\OriginLab\Origin8\OriginC\system\ORgObj.h(1822) :Error, error(s) found in compiling function Write
Compile Failed!
================================================================


I didn't modify the file of "C:\Program Files\OriginLab\Origin8\OriginC\system\ORgObj.h". If I double-clicked the error message, the code builder shows a not-familiar code which includes "lpcstr".
I don't know what to do becuase I don't understand the code.
I don't know what the problem is. What shall I do? My fitting function includes a summation.
My code is

=================================================================
void _nlsfFR_3con_2d(
// Fit Parameter(s):
double nser, double P1, double P2,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
// Beginning of editable part
double dSum = 0;
int ser=nser;


for(int n = 0; n < ser; n++)
{
dSum += F(n,P1,P2,x);
}

y = A*dSum;
// End of editable part
}
===================================================================


Please let me know how I can solve this problem.

Thanks,

KB.

Edited by - cellbiophysics on 02/27/2008 03:44:42 AM

Echo_Chu

China
Posts

Posted - 02/27/2008 :  03:50:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, KB

Could you #include <origin.h> in your fdf and try again?

However, the problem will be fixed in our coming SR2. But we would still suggest you to use origin.h

Echo
OriginLab Corp
Go to Top of Page

cellbiophysics

S. Korea
Posts

Posted - 02/27/2008 :  04:07:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your suggestion.
As you suggested, I add #include <origin.h> in the code builder.
But,the same errors occurred. Do you have any other good idea?
Thanks,

KB.
Go to Top of Page

Echo_Chu

China
Posts

Posted - 02/27/2008 :  04:53:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In your fdf, section

[ORIGIN C FUNCTION HEADER]
Instead of

#include <stdio.h>
#include <data.h>
#include <math.h>
#include <utilities.h>

Should be

#include <origin.h>

If it does not work for you. Could you send your fdf to tech@originlab.com and let's look into it
Go to Top of Page

cellbiophysics

S. Korea
Posts

Posted - 02/27/2008 :  10:44:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks!
It's working. :-)

KB.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000