Home » Community » Newbie corner » header file problem
Re: header file problem [message #24691 is a reply to message #24686] |
Wed, 27 January 2010 10:33   |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
Sorry about that. It is hard to determine what level of detail to give. I varies from person to person.
But working with packages is both very easy and very confusing for U++ newcomers. Yet it is a central part of U++, and you absolutely need to learn the basics.
Something learned the hard way is still learned .
Since you come from come from a Java background, it is easy to compare a package to a .jar. A nest is simply a folder where you have more JARs/packages. All the nests that you are using to get a binary is called an assembly, but is very similar to the classpath from Java.
So if you call your package "Foo" and want to do what you did in that code, Foo will need Core and Web. When you add Core, it will automatically add the dependencies, in this case "plugin/z". When you add Web, it will add the dependencies again. Web depends on Core, but you already have it, so it won't be added again. You could have added Web directly, and it would have pulled in Core.
Because you included the header for these packages it compiled because it found the declaration of the items you were using. But when linking, because Web was not added, you basically "had Web.jar missing from your classpath. The classloader failed". I hope I did not confuse you more with my Java metaphor.
|
|
|
Goto Forum:
Current Time: Wed May 14 14:08:10 CEST 2025
Total time taken to generate the page: 0.00688 seconds
|