Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
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 Smile.

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.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: upp 1875 + Ubuntu 9.10
Next Topic: Using U++ with existing code
Goto Forum:
  


Current Time: Mon May 13 08:54:38 CEST 2024

Total time taken to generate the page: 0.02343 seconds