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
 Calling null function pointers in NAG functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gpoon

USA
Posts

Posted - 07/17/2009 :  6:57:11 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8 and Service Release 5 (Select Help-->About Origin):
Operating System: Win XP

I am trying to using a NAG function, d02ejc, which according to the NAG manual accepts specific the NAG-defined null function pointers NULLFN and NULLDFN in its arguments. However, when I try to use them, the compiler frustrates me with "Error, cannot convert argument in function call." I know that this error is related to these two pointers because when I avoid them altogether with explicit functions, the program compiles and works correctly. Both NULLFN and NULLDFN are defined in nag.h as

#ifndef NULLFN
#define NULLFN 0
#endif
#ifndef NULLDFN
#define NULLDFN 0
#endif

Changing to NULLFN NULL or NULLFN (void *)0 doesn't seem to matter. Any help is appreciated! Since NULLFN and NULLDFN are also used (optionally) in other NAG functions such as d02cjc and d02qfc, I am hoping there are others who have encountered this issue.

Thanks in advance,
Gregory

Iris_Bai

China
Posts

Posted - 07/19/2009 :  10:33:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Gregory,

1. Change
#define NULLFN 0
to
#define NULLFN NULL

2. Find OC_nag8__PCH.OPH under OriginC\system folder from Origin install path and delete this file.

3. Compile file again.

Iris
Originlab
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