ncurses and Gwydion Dylan 
Author Message
 ncurses and Gwydion Dylan

In searching for a compilable language to replace C++, I've recently
discovered Dylan, and really like what I see. So, I grabbed Gwydion
Dylan and began trying to learn.

Most of my programs are text-based, so I'm trying to use melange to
generate a ncurses wrapper. My dcurses.intr file looks as follows:

module: dcurses
synopsis: An interface to curses

define library dcurses
  use dylan;
  use streams;
end library dcurses;

define moduled dcurses
  use dylan;
  use extensions;
  use extern;
  use streams;
  use standard-io;
end module dcurses;

define interface
#include "/usr/include/ncurses.h"
end interface;

When I run melange on this, I receive the following errors:

melange: <SCREEN> has multiple definitions
No applicable methods in call of {GF c-accessor} when given arguments:
  #[{<predefined-type-declaration> instance}, "index * 0", "ptr", "<_IO-lock-t>"]
Abort

I conceptually understand the multiple definitions line, though I
don't see what's causing it. AFAIK, ncurses.h declares a screen
struct, and then typedefs SCREEN to that? Is Dylan case insensitive?

Also, I'm not very clear on the meanings of the last two errors. Can
anyone please give me a few pointers?

Thanks.



Mon, 08 Apr 2002 03:00:00 GMT  
 ncurses and Gwydion Dylan


Quote:
> I conceptually understand the multiple definitions line, though I
> don't see what's causing it. AFAIK, ncurses.h declares a screen
> struct, and then typedefs SCREEN to that? Is Dylan case insensitive?

I'm not familiar with Gwydion Dylan or Melange, but yes Dylan is case
insensitive.

__Jason



Tue, 09 Apr 2002 03:00:00 GMT  
 ncurses and Gwydion Dylan

Quote:

> module: dcurses
> synopsis: An interface to curses

> define library dcurses
[...]
> end library dcurses;

> define moduled dcurses
[...]
> end module dcurses;

This will become a problem when compiling the program later. You'll
need to define your libraries and modules inside the module
dylan-user, which means putting those two declarations in a separate
file with a "module: dylan-user" line on top.

Quote:
> melange: <SCREEN> has multiple definitions

This is a case problem, as you already have guessed. Dylan is case
insensitive, and melange has no default way to resolve the
problem. You can manually exclude or rename one of the symbols to
resolve the conflict.

Quote:
> No applicable methods in call of {GF c-accessor} when given arguments:
>   #[{<predefined-type-declaration> instance}, "index * 0", "ptr", "<_IO-lock-t>"]
> Abort

And this is an internal melange problem. Sorry for that. We have
essentially given up on fixing melange after Eric Kidd spent quite
some time on fixing it. melange works for easy cases, such as the
MySQL header files, but grossly fails in other circumstances.

You're options are hacking away at the header file until it works,
writing your own wrapper functions by hand, or waiting until pidgin,
our rewrite of melange, is finished. But we promise no shipping date
for pidgin.

Andreas

--
"We should be willing to look at the source code we produce not as the
end product of a more interesting process, but as an artifact in its
own right. It should look good stuck up on the wall."
 -- http://www.ftech.net/~honeyg/progstone/progstone.html



Tue, 09 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Gwydion Dylan 2.2.0 Released

2. Where to put gc libs for Gwydion Dylan 2.3.10

3. Gwydion Dylan 2.3.9 Released

4. Gwydion-Dylan 2.3.6 much bigger?

5. Gwydion Dylan Release 2.3.5

6. Gwydion Dylan - MacOS X Carbon Demos

7. Gwydion Dylan 2.3.4 Released

8. Mac-d2c port of Mac application in gwydion dylan archive

9. Gwydion Dylan 2.3.3 released

10. Gwydion Dylan port for BeOS available

11. bootstrap problems with Gwydion Dylan 2.3.2

12. Zathras (was Re: Gwydion Dylan 2.3.2 Release)

 

 
Powered by phpBB® Forum Software