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 » How to compile thrid-party packages?
How to compile thrid-party packages? [message #5682] Mon, 09 October 2006 15:44 Go to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

Hey,
I'm doing some testing with Blender and Irrlicht, and am wonderign if I could use the makefiles provided in their software packages to compile the programs. But I don't seem to see such a function in the IDE. Is there any way to achieve this? IMHO, how do u compile third-party libraries (those w/o UPP packages to go along) like OGRE and Irrlicht using The IDE, or is that impossible?

puzzled newcomer
Re: How to compile thrid-party packages? [message #5720 is a reply to message #5682] Wed, 11 October 2006 07:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
arixion wrote on Mon, 09 October 2006 09:44

Hey,
I'm doing some testing with Blender and Irrlicht, and am wonderign if I could use the makefiles provided in their software packages to compile the programs. But I don't seem to see such a function in the IDE. Is there any way to achieve this? IMHO, how do u compile third-party libraries (those w/o UPP packages to go along) like OGRE and Irrlicht using The IDE, or is that impossible?

puzzled newcomer



It depends. Usually we prefer to convert them to the package and use some glue code to make it U++ like. These packages are usually in the "plugin", like "plugin/png" - go there to get the idea.

Alternative approach is to compile the library using makefile and add it as existing lib (Package organizer..., right click the right pane, choose "Add library...")

Mirek

[Updated on: Wed, 11 October 2006 07:49]

Report message to a moderator

Re: How to compile thrid-party packages? [message #5725 is a reply to message #5720] Wed, 11 October 2006 08:27 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

luzr wrote on Wed, 11 October 2006 13:48

arixion wrote on Mon, 09 October 2006 09:44

Hey,
I'm doing some testing with Blender and Irrlicht, and am wonderign if I could use the makefiles provided in their software packages to compile the programs. But I don't seem to see such a function in the IDE. Is there any way to achieve this? IMHO, how do u compile third-party libraries (those w/o UPP packages to go along) like OGRE and Irrlicht using The IDE, or is that impossible?

puzzled newcomer



It depends. Usually we prefer to convert them to the package and use some glue code to make it U++ like. These packages are usually in the "plugin", like "plugin/png" - go there to get the idea.

Alternative approach is to compile the library using makefile and add it as existing lib (Package organizer..., right click the right pane, choose "Add library...")

Mirek



hmm... How do I convert it into the package? Because I really don't wish to dl CodeBlocks juz so that I can compile other packages.
Re: How to compile thrid-party packages? [message #5726 is a reply to message #5725] Wed, 11 October 2006 10:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Quote:


hmm... How do I convert it into the package? Because I really don't wish to dl CodeBlocks juz so that I can compile other packages.


Usually, it is very straightforward process: You create an empty package (by adding it to your project "uses"), copy source files to the directory and add them as package files ("add package directory files") and you are practically done (as long as you do not want to add some glue code encapsulation, which really is not necessary).

Of course, problems can appear on the way, but they are way specific to list them here all now...

[Updated on: Wed, 11 October 2006 10:50]

Report message to a moderator

Re: How to compile thrid-party packages? [message #5916 is a reply to message #5726] Wed, 25 October 2006 11:08 Go to previous messageGo to next message
cioannou is currently offline  cioannou
Messages: 45
Registered: January 2006
Location: Greece
Member
I have the same problem.

e.g. I have built the Boost libraries and would like to include one of them in a project and also include the header files which are located e.g. c:\boost\libs

I just add the c:\boost\libs\foolib\boost_foolib_static.lib in package manager?

And what about the header files? How can I specify additional include directories?
Re: How to compile thrid-party packages? [message #5920 is a reply to message #5916] Wed, 25 October 2006 13:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
You specify library and include directories in Build method setup, then libraries to link with in package organizer.

Note the reason: directories are specific for the computer you are using while libraries to link with are specific to the package.
Re: How to compile thrid-party packages? [message #5921 is a reply to message #5920] Wed, 25 October 2006 13:29 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

Is it possible to specify more compiler flags? And btw, how does UPP make GCC use Blitz? I might decide to create an extension to UPP that allows it to use Scons as a compilation system...
Re: How to compile thrid-party packages? [message #5923 is a reply to message #5920] Wed, 25 October 2006 14:07 Go to previous messageGo to next message
cioannou is currently offline  cioannou
Messages: 45
Registered: January 2006
Location: Greece
Member
That's exactly what I did and when linking I get a nice message:

Linking...
\mingw\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -llibboost_filesystem-mgw-s-1_33_1.lib
collect2: ld returned 1 exit status


Re: How to compile thrid-party packages? [message #5924 is a reply to message #5921] Wed, 25 October 2006 14:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
arixion wrote on Wed, 25 October 2006 07:29

Is it possible to specify more compiler flags?



Sure! Just add compiler options in package organizer.

Well, the all the thing might be a little bit complicated at first, but I think current documentation is already quite good. The system is quite flexible.

The one thing to keep always in the mind is that everything is designed to work with more compilers and more platforms (and with different directory tree). That is why there are

- builders (routines to use specific compiler or compiler group),

- build methods (binds builder with concrete computer specific settings of executable, library and include paths)

- flags (describes platform and compiler, e.g. "WIN32 GCC"

- package and file additional settings (can add compiler options for specific combination of flags)

Quote:


And btw, how does UPP make GCC use Blitz?



It is transparent with respect to all of above. BLITZ system checks for all problems there and for most problems with the code (in other words, BLITZ is active only if possible).

Quote:


I might decide to create an extension to UPP that allows it to use Scons as a compilation system...


Why? Smile I think U++ build system is really matured now and is the only system allowing BLITZ (if nothing else). You need build system that understands C++ files to have BLITZ.

Mirek
Re: How to compile thrid-party packages? [message #5973 is a reply to message #5924] Thu, 26 October 2006 04:11 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

what sort of files are all these settings saved in? I notice they are not present in *.upp files? And how do you actually make the compiler use those flags? Btw, how do you add a new build method? Is it possible to call the same compiler (e.g. GCC) with 2 different sets of flags, and toggle between these two sets?
Re: How to compile thrid-party packages? [message #5975 is a reply to message #5973] Thu, 26 October 2006 04:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
arixion wrote on Wed, 25 October 2006 22:11

what sort of files are all these settings saved in?



Source code related stuff in .upp file (inside package directory).

Build method settings in .bm files (inside theide directory in Win32).

Anyway, both can be fully setup in TheIDE.

Quote:


I notice they are not present in *.upp files?



Those set for the package are. But note that adding compiler options for package requires usually When condition because package can be compiled with various compilers.

Quote:


Btw, how do you add a new build method?



Setup / Build methods, right click on left pane, select New.

Quote:


Is it possible to call the same compiler (e.g. GCC) with 2 different sets of flags, and toggle between these two sets?


Yes. That is what build methods are for Wink

Mirek
Re: How to compile thrid-party packages? [message #6260 is a reply to message #5975] Sun, 05 November 2006 03:25 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

luzr wrote on Thu, 26 October 2006 10:54

arixion wrote on Wed, 25 October 2006 22:11

what sort of files are all these settings saved in?



Source code related stuff in .upp file (inside package directory).

Build method settings in .bm files (inside theide directory in Win32).

Anyway, both can be fully setup in TheIDE.

Quote:


I notice they are not present in *.upp files?



Those set for the package are. But note that adding compiler options for package requires usually When condition because package can be compiled with various compilers.

Quote:


Btw, how do you add a new build method?



Setup / Build methods, right click on left pane, select New.

Quote:


Is it possible to call the same compiler (e.g. GCC) with 2 different sets of flags, and toggle between these two sets?


Yes. That is what build methods are for Wink

Mirek



Is each "When" exclusive of other "Whens"?
Re: How to compile thrid-party packages? [message #6261 is a reply to message #6260] Sun, 05 November 2006 03:27 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

And are intermediate targets allowed?
Re: How to compile thrid-party packages? [message #6267 is a reply to message #6260] Sun, 05 November 2006 10:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
You can consider each line in package organizer right pane as if - then.

E.g. for libraries

if(when) add_library;

Means any line with true condition is used. (And empty when is true).

I am not quite sure what you mean by intermediate targets.

E.g. for MSC builder, extensions considered are

.c .cpp .cc .cxx - C++ source files
.icpp - C++ source files that are forced to be linked into executable
.rc - windows resource files
.brc - U++'s binary resource files
.obj - object files
.lib - library files

Files with other extensions are ignored, *unless* custom build step is specfied for them that converts them to any of above formats.

With files from above set, it is pretty clean what has to happen. Internal processing (compiling them to .obj files or other intermediate formats) is considered "implementation detail".

Mirek
Re: How to compile thrid-party packages? [message #6273 is a reply to message #6267] Sun, 05 November 2006 11:33 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

luzr wrote on Sun, 05 November 2006 17:08

You can consider each line in package organizer right pane as if - then.

E.g. for libraries

if(when) add_library;

Means any line with true condition is used. (And empty when is true).

I am not quite sure what you mean by intermediate targets.

E.g. for MSC builder, extensions considered are

.c .cpp .cc .cxx - C++ source files
.icpp - C++ source files that are forced to be linked into executable
.rc - windows resource files
.brc - U++'s binary resource files
.obj - object files
.lib - library files

Files with other extensions are ignored, *unless* custom build step is specfied for them that converts them to any of above formats.

With files from above set, it is pretty clean what has to happen. Internal processing (compiling them to .obj files or other intermediate formats) is considered "implementation detail".

Mirek




As in,

e.g. for libraries:

If let's say I have 2 lines saying:-

KETSJI libketsji.lib

FTGL ftgl.DLL

What will be the effect of a build method (as specified on the toolbar) which says "SUMO FTGL"? Will it include both libraries or none at all?

As for intermediate targets:-

As an interesting experiment, I was seeing if I could UPP-rize blender code. Blender doesn't compile everything together at one time. It compiles a set of projects before it compiles the main application. What its makefile and SConscript do is to compile a set of libraries/DLLs and then compile the main program and link to these DLLs and/or libraries. Is it possible to achieve all this within one UPP project, or is there anything more to do in UPP?
Re: How to compile thrid-party packages? [message #6274 is a reply to message #6273] Sun, 05 November 2006 14:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, what is in the toolbar "SUMO FTGL" is "Main package configuration", no build method...

Now FTGL matches sets of flags, so ftgl.dll would be compiled.

Blender - well, not really yet. So far, U++ allows just single "final target", which is usually executable (but can be .dll). If future, there will be multiple main targets, so this will be possible.

Mirek
Re: How to compile thrid-party packages? [message #6300 is a reply to message #6274] Mon, 06 November 2006 03:30 Go to previous messageGo to next message
arixion is currently offline  arixion
Messages: 27
Registered: October 2006
Location: Southeast Asia
Promising Member

so FTGL will be compiled. How about Ketsji? (it should hv been "KETSJI FTGL" (sorry abt the misspelling.)

[Updated on: Mon, 06 November 2006 03:32]

Report message to a moderator

Re: How to compile thrid-party packages? [message #6313 is a reply to message #6300] Mon, 06 November 2006 09:53 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
arixion wrote on Sun, 05 November 2006 21:30

so FTGL will be compiled. How about Ketsji? (it should hv been "KETSJI FTGL" (sorry abt the misspelling.)


Yes, "KETSJI" condition is true if "KETSJI" is in main config flags. So the library will be included as well.

The best way how to study this issue is to explore Draw or Core packages in Package organizer (they add a lot of libraries).

Mirek
Previous Topic: Reduce the EXE size
Next Topic: UPP_MAIN__ is not exported to env in linux
Goto Forum:
  


Current Time: Mon Apr 29 01:50:30 CEST 2024

Total time taken to generate the page: 0.03092 seconds