problems in building projects (.sav) [message #36925] |
Sat, 15 November 2003 00:36  |
sbkim
Messages: 4 Registered: November 2003
|
Junior Member |
|
|
I wish to use IDL routines from C++. To do this,
I am building a project (.sav) from .pro IDL routines.
We are using IDL 6.0. There are two problems
(1) how to handle input commandline arguments? For
example, IDL routine is as follows:
pro pl_all_l1, arg1, arg2, arg3
...
end
Then we are now building a project (File/Open Project).
In Project/Options, we see the following:
Run cmd: pl_all_l1
Build cmd: pl_all_l1.
Now the question is: what should we do to enable
pl_all_l1.sav to accept the commandline arguments?
Also, 'make_rt' converts pl_all_l1.sav to pl_all_l1.exe.
Then what is the syntax for executing pl_all_l1.exe with
the commandline arguments?
(2) our IDL routine 'pl_all_l1' contains a common header
inside it:
pro pl_all_l1, arg1, arg2, arg3
@commonheader.pro
...
end
"commonheader.pro" is a simple declaration of constants:
> ls commonheader.pro
YES= 1
NO = 0
In IDL, pl_all_l1 works fine. But "@commonheader.pro"
causes fatal errors during the project building. How
can we resolve this?
Thanks,
Sab
|
|
|
Re: problems in building projects (.sav) [message #37164 is a reply to message #36925] |
Sun, 16 November 2003 18:27  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
sab writes:
> In IDL, pl_all_l1 works fine. But "@commonheader.pro"
> causes fatal errors during the project building. How
> can we resolve this?
Take the commonheader.pro file out of the BUILD list
in your project. If it is in the right directory
when you compile all the files in your project, you
won't have to worry about it when you build the project.
It will automatically be included.
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: problems in building projects (.sav) [message #37165 is a reply to message #36925] |
Sun, 16 November 2003 18:00  |
tianyf_cn
Messages: 19 Registered: November 2002
|
Junior Member |
|
|
Once you get the pl_all_l1.sav, you can run it like this:
pl_all_l1, arg1,arg2,arg3
The *Run Command* in the Options/Project is the name of the routine
which will be executed when you 'run' the project.
As to you second question, it works fine when I build the project. I'm
using IDL5.6.
Tian.
sbkim@satrec.kaist.ac.kr (sab) wrote in message news:<6f9740d5.0311150036.a5da921@posting.google.com>...
> I wish to use IDL routines from C++. To do this,
> I am building a project (.sav) from .pro IDL routines.
> We are using IDL 6.0. There are two problems
> (1) how to handle input commandline arguments? For
> example, IDL routine is as follows:
>
> pro pl_all_l1, arg1, arg2, arg3
> ...
> end
>
> Then we are now building a project (File/Open Project).
> In Project/Options, we see the following:
> Run cmd: pl_all_l1
> Build cmd: pl_all_l1.
> Now the question is: what should we do to enable
> pl_all_l1.sav to accept the commandline arguments?
>
> Also, 'make_rt' converts pl_all_l1.sav to pl_all_l1.exe.
> Then what is the syntax for executing pl_all_l1.exe with
> the commandline arguments?
>
> (2) our IDL routine 'pl_all_l1' contains a common header
> inside it:
>
> pro pl_all_l1, arg1, arg2, arg3
> @commonheader.pro
> ...
> end
>
> "commonheader.pro" is a simple declaration of constants:
>> ls commonheader.pro
> YES= 1
> NO = 0
>
> In IDL, pl_all_l1 works fine. But "@commonheader.pro"
> causes fatal errors during the project building. How
> can we resolve this?
>
> Thanks,
>
> Sab
|
|
|