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 for Programming
 Forum for Origin C
 Can't get global function max( ) to compile ...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bucelot

USA
3 Posts

Posted - 07/09/2002 :  10:03:23 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to use the folling function:
double max(Dataset &aa)

However, I am getting the following message:
compiling...
hello.c
Linking...
C:\u\lopezgg\analysis\ORIGIN_SOURCEFILES\hello.c(59) :Error, Function max@KAKAKA was called, but its body could not be located during linking.

Here is a code segment I am trying to compile:

Worksheet wks("sample");
UINT rows = wks.GetNumRows() ;
out_int("Row Count = ", rows) ;

Dataset ds1(wks.Columns("set1"));
Dataset ds2(wks.Columns("set2"));

ds1.SetSize(rows);
ds2.SetSize(rows);

out_double(" Set1 Max = ", max(ds1) );
out_double(" Set2 Max = ", max(ds2) );


I have #include at the top of my file ... what am I doing wrong? Any suggestions? Thank you in advance!

easwar

USA
1965 Posts

Posted - 07/09/2002 :  10:24:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You need to add the file internal.c, found in \OriginC\System subfolder to your workspace and then your function will compile. The code for functions such as max are stored in internal.c

Easwar
OriginLab.
Go to Top of Page

bucelot

USA
3 Posts

Posted - 07/09/2002 :  11:06:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Very Cool! Thanks again!

Go to Top of Page

bucelot

USA
3 Posts

Posted - 07/09/2002 :  11:06:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply


Edited by - bucelot on 07/09/2002 11:14:09
Go to Top of Page

bucelot

USA
3 Posts

Posted - 07/09/2002 :  11:07:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply


Edited by - bucelot on 07/09/2002 11:13:47
Go to Top of Page

bucelot

USA
3 Posts

Posted - 07/09/2002 :  11:07:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply




Edited by - bucelot on 07/09/2002 11:13:23
Go to Top of Page

bucelot

USA
3 Posts

Posted - 07/09/2002 :  11:08:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply


Edited by - bucelot on 07/09/2002 11:12:57
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