comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » URGENT: IDL_STRING variable in calling C from IDL when update from IDL5.4 to 5.6
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
URGENT: IDL_STRING variable in calling C from IDL when update from IDL5.4 to 5.6 [message #37019] Thu, 20 November 2003 23:07 Go to next message
xje4e is currently offline  xje4e
Messages: 18
Registered: February 2002
Junior Member
Hi, there,

I am building program that calls C from IDL by DLM. In IDL, the
function passed only one parameter that is a string, such as
'test.txt'. In C, use argv[0]->value.str.s to read the string out.
In IDL 5.4, the program works well.

I updated IDL from 5.4 to 5.6, the program is dead. I debug the
program and found that when I use IDL5.4 to debug, the
argv[0]->value.str.s has the right input: 'test.txt'. However, when I
use IDL5.6 to debug, the argv[0]->value.str.s is NULL.

How can this happen? Is this a bug in IDL5.6 or RSI changed something
about the IDL_string strucure? I test the program in IDL6.0, the same
error happened.

Any help will be appreciated,

Jin
Re: URGENT: IDL_STRING variable in calling C from IDL when update from IDL5.4 to 5.6 [message #37083 is a reply to message #37019] Mon, 24 November 2003 12:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Xiaoying Jin writes:

> However, I do not think they need to change it and let the customer to
> recompile it after upgrading. It's better to keep the new version
> compatible to the previous versions.

We have a saying in the United States: It's impossible
to have your cake and eat it, too. I'm sure there
must be something comparable in China. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: URGENT: IDL_STRING variable in calling C from IDL when update from IDL5.4 to 5.6 [message #37085 is a reply to message #37019] Mon, 24 November 2003 12:36 Go to previous message
xje4e is currently offline  xje4e
Messages: 18
Registered: February 2002
Junior Member
> Yes, they changed the length field slen from short to IDL_STRING_SLEN_T
> (which is currently int) so the structure changed. I think it's documented
> in the release notes.
>
> You need to recompile your C code using the header files from IDL 5.6.

Thank you very much! It works.

However, I do not think they need to change it and let the customer to
recompile it after upgrading. It's better to keep the new version
compatible to the previous versions.

Jin
Re: URGENT: IDL_STRING variable in calling C from IDL when update from IDL5.4 to 5.6 [message #37116 is a reply to message #37019] Fri, 21 November 2003 02:13 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Xiaoying Jin wrote:
> Hi, there,
>
> I am building program that calls C from IDL by DLM. In IDL, the
> function passed only one parameter that is a string, such as
> 'test.txt'. In C, use argv[0]->value.str.s to read the string out.
> In IDL 5.4, the program works well.
>
> I updated IDL from 5.4 to 5.6, the program is dead. I debug the
> program and found that when I use IDL5.4 to debug, the
> argv[0]->value.str.s has the right input: 'test.txt'. However, when I
> use IDL5.6 to debug, the argv[0]->value.str.s is NULL.
>
> How can this happen? Is this a bug in IDL5.6 or RSI changed something
> about the IDL_string strucure? I test the program in IDL6.0, the same
> error happened.
>
> Any help will be appreciated,
>
> Jin

Yes, they changed the length field slen from short to IDL_STRING_SLEN_T
(which is currently int) so the structure changed. I think it's documented
in the release notes.

You need to recompile your C code using the header files from IDL 5.6.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem about allocate memory
Next Topic: Re: Truetype fonts

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:38:33 PDT 2025

Total time taken to generate the page: 0.00577 seconds