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 » Compiling under Linux
Compiling under Linux [message #37988] Tue, 27 November 2012 11:09 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
It has been years since I had to compile U++ for Linux, and even then I used the NOGTK flag. Today I tried to compile from source on a machine I have no root access, and I got this:

Quote:


c++ -c -x c++ -O3 -ffunction-sections -fdata-sections -I./ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -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 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/gtk-2.0 -I/usr/X11R6/include/glib-2.0 -I/usr/X11R6/lib/glib-2.0/include -I/usr/X11R6/lib/gtk-2.0/include -I/usr/X11R6/include/cairo -I/usr/X11R6/include/pango-1.0 -I/usr/X11R6/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -DflagGUI -DflagGCC -DflagSHARED -DflagLINUX -DflagPOSIX CtrlLib/TrayIconX11.cpp -o _out/CtrlLib//home/upp/Scripts/GCCMK.bm-Gcc-Gui-Linux-Posix- Shared/TrayIconX11.o
CtrlLib/TrayIconX11.cpp:9:34: error: libnotify/notify.h: No such file or directory
CtrlLib/TrayIconX11.cpp: In member function ‚void Upp::TrayIcon::Message(int, const char*, const char*, int)‚:
CtrlLib/TrayIconX11.cpp:104: error: ‚notify_is_initted‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:105: error: ‚notify_init‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:111: error: ‚NotifyNotification‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:111: error: ‚notification‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:118: error: ‚notify_notification_new‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:119: error: ‚notify_notification_set_timeout‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:120: error: ‚notify_notification_show‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp: In function ‚void Upp::s__s125_fn()‚:
CtrlLib/TrayIconX11.cpp:126: error: ‚notify_is_initted‚ was not declared in this scope
CtrlLib/TrayIconX11.cpp:127: error: ‚notify_uninit‚ was not declared in this scope



It seems it can't find libnotify. Is this lib required? Can I remove the dependency with the NOGTK flag? And how do you specify that flag. I can no longer remember. I am digging thought the makefiles to see.

EDIT: Changed to quote, to allow line wrap. Honza

[Updated on: Tue, 27 November 2012 13:48] by Moderator

Report message to a moderator

Re: Compiling under Linux [message #37992 is a reply to message #37988] Tue, 27 November 2012 13:54 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Hi cbporter,

Libnotify is used to show the notifications near panel. If I recall correctly, it is not used when compiling with NOGTK flag.

Since you write about Makefiles, I'll assume that you are using the Makefiles generated by theide. In that case, you can just add -DflagNOGTK to Macro variable (should be on line 3 or 4 in the Makefile) and it should work.

Best regards,
Honza
Re: Compiling under Linux [message #37993 is a reply to message #37992] Tue, 27 November 2012 14:00 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
dolik.rce wrote on Tue, 27 November 2012 14:54


Since you write about Makefiles, I'll assume that you are using the Makefiles generated by theide. In that case, you can just add -DflagNOGTK to Macro variable (should be on line 3 or 4 in the Makefile) and it should work.


No, I was talking about the makefile you get when downloading only U++ sources and doing a manual first build.
Re: Compiling under Linux [message #37994 is a reply to message #37993] Tue, 27 November 2012 14:03 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
But I did find something there. Let me see if it compiles Smile.
Re: Compiling under Linux [message #37995 is a reply to message #37993] Tue, 27 November 2012 15:02 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

cbpporter wrote on Tue, 27 November 2012 14:00

dolik.rce wrote on Tue, 27 November 2012 14:54


Since you write about Makefiles, I'll assume that you are using the Makefiles generated by theide. In that case, you can just add -DflagNOGTK to Macro variable (should be on line 3 or 4 in the Makefile) and it should work.


No, I was talking about the makefile you get when downloading only U++ sources and doing a manual first build.


Well, that one (in uppsrc/Makefile in the downloaded tarball I believe) is generated by theide too Wink

Honza
Re: Compiling under Linux [message #37996 is a reply to message #37994] Tue, 27 November 2012 15:06 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
Thanks! That kind of worked. Is there an U++ specific 64 bit flag or is a "-m64" option sufficient? I am getting:

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libXext.so when searching for -lXext
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl


and I am guessing that it compiled using 32 bits on a 64 system.

Using -m64 I managed to get TheIDE to work, but when compiling the Bombs example and adding -m64 "Setup/build methods, I am still some errors.
Re: Compiling under Linux [message #37999 is a reply to message #37996] Tue, 27 November 2012 15:47 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Well, on my 64bit machine theide doesn't use -m64 and everything works well. It must be because you have both 32b and 64b libs available. Chceck if you build method is configured with the paths to the 64bit versions of the libraries (probably /usr/lib64). The default file that comes with the tarball is probably only good for pure 32b or pure 64bit systems...

Honza
Re: Compiling under Linux [message #38164 is a reply to message #37999] Mon, 03 December 2012 08:13 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
Thank you for the help!

Now it works perfectly!

It wasn't a very smooth process, but still U++ has come a long way when installing under Linux.
Previous Topic: Problem building from commandline on Linux
Next Topic: Can't build SMTP example under VS2012
Goto Forum:
  


Current Time: Mon Nov 18 07:11:55 CET 2019

Total time taken to generate the page: 0.02772 seconds