|
|
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 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate 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 |
|
mirek
Messages: 14039 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 #11931 is a reply to message #11926] |
Tue, 02 October 2007 00:14 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate 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 |
|
mirek
Messages: 14039 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 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate 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
|
|
|
Goto Forum:
Current Time: Sat Sep 21 04:12:16 CEST 2024
Total time taken to generate the page: 0.04969 seconds
|
|
|