Wednesday, April 30, 2008

not finding a class in the same directory, continued

Here was the problem (simplified):

Main directory one/two/MainProgram
which depended on one/util1, one/util2, one/util3

Some of the complaints were of the sort, if one/util1/ uses class defined in one/util2/, it couldn't see it. "symbol undefined".
Often Foo1 would use something in Foo2 and Foo2 would use Foo1. I don't know if that contributes to the problem.
Furthermore, a file like one/two/MainProgram/ would try to import one.util1.* and be told the package didn't exist, and that the symbol Foo2 or one.util.Foo2 didn't exist.

I put util1, util2, util3 into one project called "Util", and one/two/MainProgram into a different project, called "Maine" and used the "Add Project" button under the Libraries window to add the Util project as a library for Maine.

I still get complaints about not being able to find the symbols defined in the same directory while I'm in the editor, but when I do a "build project", I don't get complaints about symbols undefined, and it does say "BUILD SUCCESSFUL" at the end.

Not a complete solution, but an improvement?

No comments: