|
Re: Running an IDL Project [message #40482 is a reply to message #40467] |
Tue, 10 August 2004 08:49  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Edwin writes:
> Well I tried going to options > run command > and typing in "main"
> without the quotation marks. and then compiled all. andthen pressed
> run. here's what I got:
>
> % Compiled module: MPFIT_DUMMY.
> % Compiled module: MPFIT_RESETPROF.
> % Compiled module: MPFIT_SETMACHAR.
> % Compiled module: MPFIT_CALL.
> % Compiled module: MPFIT_FDJAC2.
> % Compiled module: MPFIT_ENORM.
> % Compiled module: MPFIT_QRFAC.
> % Compiled module: MPFIT_QRSOLV.
> % Compiled module: MPFIT_LMPAR.
> % Compiled module: MPFIT_TIE.
> % Compiled module: MPFIT_DEFITER.
> % Compiled module: MPFIT_PARINFO.
> % Compiled module: MPFIT_COVAR.
> % Compiled module: MPFIT.
> % Compiled module: MPEVALEXPR.
> % Compiled module: MPFITEXPR_EVAL.
> % Compiled module: MPFITEXPR.
> % Compiled module: AUTO_LINE.
> % Compiled module: RUNNING_AVERAGE.
> % Compiled module: CALIB_WAVE.
> % Compiled module: INT_INT.
> % Compiled module: $MAIN$.
> % Compiled module: MY_LINE.
> % Compiled module: MY_ROI.
> % Compiled module: PEAK_FINDER.
> % Compiled module: PLOT_FC.
> % Compiled module: PLOT_ROI.
> % Compiled module: READ_FC.
> % Compiled module: READ_ROI.
> % Compiled module: READ_CALIB.
> % Compiled module: READ_HEADER.
> % Compiled module: $MAIN$.
> % Library file does not contain a procedure or function.
> % Compiled module: MAIN.
> % Attempt to call undefined procedure/function: 'MAIN'.
> % Execution halted at: $MAIN$ 1
> C:\IDL\SPE_Examiner\main.pro
Well, it looks like your MAIN program is not a procedure or
a function. :-)
My guess is that it is a main-level program. In other words,
it is a program module that doesn't start with a PRO or FUNC
definition line. It starts with an IDL command. Is this right?
If so, then put "PRO MAIN" as the first line of that file
and try again.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Running an IDL Project [message #40484 is a reply to message #40482] |
Tue, 10 August 2004 08:21  |
i-kant
Messages: 14 Registered: June 2004
|
Junior Member |
|
|
David:
Well I tried going to options > run command > and typing in "main"
without the quotation marks. and then compiled all. andthen pressed
run. here's what I got:
% Compiled module: MPFIT_DUMMY.
% Compiled module: MPFIT_RESETPROF.
% Compiled module: MPFIT_SETMACHAR.
% Compiled module: MPFIT_CALL.
% Compiled module: MPFIT_FDJAC2.
% Compiled module: MPFIT_ENORM.
% Compiled module: MPFIT_QRFAC.
% Compiled module: MPFIT_QRSOLV.
% Compiled module: MPFIT_LMPAR.
% Compiled module: MPFIT_TIE.
% Compiled module: MPFIT_DEFITER.
% Compiled module: MPFIT_PARINFO.
% Compiled module: MPFIT_COVAR.
% Compiled module: MPFIT.
% Compiled module: MPEVALEXPR.
% Compiled module: MPFITEXPR_EVAL.
% Compiled module: MPFITEXPR.
% Compiled module: AUTO_LINE.
% Compiled module: RUNNING_AVERAGE.
% Compiled module: CALIB_WAVE.
% Compiled module: INT_INT.
% Compiled module: $MAIN$.
% Compiled module: MY_LINE.
% Compiled module: MY_ROI.
% Compiled module: PEAK_FINDER.
% Compiled module: PLOT_FC.
% Compiled module: PLOT_ROI.
% Compiled module: READ_FC.
% Compiled module: READ_ROI.
% Compiled module: READ_CALIB.
% Compiled module: READ_HEADER.
% Compiled module: $MAIN$.
% Library file does not contain a procedure or function.
% Compiled module: MAIN.
% Attempt to call undefined procedure/function: 'MAIN'.
% Execution halted at: $MAIN$ 1
C:\IDL\SPE_Examiner\main.pro
Help!
|
|
|
Re: Running an IDL Project [message #40487 is a reply to message #40484] |
Tue, 10 August 2004 01:31  |
tianyf
Messages: 6 Registered: June 2004
|
Junior Member |
|
|
You can find something useful by selecting Project - Options of the IDLDE.
Tian.
i-kant@shaw.ca (Edwin) wrote in message news:<cc362821.0408091824.fd63356@posting.google.com>...
> Up until now I've never actually built a project. I have a main.pro
> that acts as the main program, and I have a bunch of procedures that I
> call with the main program to perform tasks. I open all these files,
> click "compile all", and then run my main.pro.
>
> I would like to make an IDL project now, so instead of having to open
> up the main program and all the procedures and then compile them all,
> I can just open up a project, and click on "compile project".
>
> The problem is I don't seem to be able to run the project. I will
> describe below how I create the project, and maybe someone can tell me
> what i'm doing wrong.
>
> I click on File > New > Project
>
> I enter a name for the project, say "Project.prj"
>
> A Project Workspace pops up titled "project.prj" with folders Source,
> GUI, Data, Images, and Other
>
> I go to Project > Add/Remove Files and I add all the files which I
> previously had to open one by one. All these files are .pro files (one
> main.pro as the main program that calls all the other procedure
> files). All of them are put into the "Source folder" of my project
> workspace.
>
> I go to Project > Compile > All Files
>
> All the files are compiled successfully.
>
> I then go to Project > Run , and I get the following error message:
>
> % Attempt to call undefined procedure/function: 'Project'.
> % Execution halted at: $MAIN$ 1
> C:\IDL\SPE_Examiner\main.pro
>
> main.pro is my main program that calls all the other procedures.
>
> Apparently IDL thinks that my project named "Project" is a
> function/procedure???
>
>
> thanks for any help!
|
|
|
Re: Running an IDL Project [message #40489 is a reply to message #40487] |
Tue, 10 August 2004 01:06  |
Ralf Schaa
Messages: 37 Registered: June 2001
|
Member |
|
|
[...]
>> I then go to Project > Run , and I get the following error message:
>>
>> % Attempt to call undefined procedure/function: 'Project'.
>> % Execution halted at: $MAIN$ 1
>> C:\IDL\SPE_Examiner\main.pro
>>
>> main.pro is my main program that calls all the other procedures.
>>
>> Apparently IDL thinks that my project named "Project" is a
>> function/procedure???
> Go to the Project->Options menu item. Where it says "Run
> Command" type in "main". There you go! :-)
I had exactly the same problem when I created my first project ... this
hint should be the first sentence in the idl help when looking for
'projects' ...
Cheers
-Ralf
|
|
|
Re: Running an IDL Project [message #40493 is a reply to message #40489] |
Mon, 09 August 2004 21:09  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Edwin writes:
> The problem is I don't seem to be able to run the project. I will
> describe below how I create the project, and maybe someone can tell me
> what i'm doing wrong.
>
> I click on File > New > Project
>
> I enter a name for the project, say "Project.prj"
>
> A Project Workspace pops up titled "project.prj" with folders Source,
> GUI, Data, Images, and Other
>
> I go to Project > Add/Remove Files and I add all the files which I
> previously had to open one by one. All these files are .pro files (one
> main.pro as the main program that calls all the other procedure
> files). All of them are put into the "Source folder" of my project
> workspace.
>
> I go to Project > Compile > All Files
>
> All the files are compiled successfully.
>
> I then go to Project > Run , and I get the following error message:
>
> % Attempt to call undefined procedure/function: 'Project'.
> % Execution halted at: $MAIN$ 1
> C:\IDL\SPE_Examiner\main.pro
>
> main.pro is my main program that calls all the other procedures.
>
> Apparently IDL thinks that my project named "Project" is a
> function/procedure???
Go to the Project->Options menu item. Where it says "Run
Command" type in "main". There you go! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|