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 » Problem with GUI_APP_MAIN - example
icon5.gif  Problem with GUI_APP_MAIN - example [message #33194] Thu, 14 July 2011 23:21 Go to next message
Small_Dwarf is currently offline  Small_Dwarf
Messages: 8
Registered: July 2011
Promising Member
Hello, I'm new to U++. Smile

I have installed "theide-nogtk_3211-2~natty0_i386.deb"
and "upp_3211-2~natty0_all.deb" on "Ubuntu 11.04 - the Natty Narwhal".

I could compile and execute the example from "http://www.ultimatepp.org/app$ide$GettingStarted$en-us.html".

But when I change the flag from "Console" to "GUI" and press "Ctrl + F5" to run the first GUI example from " http://www.ultimatepp.org/srcdoc$CtrlLib$Tutorial$en-us.html" I am greeted by the error messages:

----- g ( GUI MAIN GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX )
main.cpp
g: 1 file(s) built in (0:06.80), 6801 msecs / file, duration = 7224 msecs, parallelization 0%
Linking...
/upp/out/g/GCC.Debug.Debug_full.Gui.Main.Shared/main.o: In function `main':
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::AppInit__(int, char const**, char const**)'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::Ctrl::InitX11(char const*)'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::Ctrl::CloseTopCtrls()'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::UsrLog(char const*)'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::DeleteUsrLog()'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::Ctrl::ExitX11()'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::AppExit__()'
/upp/uppsrc/g/main.cpp:9: undefined reference to `Upp::GetExitCode()'
/upp/out/g/GCC.Debug.Debug_full.Gui.Main.Shared/main.o: In function `MemDiagCls':
upp/uppsrc/Core/Core.h:289: undefined reference to `Upp::sMemDiagInitCount'
upp/uppsrc/Core/Core.h:289: undefined reference to `Upp::sMemDiagInitCount'
/upp/uppsrc/Core/Core.h:289: undefined reference to `Upp::MemoryInitDiagnostics()'
/upp/out/g/GCC.Debug.Debug_full.Gui.Main.Shared/main.o: In function `~MemDiagCls':
/upp/uppsrc/Core/Core.h:290: undefined reference to `Upp::sMemDiagInitCount'
/upp/uppsrc/Core/Core.h:290: undefined reference to `Upp::sMemDiagInitCount'
/upp/uppsrc/Core/Core.h:290: undefined reference to `Upp::sMemDiagInitCount'
/upp/uppsrc/Core/Core.h:290: undefined reference to `Upp::MemoryDumpLeaks()'
collect2: ld returned 1 exit status

There were errors. (0:07.66)


Does anyone know how to fix it?

THANX in advance Smile

Re: Problem with GUI_APP_MAIN - example [message #33196 is a reply to message #33194] Fri, 15 July 2011 07:20 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 Small_Dwarf,

Welcome to the forum! Cool

You just copied the code from the web into your package (called "g"), right? The problem is that it uses code from other packages. The GUI related code can be added to your package simply by adding a "CtrlCore" package as a dependency. Right click on "g" in the left uper pane and choose "Add package to 'g'", it will bring up a selection dialogue.

Also note that all the examples and tutorials mentioned on this website are present in your installation, in the respective assemblies, available when you start theide or from File>Set main package.

You might also probably want to have a look at the Packages, Assemblies and Nests article, to get the idea about code organization in U++ Wink

Best regards,
Honza
icon14.gif  Re: Problem with GUI_APP_MAIN - example [message #33203 is a reply to message #33194] Fri, 15 July 2011 22:29 Go to previous message
Small_Dwarf is currently offline  Small_Dwarf
Messages: 8
Registered: July 2011
Promising Member
Hi!

Thank you, dolik.rce. Smile
Yes, I called my package 'g' and copied and pasted the code into 'g'.
Due to your advice I chose GUI2 from the provided tutorial list and saw 2 errors. I just included "/usr/lib/i386-linux-gnu/glib-2.0/include" and "/usr/include/gdk-pixbuf-2.0" into the include list and the code was able to be executed so I could see the window!

Thank you and greetings! Cool
Small_Dwarf

[Updated on: Fri, 15 July 2011 22:34]

Report message to a moderator

Previous Topic: send/receive arguments to console(cmd/terminal) in GUI app
Next Topic: Top starting position of GUI changes.
Goto Forum:
  


Current Time: Sun Apr 28 10:20:46 CEST 2024

Total time taken to generate the page: 0.03595 seconds