[Gambas-user] Debugging program to find error

craf prog at ...2177...
Mon Apr 12 01:26:29 CEST 2010


-----Mensaje original-----
De: Benoît Minisini <gambas at ...1...>
Reply-to: mailing list for gambas users
<gambas-user at lists.sourceforge.net>
Para: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Asunto: Re: [Gambas-user] Debugging program to find error
Fecha: Sun, 11 Apr 2010 14:58:18 +0200


> -----Mensaje original-----
> De: Benoît Minisini <gambas at ...1...>
> Reply-to: mailing list for gambas users
> <gambas-user at lists.sourceforge.net>
> Para: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Asunto: Re: [Gambas-user] Debugging program to find error
> Fecha: Thu, 8 Apr 2010 18:29:17 +0200
> 
> > Hi
> > 
> > Continuing with experiments to try to implement a project of Gambas on a
> > computer that does not have the IDE using the variable GB_DIR.
> > 
> > The main problem is to debug the project on the computer that Gambas is
> > not installed because the debugger does not work with the parameters
> > indicated on the website of Benoit.
> > 
> > I have tried to solve this by placing the routes where the executable.
> > Example:
> > 
> > Edit  /etc/environment and added:
> > 
> > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/
> > op t/project/gambas2/bin
> > 
> > Then run gbc2 -agt and gives me the following:
> > 
> > /opt/project/ FMain.class: 15: Unknown identifier: Button
> > 
> > any idea?
> > 
> > For testing purposes, the project consists of only one form and a
> > button.
> > 
> > 
> > Note:
> > I'm testing this on a Ubuntu 8.04 distribution without Gambas 2
> > installed, running through VirtualBox.
> > 
> > Regards
> > 
> > [OperatingSystem]
> > OperatingSystem=Linux
> > KernelRelease=2.6.28-14-generic
> > DistributionVendor=ubuntu
> > DistributionRelease="Ubuntu 9.04"
> > 
> > [System]
> > CPUArchitecture=i686
> > TotalRam=1026628 kB
> > 
> > [Gambas]
> > Gambas1=Not Installed
> > Gambas2=2.20.2
> > Gambas2Path=/usr/local/bin/gbx2
> > Gambas3=2.99.0
> > Gambas3Path=/usr/local/bin/gbx3
> >
> >If you want to compile, and debug, you have to install Gambas. What you
> >are doing is step by step creating a script that installs Gambas. You are
> >reinventing the concept of binary package! Why not using them so?
> 
> Nooo, I do not reinvent the wheel, I'm not good programmer to do that ;=).
> 
> I just want to see the possibility of a Gambas project, compiling it and
> using the variable GB_DIR, take it to another computer without having to
> download the necessary components to run the application, and be
> independent if I install it on a distribution 9.10 ,8.10 or 8.04 in
> Ubuntu (In the first instance).-
> Please correct me if I understand wrong, but when you generate a deb
> package and automatically install it on another computer, this request
> and install the components needed. Now, I imagine that if I want to
> install a compiled project of Gambas on another computer, without the
> need to download the packages from the internet, I must use the variable
> GB_DIR, and pack all the necessary libraries of components, such as
> gb.draw.so, gb.gtk.so, etc, depending on the components that are
> described in the file .proyect.
> Now the problem is that these libraries as I need other necessary shared
> libraries to run the apliacion, which are different for each
> distribution.
> What I want is to carry my application with all dependencies included,
> either, components and shared libraries. The only problem, that by doing
> this, the interpreter gbx2 can not find the library libffi.so and that I
> am trying to solve.
> I just need to move an entire folder with the interpreter, components
> and shared libraries to a location, such as / opt / project. Running a
> file .sh, which is indicated by export routes.
> 
> Thanks for your time.
> 
> Regards
> 

>OK, I see. You have to reinventing the wheel, because your target systems do 
>not have an Internet access. :-)

>Anyway, if libffi.so is missing, why not just added it to your package?

>And if you want to use the compiler, you must install all the *.info and 
>*.list files associated with the components.

>Regards,

>-- 
>Benoît Minisini

Hello. 


I see that I can not explain it yet. :=)

add email sent by you:

Benoît Minisini write:
With the revision #2401, you can define a GB_DIR environment variable
that points at the Gambas installation directory.

With that, you should be able to run Gambas from your USB key, provided
that the destination O.S. has all the needed shared libraries installed.

You can put all the needed shared libraries on the USB key too, and run
Gambas completely, by using the LD_LIBRARY_PATH environment variable.

> Regards



you must:

0) Run ldd on the *.so files of all gambas components used by your
application 
to make a list of needed shared libraries. Don't forget to run ldd on
the 
interpreter.

1) Put all detected shared libraries in a folder. Let's name it
"/my/ld/dir"

2) Copy a gambas installation directory in another folder. Let's name
it 
"/my/gambas/dir".

3) Create a script like that:

#!/bin/sh
export LD_LIBRARY_PATH=/my/ld/dir:$LD_LIBRARY_PATH
export GB_DIR=/my/gambas/dir
exec /my/application.gambas

This is just the principle. To make that cleanly, you must detect the
current 
directory in your script, and build /my/ld/dir and /my/gambas/dir
absolute 
paths from path relative to the current directory. You should check that
the 
running system has the good architecture too.

If somebody succeeds in doing that, please tell. A good guy would be
able to 
even create a wizard for the IDE that would do the job automatically. I
don't 
have the time for that at the moment!

Regards,

-- 
Benoît Minisini


That's what I'm trying to do, a ¡Wizzard to do the job automatically!.

I appreciate your understanding:

Regards.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list