[Gambas-devel] Build a Component

ron ronstk at ...124...
Fri Mar 17 21:20:23 CET 2006


On Friday 17 March 2006 19:56, Scott, Vince wrote:
> Thanks. I'm having a difficult time getting the 1.9.26 to compile.
> First, I get a make error... it doesn't like the parameter -fvisibility.

These are more error/warning if some dependencies are missing.
General the components use libraries and the test is for these.
Soe of the libraries use also other libraries and it can be a missing 
of 3'trd level libraries with the coresepondent -devel files as *.h.


> Second, I am new to the Linux world and I am not that comfortable with
> the file system and where things get put or pulled from...so I am not
> sure if I have all the libraries required. 

See http://www.freedesktop.org/wiki/ or http://www.freeos.com/articles/3102/ and
http://www.pathname.com/fhs/pub/fhs-2.3.html (prefer by me)

In general you can see it as follows

/bin ' the general executable files
/lib ' the libraries for the them
  these are the system map/files

/usr/bin 
/usr/lib
/usr/include
/usr/src
  the /usr in front mean basic the same as usable for all users
  this is also the place the distribution stores general the applications

/usr/local/bin
/usr/local/lib
/usr/local/include
/usr/local/src 
  the /usr/local is the place for admin to place the apps typical for the
  system and global use for all users, also admin made updates for distribution
  apps find here a place. 
  the distribution expects the orginal executables in /usr/bin and not the user changend versions.

/home/<yourname> has the same directories
  Not all distro's create them but the user can do
  the /bin /lib /include and /src has the same meaning as above but usable only
  for the user <yoourname>

for the '/src' part, this is the place all happens.
As private developer you should have it in
/home/<youname>/src/gambas-1.9.26 and do the work here or
/usr/local/src/gambas-1.9.26 for the system admin or
/usr/src/gambas-1.9.26 but this one is not wise.

> I was able to compile 1.0.14 
> without any issues. Can both of these exist and run on the same machine?

As far I know it can because the directoies are named gambas and gambas2
suse 8.2 in place them in /opt/gambas and /opt/gambas2
the other distro's put then in /usr, /usr/share (i.e. the gvb packages are also here)
/usr/local can also be used by some.

> 
> What I am really trying to do or would like to do is from the "stable"
> version make calls to C libraries. I wanted to write a component to do
> this and I was lead the gb.api to see how this might have been
> accomplish but is no longer part of the 1.9 files...so I am kind of lost
> as how I need to go about this. 

Lost is bad, but for making components you can look in the 'TEMPLATE' direcory in
the source code tree of gambas 1.9.26, there is a example guide how to start.
Reading a bit more in the source tree and you/anyone can find more example code.

Also for programming a project it is not bad to make a copy of the source tree
to a safe place in the home directory. By starting a second instance of gambas
you can browse the basic sourcecode of the IDE and database-manager.
There you can find many usable tricks/methods for your own application.

> Our company is moving to Linux and we 
> would really like to use Gambas as a GUI tool but need to make calls to
> business logic in 'C' libraries.

These 'C' libraries should be compiled on/for linux, the windows version does
not work in general in a gnu/linux environment.

> 
> Any suggestions or direction would be greatly appreciated!!
> 
> Thanks for your help.
> Vince
> 


Ron




More information about the Devel mailing list