You are not logged in.
Pages: 1
HI guys, i have installed wxwidgets using pacman 'sudo pacman -S wxgtk' and if i put simple program with wxPuts() just to print text using wx function i got to much errors in compile time. I try to compile with this: g++ main.cpp `wx-config --cxxflags --libs` -o main
wx-config --version : 3.0.2
Last edited by ZoLA (2015-08-25 17:38:41)
Offline
Offline
Source: http://pastebin.com/uAZ6M4MY
Output: http://pastebin.com/pUzky0Hd
Offline
It compiled fine on my desktop, but it failed on my laptop with a similar error: wx-config tells the compiler to link the following libraries:
$ wx-config --libs
-pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_webview-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
now the problem is that libwx_gtk2u_webview-3.0.so is linked to libwebkitgtk-1.0.so.0 which is provided by the package webkitgtk2. So, you have two options:
Use wx-config and Install the package webkitgtk2
Don't use wx-config and manually specify the libraries to link to, for example
g++ main.cpp -o main -I/usr/lib/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -DWXUSINGDLL -D__WXGTK__ -pthread -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
--edit: typo
Last edited by mauritiusdadd (2015-08-25 06:30:34)
Offline
Again, same think dude , tons of errors..
Offline
Again, same think dude , tons of errors..
Well, 'tons of errors' is not helpful... they are the same errors you get before? If not post them. Which of the two options you used? Is your system fully updated? What is the output of the following commands?
$ uname -a
$ pacman -Qi wxgtk webkitgtk2 gtk2
$ wx-config --cxxflags --libs
However, let's try first using the option one: according to ldd, these are all the packages you need to install in order to compile the program using wx-config, make sure you have all of them installed:
$ ldd main | awk '{print $3}' | pacman -Qqo - | sort --unique
atk
bzip2
cairo
enchant
expat
fontconfig
freetype2
gcc-libs
gdk-pixbuf2
glib2
glibc
graphite
gst-plugins-base-libs
gstreamer
gtk2
harfbuzz
harfbuzz-icu
icu
libdrm
libffi
libgcrypt
libgpg-error
libice
libjpeg-turbo
libpng
libsecret
libsm
libsoup
libtiff
libutil-linux
libwebp
libx11
libxau
libxcb
libxcomposite
libxcursor
libxdamage
libxdmcp
libxext
libxfixes
libxi
libxinerama
libxml2
libxrandr
libxrender
libxshmfence
libxslt
libxt
libxxf86vm
mesa
mesa-libgl
orc
pango
pcre
pixman
sqlite
wayland
webkitgtk2
wxgtk
xz
zlib
Offline
Errors: http://pastebin.com/SBAEsRHQ
Uname: http://pastebin.com/eBTRENQ3
I didn't have webkitgtk2 soo i installed: http://pastebin.com/kSa7ap8g
And wx-config: http://pastebin.com/QeXrKuxp
Last edited by ZoLA (2015-08-25 11:48:30)
Offline
From your last compilation log, it seems that the most of what you think are errors are just warnings and can be safely ignored (there is also a bug report for that, see https://bbs.archlinux.org/viewtopic.php?id=198385. It has been fixed recently so we probably have to wait until gcc 5.3 is out). The only error appears to be the following:
/usr/bin/ld: cannot find -lwx_gtk2u_wx-3.0
collect2: error: ld returned 1 exit status
I cannot find libwx_gtk2u_wx-3.0.so in any official package
$ pkgfile /usr/lib/libwx_gtk2u_wx-3.0.so
$
and I don't understand why g++ tells ld to link that library since it is not in the options passed by wx-config... The output of wx-config is taken before or after you installed webkitgtk2? Can you please post the output of the following commad?
# ldconfig -p | grep wx_gtk2u_
PS: Also, since you installed webkitgtk2 I assume you used only the first option, have you tried also the second option using the command I posted?
Last edited by mauritiusdadd (2015-08-25 13:43:49)
Offline
After webkitgtk2.. here is ldconfig : http://pastebin.com/KmQTvcrr
Offline
After webkitgtk2.. here is ldconfig : http://pastebin.com/KmQTvcrr
Everything seems alright there... Can you post the output of the compilation when using the --verbose options?
g++ --verbose main.cpp `wx-config --cxxflags --libs` -o main
Offline
Here it is LINK: http://pastebin.com/jLhCGn5J
I just successfully compiled o.O and program with wxPuts("LOOL"); works.. but again with warnings..maybe gcc is problem now
Offline
Here it is LINK: http://pastebin.com/jLhCGn5J
I just successfully compiled o.O and program with wxPuts("LOOL"); works..
Yeha, that looks good... maybe there was a typo in the command you used previously.
but again with warnings..maybe gcc is problem now
Indeed (read the link I posted in post #8), but as I previously said you can safely ignore them...
Please, remember to mark the thread as [SOLVED]: https://bbs.archlinux.org/viewtopic.php?id=130309
Offline
Thanks dude. I'll change thread name. See you
Offline
Pages: 1