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

Home » Public Forums » archive » Re: build project to executable .sav binary eclipse
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
Re: build project to executable .sav binary eclipse [message #69074] Tue, 22 December 2009 14:53
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Robbie wites:

> I just thought I might mention that you can also trick resolve_all
> into resolving classes by calling the structure definition statement.
>
> For example if you wrote:
>
> idlgrlegend__define
> obj = obj_new('idlgrlegend__define')
>
> Then resolve_all would resolve the class at compile time.

Well, at least it would if all the object methods
were in that __define file and the modules were
named properly. :-)

It would probably be more reliable to do this:

IDL> .Compile idlgrledgend__define
IDL> Resolve_All

This is, essentially, what you have to do to build a project
with a lot of user-defined objects in it. That is to say,
you write an IDL script with a whole lot of .compile statements
in it before you get to the RESOLVE_ALL statement.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: build project to executable .sav binary eclipse [message #69076 is a reply to message #69074] Tue, 22 December 2009 14:27 Go to previous message
Robbie is currently offline  Robbie
Messages: 165
Registered: February 2006
Senior Member
Hi,

I just thought I might mention that you can also trick resolve_all
into resolving classes by calling the structure definition statement.

For example if you wrote:

idlgrlegend__define
obj = obj_new('idlgrlegend__define')

Then resolve_all would resolve the class at compile time.

Robbie
Re: build project to executable .sav binary eclipse [message #69085 is a reply to message #69076] Tue, 22 December 2009 08:31 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 22, 12:12 pm, David Fanning <n...@dfanning.com> wrote:
> My biggest problem was figuring out how to build
> a Virtual Machine for the different platforms. Basically,
> you have to have IDL running on the platform you
> want to build a VM for. This can be tricky when you
> don't own all these platforms. Fortunately, some of
> your neighbors own machines you don't have, so if you
> bake them a plate of cookies, you might be able to
> borrow their machines for an hour or two.

Just to build it, it is not necessary to have IDL on the target
platform. You need only to provide IDL with the necessary files. See

http://www.ppenteado.net/idl/idl71_rt.html

Testing is another matter. One alternative to test in Linux is to use
a Live CD. It is inconvenient to have to reboot to test, but I find it
easier than baking cookies.

This also suggests me that testing for Windows in Linux could be done
with wine, but I never tried that.
Re: build project to executable .sav binary eclipse [message #69086 is a reply to message #69085] Tue, 22 December 2009 06:47 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
David,
you have a sense of humor :) Nevertheless, ITTVIS suggests in their
help that this and that won't work there, so maybe they should think
about their future data and routine compatiblity strategy. How about
to create real binaries? How about to give some source code of the
ENVI routines? How about to enable 'execute' and ENVI-routines in the
VM? So many questions...

Regards and some cookies :)

CR
Re: build project to executable .sav binary eclipse [message #69087 is a reply to message #69086] Tue, 22 December 2009 06:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
chris writes:

> is there a way to check somehow the linux compatibility without using
> a linux in a virtual machine such as VirtualBox? It seems to be that
> there are many other *confusions, not only due to !path.

My biggest problem was figuring out how to build
a Virtual Machine for the different platforms. Basically,
you have to have IDL running on the platform you
want to build a VM for. This can be tricky when you
don't own all these platforms. Fortunately, some of
your neighbors own machines you don't have, so if you
bake them a plate of cookies, you might be able to
borrow their machines for an hour or two.

I had never heard of VirtualBox until a couple of
minutes ago, but perhaps that is one solution. At least
if the machine in front of you is a Mac. Otherwise,
the cookie route is still a good one. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: build project to executable .sav binary eclipse [message #69089 is a reply to message #69087] Mon, 21 December 2009 23:51 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
David,
is there a way to check somehow the linux compatibility without using
a linux in a virtual machine such as VirtualBox? It seems to be that
there are many other *confusions, not only due to !path.

Thanks and best regards

CR
Re: build project to executable .sav binary eclipse [message #69093 is a reply to message #69089] Mon, 21 December 2009 14:05 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
j.coenia@gmail.com wites:

> But if everything in the IDL preferences paths is *also* included in
> my project folder, I should be OK, right?

Right. Unless you aren't. In which case, ....

Well, let's just assume it is all going to go
as we expect it to go, OK. ;-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: build project to executable .sav binary eclipse [message #69094 is a reply to message #69093] Mon, 21 December 2009 13:47 Go to previous message
j.coenia@gmail.com is currently offline  j.coenia@gmail.com
Messages: 36
Registered: December 2008
Member
> You are not even CLOSE to nightmare stage yet. ;-)

Great. That's just really great to hear from the guy who wrote the
book on IDL. :)

I guess it's sort of analogous to include/import statements in other
languages... I'll just have to organize everything into better
libraries.

But if everything in the IDL preferences paths is *also* included in
my project folder, I should be OK, right?

JC
Re: build project to executable .sav binary eclipse [message #69095 is a reply to message #69094] Mon, 21 December 2009 13:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
j.coenia@gmail.com wites:

> That just seems nuts.

Well, just wait until you try to put this application
on a CD that can be read by Windows, Max, and LINUX
users. You are not even CLOSE to nightmare stage yet. ;-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: build project to executable .sav binary eclipse [message #69096 is a reply to message #69095] Mon, 21 December 2009 13:09 Go to previous message
j.coenia@gmail.com is currently offline  j.coenia@gmail.com
Messages: 36
Registered: December 2008
Member
IDL> Help, /Source
STRSPLIT C:\Program Files\ITT\IDL70\lib\strsplit.pro

I still don't really understand why RESOLVE_ALL can't find it when I
build the project. Surely I don't have to include even the IDL
library folder in my project folder? It seems like both you guys
think I'll probably have to include *every single* user or and even
non-user library, just to be sure. That just seems nuts.

Thanks for commiserating. JC
Re: build project to executable .sav binary eclipse [message #69097 is a reply to message #69096] Mon, 21 December 2009 12:31 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
I feel your pain too :( Same to me by trying to build a sav-file from
a big project. The only solution was for me to put everything except
in-built routines into one big file... They discuss on how to change
object references in IDL 8, but how about bug fixing of the current
version due to e.g. this problem? Python comes closer and closer :(

Regards

CR
Re: build project to executable .sav binary eclipse [message #69098 is a reply to message #69097] Mon, 21 December 2009 12:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
j.coenia@gmail.com wites:

> Now it says it can't find STRSPLIT... a built-in function! What
> gives?
>
> Again, the exact same program works fine from the IDLDE command line,
> it's the binary .sav application that's getting these errors.
>
> I'm really puzzled. How can IDLRT say that it can't find its own
> routine?

Well, STRSPLIT is not a built-in routine. But it is
a library routine, written in the IDL language. You'd
think it could be found by RESOLVE_ALL. But StrSplit
is a common name, found in many libraries. When you
run your program from the IDL command line, which
version of StrSplit are you finding? You can type:

IDL> Help, /Source

to find out. Is it looking (and finding) some other
routine with the same name?

IDLRT can't find things on its own, because it doesn't
have (ever!) an IDL Path to look on.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: build project to executable .sav binary eclipse [message #69099 is a reply to message #69098] Mon, 21 December 2009 12:13 Go to previous message
j.coenia@gmail.com is currently offline  j.coenia@gmail.com
Messages: 36
Registered: December 2008
Member
Now it says it can't find STRSPLIT... a built-in function! What
gives?

Again, the exact same program works fine from the IDLDE command line,
it's the binary .sav application that's getting these errors.

I'm really puzzled. How can IDLRT say that it can't find its own
routine?
Re: build project to executable .sav binary eclipse [message #69103 is a reply to message #69099] Mon, 21 December 2009 10:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
j.coenia@gmail.com wites:

> Thanks... Not really what I wanted or expected to hear. I expected
> to hear that I was doing it all wrong, and that RESOLVE_ALL really
> could resolve all my problems if used properly. I can't believe they
> haven't addressed this somehow!

Well, RESOLVE_ALL does have a CLASS keyword which allows
you to list all the object classes you want to compile.
It's just that it is WAY too easy to forget one or two
(dozen, maybe!) in a large application. In other words,
it doesn't really solve the problem, just blames the
victim. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: build project to executable .sav binary eclipse [message #69105 is a reply to message #69103] Mon, 21 December 2009 10:31 Go to previous message
j.coenia@gmail.com is currently offline  j.coenia@gmail.com
Messages: 36
Registered: December 2008
Member
Thanks... Not really what I wanted or expected to hear. I expected
to hear that I was doing it all wrong, and that RESOLVE_ALL really
could resolve all my problems if used properly. I can't believe they
haven't addressed this somehow!

Happy Holidays,
JC
Re: build project to executable .sav binary eclipse [message #69106 is a reply to message #69105] Mon, 21 December 2009 09:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
j.coenia@gmail.com wites:

> It's very frustrating. I'm sure it's just something stupid. This is
> a huge program with many user-defined objects. It's taking me forever
> to step through the binary app waiting for it to throw an error dialog
> for every single un-found routine, then to add the un-found routine to
> my custom build routine, then re-build and re-test everything, which
> is ridiculous. All I want for Christmas is a solution to this!

Yes, I feel your pain. :-)

While Build Project can compile all the user-defined objects
in the project just fine, it can't seem to find any user-
defined objects that lie outside the project on some other
path. The solution, of course, is to put *all* the files
used by the project into one big project, thereby defeating
the whole idea of projects (or file systems, for that matter.)

If RESOLVE_ALMOST_ALL could really be turned into a
RESOLVE_ALL that found user-defined object code, more
of us might actually be encouraged to use objects in
our programs. But in the meantime, you are essentially
forced to use a compile script that you are going to
have to write yourself, which will chase down and
compile all those user-defined objects outside the project.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: line generalization
Next Topic: Re: More problems with Build Project, IDLDE vs IDLRT question

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

Current Time: Wed Oct 08 15:26:29 PDT 2025

Total time taken to generate the page: 0.00578 seconds