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: Compiling, Linking, Debugging of your packages » Again about packages
Again about packages [message #11917] Mon, 01 October 2007 10:48 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
I've got a new question about packages.
I have a big library, separated into sections, each of them is composed of many modules.
For example :

          module a
Section 1 module b
          ........
          module n

          module a
Section 2 module b
          ........
          module z

I converted it to package format, giving a directory structure like this :

LibraryName/Section1/moduleA
LibraryName/Section1/moduleB
LibraryName/Section1/.......
LibraryName/Section1/moduleN
LibraryName/Section2/moduleA
LibraryName/Section2/moduleB
LibraryName/Section2/.......
LibraryName/Section2/moduleZ


And I've put upp files on each module, making so a package for each module.
Now, I'd like to know if it is possible to make a big package comprising all modules of each section, and have a dynamic module for it, and if so how it's done.
I also need to give some compiler options on per-file basis
(some defines and some compiler flags); if it's not possible to do it on a per-file basis, at least on a package basis.
For now I've resorted to do it on global compiler options, but that's not a satisfactory way, as this library requires some compatibility flags that enables compiler quirks that I don't like to have enabled an all sources.

Thanx in advance for any help !

Ciao

Max
Re: Again about packages [message #11919 is a reply to message #11917] Mon, 01 October 2007 11:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12118
Registered: November 2005
Ultimate Member
mdelfede wrote on Mon, 01 October 2007 04:48

I've got a new question about packages.
I have a big library, separated into sections, each of them is composed of many modules.
For example :

          module a
Section 1 module b
          ........
          module n

          module a
Section 2 module b
          ........
          module z

I converted it to package format, giving a directory structure like this :

LibraryName/Section1/moduleA
LibraryName/Section1/moduleB
LibraryName/Section1/.......
LibraryName/Section1/moduleN
LibraryName/Section2/moduleA
LibraryName/Section2/moduleB
LibraryName/Section2/.......
LibraryName/Section2/moduleZ


And I've put upp files on each module, making so a package for each module.
Now, I'd like to know if it is possible to make a big package comprising all modules of each section, and have a dynamic module for it, and if so how it's done.



This depends on many things. However, one showstopper is that you cannot have only a part of application as .dll/.so (it is however possible that some future U++ version will allow this using multiple main packages...).

Quote:


I also need to give some compiler options on per-file basis
(some defines and some compiler flags); if it's not possible to do it on a per-file basis, at least on a package basis.
For now I've resorted to do it on global compiler options, but that's not a satisfactory way, as this library requires some compatibility flags that enables compiler quirks that I don't like to have enabled an all sources.



This is simple and I guess this part is perfectly covered by U++ build system.

You do this in Package organizer. You can do this for the whole package or on per-file basis.

Mirek
Re: Again about packages [message #11920 is a reply to message #11919] Mon, 01 October 2007 12:56 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
luzr wrote on Mon, 01 October 2007 11:39


This depends on many things. However, one showstopper is that you cannot have only a part of application as .dll/.so (it is however possible that some future U++ version will allow this using multiple main packages...).


ah, ok... So the thing I can do is to make main package for each section, build the dll and then use them on main project as external libraries, am I right ?

Quote:



This is simple and I guess this part is perfectly covered by U++ build system.

You do this in Package organizer. You can do this for the whole package or on per-file basis.



That'll be perfect, thanx ! Sorry if the question was trivial, but I searched for it some time and didn't find the way.

Ciao

Max
Re: Again about packages [message #11922 is a reply to message #11917] Mon, 01 October 2007 13:26 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 801
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor

Quote:

That'll be perfect, thanx ! Sorry if the question was trivial, but I searched for it some time and didn't find the way.


http://www.ultimatepp.org/app$ide$ConfiguringPackagesAssembl ies$en-us.html

[Updated on: Mon, 01 October 2007 13:26]

Report message to a moderator

Re: Again about packages [message #11924 is a reply to message #11922] Mon, 01 October 2007 13:50 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
mr_ped wrote on Mon, 01 October 2007 13:26


http://www.ultimatepp.org/app$ide$ConfiguringPackagesAssembl ies$en-us.html


I'm still missing on how to set compiler options on per-file basis.
And (but I think I'm asking too much...) if it's possible to have different per-file compiler flags on differents build targets.

All that will spare me many compiler warnings on 'badly' coded files, still leaving strict checks on all ather modules.

Ciao

Max

p.s.: The import of OpenCascade Library inside TheIDE is 99% complete... if somebody is interested on it, I can post the 'packer' app.

Re: Again about packages [message #11926 is a reply to message #11924] Mon, 01 October 2007 15:26 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12118
Registered: November 2005
Ultimate Member
mdelfede wrote on Mon, 01 October 2007 07:50

mr_ped wrote on Mon, 01 October 2007 13:26


http://www.ultimatepp.org/app$ide$ConfiguringPackagesAssembl ies$en-us.html


I'm still missing on how to set compiler options on per-file basis.



Package organizer, bottom right table, right-click (but you have to have the file selected in bottom left table).

Quote:


And (but I think I'm asking too much...) if it's possible to have
different per-file compiler flags on differents build targets.



Yes. Anything in package organizer can have When condition.

Mirek

Re: Again about packages [message #11927 is a reply to message #11926] Mon, 01 October 2007 16:12 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
luzr wrote on Mon, 01 October 2007 15:26


Package organizer, bottom right table, right-click (but you have to have the file selected in bottom left table).

............

Yes. Anything in package organizer can have When condition.




Thank you for the help !

Ciao

Max
Re: Again about packages [message #11931 is a reply to message #11926] Tue, 02 October 2007 00:14 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
luzr wrote on Mon, 01 October 2007 15:26


Package organizer, bottom right table, right-click (but you have to have the file selected in bottom left table).
..............
Yes. Anything in package organizer can have When condition.



Uhhmmmm... package options work well, per-file options don't.
Setting verbose mode shows that compiler is called for file without the per-file options....
For example :
In package options, I have :
when          compiler options
<blank>       -ffunction-sections  -fPIC -funsigned-char -Wall -fmessage-length=0 -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS  -DNOPROTECTION -DCSFDB -DHAVE_WOK_CONFIG_H  -DHAVE_CONFIG_H -DNDEBUG -DNo_Exception -MD

In bottom-left table, selecting the file, I have :
when          additional compiler options for the file
<blank>       -ffriend-injection -fpermissive

and the compile line for the file is
Underflow_0.cxx
c++ -c  -I"/home/massimo/sources/upp/OpenCascade" -I"/home/massimo/sources/upp/uppsrc" -I"/usr/include/freety
	pe2" -I"/usr/include/gtk-2.0" -I"/usr/include/glib-2.0" -I"/usr/lib/glib-2.0/include" -I"/usr/lib/gtk-2.0
	/include" -I"/usr/include/cairo" -I"/usr/include/pango-1.0" -I"/usr/include/atk-1.0" -DflagMAIN -DflagGCC
	 -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagNOLIB -DbmYEAR=2007 -DbmMONTH=10
	 -DbmDAY=2 -DbmHOUR=0 -DbmMINUTE=5 -DbmSECOND=52 -ggdb -g2 -ffunction-sections  -fPIC -funsigned-char -Wa
	ll -fmessage-length=0 -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS  -DNOPROTECTION -DCSFDB -DHAVE_WOK_CONFIG_H 
	 -DHAVE_CONFIG_H -DNDEBUG -DNo_Exception -MD -fexceptions  -D_DEBUG -O0 -x c++ "/home/massimo/sources/upp
	/OpenCascade/FoundationClasses/Standard/drv/Underflow_0.cxx" -o "/home/massimo/sources/upp/out/Foundation
	Classes/Standard/GCC.Debug_full.Main.Shared/Underflow_0.o"


so no --ffriend-injection .... in compiler command line.

Ciao

Max

EDIT : well, for now I'll resort with global package options, the only drawback are some warnings on plain c files.

[Updated on: Tue, 02 October 2007 00:25]

Report message to a moderator

Re: Again about packages [message #12152 is a reply to message #11931] Sat, 13 October 2007 11:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12118
Registered: November 2005
Ultimate Member
mdelfede wrote on Mon, 01 October 2007 18:14

luzr wrote on Mon, 01 October 2007 15:26


Package organizer, bottom right table, right-click (but you have to have the file selected in bottom left table).
..............
Yes. Anything in package organizer can have When condition.



Uhhmmmm... package options work well, per-file options don't.
Setting verbose mode shows that compiler is called for file without the per-file options....
For example :
In package options, I have :
when          compiler options
<blank>       -ffunction-sections  -fPIC -funsigned-char -Wall -fmessage-length=0 -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS  -DNOPROTECTION -DCSFDB -DHAVE_WOK_CONFIG_H  -DHAVE_CONFIG_H -DNDEBUG -DNo_Exception -MD

In bottom-left table, selecting the file, I have :
when          additional compiler options for the file
<blank>       -ffriend-injection -fpermissive

and the compile line for the file is
Underflow_0.cxx
c++ -c  -I"/home/massimo/sources/upp/OpenCascade" -I"/home/massimo/sources/upp/uppsrc" -I"/usr/include/freety
	pe2" -I"/usr/include/gtk-2.0" -I"/usr/include/glib-2.0" -I"/usr/lib/glib-2.0/include" -I"/usr/lib/gtk-2.0
	/include" -I"/usr/include/cairo" -I"/usr/include/pango-1.0" -I"/usr/include/atk-1.0" -DflagMAIN -DflagGCC
	 -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagNOLIB -DbmYEAR=2007 -DbmMONTH=10
	 -DbmDAY=2 -DbmHOUR=0 -DbmMINUTE=5 -DbmSECOND=52 -ggdb -g2 -ffunction-sections  -fPIC -funsigned-char -Wa
	ll -fmessage-length=0 -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS  -DNOPROTECTION -DCSFDB -DHAVE_WOK_CONFIG_H 
	 -DHAVE_CONFIG_H -DNDEBUG -DNo_Exception -MD -fexceptions  -D_DEBUG -O0 -x c++ "/home/massimo/sources/upp
	/OpenCascade/FoundationClasses/Standard/drv/Underflow_0.cxx" -o "/home/massimo/sources/upp/out/Foundation
	Classes/Standard/GCC.Debug_full.Main.Shared/Underflow_0.o"


so no --ffriend-injection .... in compiler command line.

Ciao

Max

EDIT : well, for now I'll resort with global package options, the only drawback are some warnings on plain c files.



Strange, I have checked to be sure and it seems to work:

----- Chess ( GUI ST XX MAIN MSC71 WIN32 MSC ) (9 / 9)
cl : Command line warning D4024 : unrecognized source file type 'asdfasdf', object file assumed
cl : Command line warning D4027 : source file 'asdfasdf' ignored


Can you please post here your .upp file? (In package directory).

Mirek
Re: Again about packages [message #12153 is a reply to message #12152] Sat, 13 October 2007 14:13 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
luzr wrote on Sat, 13 October 2007 11:42


Can you please post here your .upp file? (In package directory).



Sigh, I wiped it all because I decided to not have the whole library as package.... it slowed things too much compiling, checking each time if the lib was already up to date. Pity, because was very good for debugging purposes, but I've seen that having some thousand source files as package is really too slow.

I' ve tested it yet with a small app, same problem, compiler flags on a per-file basis don't go on command line. I'll post here the complete app, it's small, just unzip it in MyApps subfolder.

Ah, this applies to stable release, I can't try on latest build, it 's not usable for me.
BTH, did you try the last devel on Ubuntu as I said, so, launch theide, select main package, then select another main package.... On my build it crashes everityme.

Ciao

Max
Previous Topic: Debugging of tables, vector, etc.
Next Topic: Getting "heap leaks detected!" error messages on program exit. How to debug it?
Goto Forum:
  


Current Time: Sat Dec 07 18:21:52 CET 2019

Total time taken to generate the page: 0.01127 seconds