[Gambas-devel] More cygwin

Brandon Bergren bdragon at ...185...
Mon Nov 22 02:09:32 CET 2004


Quoting Benoit Minisini <gambas at ...1...>:

> On Sunday 21 November 2004 00:02, Brandon Bergren wrote:
> > Hmm...
> >
> > http://www.cygwin.com/ml/cygwin/2004-09/msg01101.html
> > http://www.cygwin.com/ml/cygwin/2004-09/msg01114.html
> >
> > Is this the same problem, you think?
> >
> > --Brandon
> >
> >
> 
> I don't think so.
> 
> The GB_DESC array describes the contents of a component. All symbols 
> referenced in this array of structures are part of the same DLL. Only the 
> array address is exported, and the gbi program reads it with lt_dlsym(), that
> 
> should return the true address of this array, or a pointer to its address if
> 
> I correctly understood what you explained me about DLLs.


But it isn't working.

On your system, do you expect that given:

struct
{
  int foo
} bar;

bar baz[] =
{
  0,
  5
}

bar blinth[] =
{
  0,
  6
}

bar *toot[] =
{
  baz,
  blinth
}

that toot is {0,5,0,6} ?

Doesn't seem to happen on Windows (even if everything's in one file.)

on windows, you get something like
{-2512342,993424123,-235235235 ... etc...

Is this really valid C?

Here's something from the manual page for ld:
       -warn-common
              Warn  when a common symbol is combined with another
              common symbol or with a  symbol  definition.   Unix
              linkers  allow  this  somewhat sloppy practice, but
              linkers on some other  operating  systems  do  not.
              This  option  allows you to find potential problems
              from combining global symbols.

I think Windows is one of those "other operating systems".  Is the description
above what you're trying to do with GB_CLASSES[]?


--Brandon


> 
> -- 
> Benoit Minisini
> mailto:gambas at ...1...
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel







More information about the Devel mailing list