#2372 Confused. Using gfx and using fwt marked as error

dxvictor Tue 28 Oct 2014

I installed F4 and configured it to use fantom-1.0.66.

I tried to run:

using gfx
using fwt

**
** FwtHello is as simple as it gets
**
class FwtHello
{
  Void main()
  {
    Window
    {
      size = Size(300,200)
      Label { text = "Hello world"; halign=Halign.center },
    }.open
  }
}

But the two using statements are marked as errors "Not a declared dependency". In "Interpreter Libraries" sys.pod is listed but not gfx.pod or fwt.pod - even though they are in the same directory.

Is there some other place they need to identified?

<doug>

SlimerDude Tue 28 Oct 2014

Hi Doug!

Is there some other place they need to identified?

Yep, you have to list the pods that your project depends on in the project's build.fan file.

When finished, your build.fan should look something like:

using build

class Build : BuildPod {
  new make() {
    podName = "examples"
    summary = ""
    srcDirs = [`fan/`]
    depends = ["sys 1.0", "fwt 1.0", "gfx 1.0"]
  }
}

For an easy guide see:

On those pages there should be plenty of links to the relevant parts of the official documentation too.

Login or Signup to reply.