|
|
Home » Community » Newbie corner » using namespace Upp; causes errors
using namespace Upp; causes errors [message #37413] |
Mon, 01 October 2012 22:26 |
Mircode
Messages: 17 Registered: September 2012
|
Promising Member |
|
|
Hi!
Actually I only want to create labeled buttons with a custom background color. The only way to this seems to be chameleon, though I do not know whether this is something I have to install or just the example files that can be found here:
http://ultimatepp.org/redmine/projects/upp/repository/show/t ags/n-2011-15/reference/Chameleon
I downloaded and tried to compile, getting a load of errors. The first few being:
C:\eigene dateien\c-gefrickel\chameleon\main.cpp:3: error: expected namespace-name before ';' token
C:\eigene dateien\c-gefrickel\chameleon\main.cpp:3: error: `<type error>' is not a namespace
Also the simple helloworld project yields the same:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
GUI_APP_MAIN {
PromptOK("Hello world");
}
Am I missing something here? Where is this Upp namespace supposed to be defined? (I ran a windows search for files containing "namespace Upp" in the uppsrc folder and found nothing)(I am using windows, by the way).
Thanks in advance!
Greetings,
Mirko
|
|
|
Re: using namespace Upp; causes errors [message #37414 is a reply to message #37413] |
Mon, 01 October 2012 22:36 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
In your main .cpp file under your #includes and any other namespace/s
using namespace std;
using namespace Upp;
Look at any of the examples, AFAIK they all have:
using namespace Upp;
Look through the examples as there might be one that does something similar to what your trying to do.
Look at the code for /reference/Chameleon to see what it has.
Do a search in the forum.
A google search "Upp buttons" might bring something up also.
[Updated on: Mon, 01 October 2012 22:46] Report message to a moderator
|
|
|
|
|
Re: using namespace Upp; causes errors [message #37417 is a reply to message #37413] |
Tue, 02 October 2012 07:09 |
|
Hi Mirko,
I believe that the one and only problem you had was that you installed only the Chameleon example, but not the other folders (judging by the paths). For U++ to work you have to have all the nests available (i.e. for reference examples the reference and uppsrc folders) or at least all used packages.
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Sat May 04 16:06:22 CEST 2024
Total time taken to generate the page: 0.01971 seconds
|
|
|