| Author |
Topic  |
|
|
PhilTHy
UK
Posts |
Posted - 02/20/2008 : 10:37:10 AM
|
Origin Version (Select Help-->About Origin): 7.5 and 8 Operating System: XP
Just upgraded ver 7.5 to 8.0, and tried recompiling some existing code - woah what a load of error messages
and I'm a bit pissed about it because it's taken me a while to work out how to get perfectly well functioning code running again, and I'm still hitting unexpected behaviours.
I haven't yet found the bit in the help file yet which documents "things you need to change to get OriginC 7.5 code working in 8". Could you make it more easily found. thanks.
This is my laundry list (so far)
Phil
1) new requirement to specify compiler directive include <OC_nag8.h> if you have used nag functions
2) Origin 8 help file doesn't include documentation under Global functions for the nag functions, it just points you at the pdf files. Problem in finding an index for the pdf files - this used to be in the Origin help file - the nag file/function naming convention is completely impenetrable unless you already know what you are looking for ! A simple list in a file in the \nag pdf folder would do the job if it's really impossible to put it in the help file...
3) In 7.5, the nag pdfs type the functions as void, but actually implemented (as the help file made clear) as int in OC 7.5 - returning the nag fail code. The nagerror parameter was dropped from the input parameter list. In 8.0 it works as documented in the nag pdfs, the functions are type void, and the last parameter passed to the function needs to be a pointer to a Nagerror structure. So you need to re-write every function you've written that calls a Nag library function. Nice.
4) Some re-write of error handling code required too if you've used Nag library functions. If in 7.5 you used the integer returned value from a Nag function call to output appropriate diagnostics, you now need to extract the appropriate failure code number from Nagerror structure e.g. if you defined int failed = nag function(), you now need to replace instances of "failed" in the error handler with failed.code Or at least I think this is the appropriate part of the Nagerror structure, since I can't find the documentation for the Nag error structure.
5) Perhaps somebody from Originlab would like to comment on this one. Again in trapping errors from nag functions. 7.5 helpfile lists the error codes by integer values. Nag pdfs by named constants. Are the 2 **reliably** interchangeable ? Or do I have to re-write all my error handler functions with the values replaced by names ?
6) A change to the try..catch error handling. All my functions written in 7.5 had the form;
try { body of function } return true
catch(int iErr) { error handler code } return false
I now in ver8 get a compiler error "Error: catch must follow try immediately"
try { body of function return true }
is required
(7) a call to the macro nag_free() now gives a compile error. e.g. nag_free(spline.c) Still in the nag pdf documentation. So how do I now free up memory used by nag data structures ? |
|
|
Echo_Chu
China
Posts |
Posted - 02/22/2008 : 01:21:23 AM
|
Hi, Phil
I have sent you an OPX to enable 75 NAG functions run in 80 via email. Could you please check whether it works for your OC codes?
Echo OriginLab Corp |
 |
|
| |
Topic  |
|
|
|