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 » [solved]how to use upp without the ide (what is the gcc command line?)
[solved]how to use upp without the ide (what is the gcc command line?) [message #27872] Sun, 08 August 2010 17:58 Go to next message
pixelou is currently offline  pixelou
Messages: 3
Registered: June 2010
Location: France
Junior Member
Hello!
I suppose my topic's title is clear enough, I don't want to use theide right now, I'd rather compile with gcc from command line. However, I can't find the correct command line....
What do I need for example with this code ? :

#include <CtrlLib/CtrlLib.h>

 

using namespace Upp;

 

GUI_APP_MAIN

{

    TopWindow w;

    w.Title("My application").MinimizeBox().Sizeable();

    w.SetRect(0, 0, 200, 300);

    w.Run();

}


thanks

[Updated on: Mon, 09 August 2010 14:30]

Report message to a moderator

Re: how to use upp without the ide (what is the gcc command line?) [message #27873 is a reply to message #27872] Sun, 08 August 2010 22:52 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Pixelou!

Your simple question unfortunately doesn't have simple answer.

To compile even such simple example, you have to compile over 200 files, from about 9 packages (think directories or projects). Each of them is usually compiled with several options - libryry paths, include paths and various flags - resulting in commands that are typicaly thousand characters long or so. That is definitely not something you would do manually, just by typing it to terminal Smile

The easiest way you could reasonably use is to create the package in theide at first and export a Makefile (at the bottom of Build > Output mode ...). Then you can take this Makefile as a start point a develop your app from there just adjusting it to your needs. This is the simplest way, but you lose a lot of theide functionality (e.g. debug mode, modularity, blitz mode compiling, ...). Also there are some bugs in the export on non-windows platforms, so be aware if that is your case (I'll try to fix that in a near future, but for I can just warn you).

Second option I can point you to is also a makefile, but a more complex one. It uses full power of make to parse .upp files and compile them with most of the functionality of theide (only blitz mode is missing). The biggest caveat of this makefile is that it currently supports only linux (right now I work on major update adding support for BSD and fixing some known bugs). You can find it at http://code.google.com/p/upp-mirror/source/browse/trunk/uppb ox/lpbuild/Makefile. It requires some knowledge of theide terminology, but if you decide to use this solution, I am able to give you all the necessary support.

If you have some favourite IDE of your own which you want to use with upp, that might be a third option. If that IDE is flexible enough... You would have to set up paths and compile options to include everything necessary. The easiest way to get the idea what is necessary is to compile simple app in verbose mode (Setup > Be verbose), it will show you the full commands in the console at the bottom of theide. Since you are currageous enough to try using U++ without theide, I guess you know c++ quite well, so the command line should tell you everything you need.

Don't be afraid to ask further questions Wink I am quite a fan of using U++ without theide, since I often work in environments without X server (and therefore my method of choice is number two...).

Best regards,
Honza
Re: how to use upp without the ide (what is the gcc command line?) [message #27887 is a reply to message #27872] Mon, 09 August 2010 12:49 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
You can also use theIDE in command line mode to do the compiling for you http://www.ultimatepp.org/app$ide$cmdline$en-us.html

edit: Yes, I know you did say "without IDE", I'm just listing it to make sure you are aware of this way.

[Updated on: Mon, 09 August 2010 12:50]

Report message to a moderator

Re: how to use upp without the ide (what is the gcc command line?) [message #27891 is a reply to message #27872] Mon, 09 August 2010 13:03 Go to previous messageGo to next message
pixelou is currently offline  pixelou
Messages: 3
Registered: June 2010
Location: France
Junior Member
Well indeed, I'don't know c++ very well Smile , I chose U++ because it looked better than GTK+ QT+...... I mean, it looked easier and more logical. I've only used fltk before, but it's ugly, and the layout is fixed (however, it really simple to use).
I'll use theide for the moment, but why aren't there some kind of `fltk2-config --cflags --libs` ???? (maybe this is a beginner question Rolling Eyes )
Re: how to use upp without the ide (what is the gcc command line?) [message #27892 is a reply to message #27872] Mon, 09 August 2010 13:11 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Because the UPP way of compiling packages is a bit too modular for that.
Whenever you include some upp package into project, it adopts some flags from your main package, i.e. the "Core" package can be compiled in 3 slightly different ways for 3 examples you will open (just think no-GUI, GUI and GUI + multithreading).

So in the end you would have to extract those flags/libs/includes per project + consider DEBUG/RELEASE variations.

Also you lose benefits of BLITZ and unless you know what you are doing, also parallel compiling on multiple cores.

If you just want to use other IDE, and you have working upp theide binary, you should consider using theide command line as building tool, and let it to call gcc and stuff, it's probably the easiest way (next to simply using theide).
Re: how to use upp without the ide (what is the gcc command line?) [message #27893 is a reply to message #27892] Mon, 09 August 2010 14:29 Go to previous message
pixelou is currently offline  pixelou
Messages: 3
Registered: June 2010
Location: France
Junior Member
Ok, I'll use theide and follow the tutorial,
Thanks
Previous Topic: Ctrl key pressed while LeftDown: detection.
Next Topic: Removing .lay dependancy from a GUI app
Goto Forum:
  


Current Time: Thu Apr 25 16:42:47 CEST 2024

Total time taken to generate the page: 0.02335 seconds