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 » U++ TheIDE » U++ TheIDE: Packages » Am I misunderstanding how packages are supposed to work?
Am I misunderstanding how packages are supposed to work? [message #3310] Fri, 19 May 2006 11:07 Go to next message
Babs is currently offline  Babs
Messages: 4
Registered: May 2006
Location: London, UK
Junior Member
Hi there. I've just started looking at U++ with a mind to porting a pretty large app to it and I'm having some issues with how multiple packages work within a project. Hopefully someone can help me.

1- Should you have to #include the header file for a package, even if the package using it has it listed as 'Uses xxxx' in the package organiser? I can't get it to compile otherwise, but it seems to go against the whole point of packages. It also leads to the problem below:

2- I've got a package that has to use some external header files (It's a wrapper for some older software) which require extra include paths for compilation (-I or /I switches). Now, it seems sensible to me that these should only have to be specified for the package that actually needs the headers, or even just the whole project, but no. The only way to make it compile is to add the compiler options to every package that includes the package with the extra headers. This is very annoying as pretty much all of the packages in my app need to access it.

I assume I'm missing something simple here because if this is the way it's supposed to work it's actually more hassle than just including everything in one big package. At least then I'd only have to specifiy compilation options once for the whole project. I would be grateful if someone could shed some light on this for me.

On the plus side - I like pretty much everything else Smile

Thanks in advance.


355e58fb36af625a92a9946dfe1f43b2
Re: Am I misunderstanding how packages are supposed to work? [message #3311 is a reply to message #3310] Fri, 19 May 2006 11:50 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member

In TheIDE, click on the pink "help index" button, then have a read of "packages, assemblies and nests" (which I wrote) - especially the section near the end on "alternative include path mechanisms".

In there, I wrote

"the package-organizer allows you to enter additional switches to be passed to the compiler for all packages, for specific packages or for specific source files"

but I forget how to enter switches that apply to all packages ... Smile - maybe Mirek can say if this is possible ...

Anyway, you can also use the "nest path setting" in the assembly setup - as described in "alternative include path mechanisms". I suggest you try and read all of "packages, assemblies and nests" though.

In answer to question 1 - what do you mean by the "header file for a package". Do you mean if you have a package called pkg1, then there is a header file called pkg1.h. You definitely have to do the #include pkg1.h yourself, even when your package uses pkg1. If U++ tried to auto #include certain header files I think it would seriously screw up some code. When a package uses another package, it just means that U++ will try to build and use the object files/libs of the used packages when it builds/links the main package.

Graeme
Re: Am I misunderstanding how packages are supposed to work? [message #3312 is a reply to message #3310] Fri, 19 May 2006 11:59 Go to previous messageGo to next message
Babs is currently offline  Babs
Messages: 4
Registered: May 2006
Location: London, UK
Junior Member
Cheers. I feel a bit of an idiot for missing the help section, I didn't see a menu for it and just assumed there wasn't any.

355e58fb36af625a92a9946dfe1f43b2
Re: Am I misunderstanding how packages are supposed to work? [message #3314 is a reply to message #3310] Fri, 19 May 2006 12:24 Go to previous messageGo to next message
Babs is currently offline  Babs
Messages: 4
Registered: May 2006
Location: London, UK
Junior Member
I don't feel quite so stupid now as it's the same info that's on the website. While well-written and useful as an introduction it is somewhat lacking in specifics (this is not a dig - writing good documentation is both difficult and tedious and I'm glad you made the effort). It does seem I misunderstood how packages are supposed to work though, thanks for the pointers.

You do indeed write:
"the package-organizer allows you to enter additional switches to be passed to the compiler for all packages, for specific packages or for specific source files"
And then don't say how Smile

Does anyone know?



355e58fb36af625a92a9946dfe1f43b2

[Updated on: Fri, 19 May 2006 12:27]

Report message to a moderator

Re: Am I misunderstanding how packages are supposed to work? [message #3315 is a reply to message #3314] Fri, 19 May 2006 12:35 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
Babs wrote on Fri, 19 May 2006 22:24

I don't feel quite so stupid now as it's the same info that's on the website. While well-written and useful as an introduction it is somewhat lacking in specifics (this is not a dig - writing good documentation is both difficult and tedious and I'm glad you made the effort). It does seem I misunderstood how packages are supposed to work though, thanks for the pointers.

You do indeed write:
"the package-organizer allows you to enter additional switches to be passed to the compiler for all packages, for specific packages or for specific source files"
And then don't say how Smile

Does anyone know?





Actually I've just noticed I described how it works in the "Package build settings" section of "Configuring packages and assemblies". The link from the "packages, assemblies and nests" topic isn't currently able to specify the specific section so I guess I should have named the section when linking to it Smile
Feel free to suggest improvements to the help files. The help system is a sort of organised chaos at present Smile - but Mirek answers most things fairly quickly.

Graeme


Re: Am I misunderstanding how packages are supposed to work? [message #3316 is a reply to message #3310] Fri, 19 May 2006 13:14 Go to previous messageGo to next message
Babs is currently offline  Babs
Messages: 4
Registered: May 2006
Location: London, UK
Junior Member
Thanks for your speedy reply, but unless I've missed something that section is purely about build configurations. This is fine, and the way I've configured my packages at the moment (by adding the compiler switches to each package tied to WIN32), but it makes no mention of how to add an option (be it compiler switches or additional libs) that will automatically be applied to all packages in the project without having to add it manually to each one.

If such a thing exists I would like to know how to do it but at the end of the day it more an annoyance/laziness issue than anything else. And I can't bitch too much because since it's open source I can always add it myself Smile

Likewise with the documentation - I appreciate that people are doing this for free, so I'm not expecting MSDN. More specifics about some of the features would be nice, but as the TheIDE is still a work in progress I can understand how this is difficult.

If I continue to use U++ I'll be sure to try and make some sort of contribution myself, be it documentation or features.


355e58fb36af625a92a9946dfe1f43b2
Re: Am I misunderstanding how packages are supposed to work? [message #3317 is a reply to message #3316] Fri, 19 May 2006 13:50 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
Babs wrote on Fri, 19 May 2006 23:14

Thanks for your speedy reply, but unless I've missed something that section is purely about build configurations. This is fine, and the way I've configured my packages at the moment (by adding the compiler switches to each package tied to WIN32), but it makes no mention of how to add an option (be it compiler switches or additional libs) that will automatically be applied to all packages in the project without having to add it manually to each one.

If such a thing exists I would like to know how to do it but at the end of the day it more an annoyance/laziness issue than anything else. And I can't bitch too much because since it's open source I can always add it myself Smile



Um, well, it says this in the help file ...

<quote>
"Compiler options. These are text strings that will be supplied on the command line to the compiler. These will be added to the command line after (at the end of) the compiler options generated by TheIDE. These options affect all source files being compiled, not just those from the main package, however you can use build flags and the "dotted" mechanism (see Package-build-configurations above) to restrict which packages the options are applied to."
<end quote>


In the package organizer, to add compiler options, right click and select "new compiler options", then enter e.g. GCC in the "When" column and -Iwhatever in the options column, or e.g. MSC8 in the when column and /Iwhatever in the options column.

According to what I wrote in the help file, the -I or /I switches as above will be used for all source files compiled in the project across all packages. I believe I tested this at the time I wrote it but I'm not 100% sure I tested it "transitively".

Am I making any sense ??

Graeme
Re: Am I misunderstanding how packages are supposed to work? [message #3320 is a reply to message #3316] Fri, 19 May 2006 23:27 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Babs wrote on Fri, 19 May 2006 07:14

Thanks for your speedy reply, but unless I've missed something that section is purely about build configurations. This is fine, and the way I've configured my packages at the moment (by adding the compiler switches to each package tied to WIN32), but it makes no mention of how to add an option (be it compiler switches or additional libs) that will automatically be applied to all packages in the project without having to add it manually to each one.



If you would like to experiment with compiler options (e.g. for speed), then you should rather be interested in altering/adding the build method... (may I ask what compiler switches you need to specify?)

To add additional libs, simply add it to some of packages.

Mirek
Previous Topic: Bug
Next Topic: DLL or OCX ??
Goto Forum:
  


Current Time: Fri Mar 29 15:17:31 CET 2024

Total time taken to generate the page: 0.01579 seconds