Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15566 - unable to compile an wxGTK application
Summary: unable to compile an wxGTK application
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-12 09:23 UTC by Frederic DEGHETTO
Modified: 2003-04-04 01:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic DEGHETTO 2003-02-12 09:23:28 UTC
Hello,

I have emerged wxGTK-2.4.0 without any problem. But i am not able to compile
wxwindows programs. For example, if i try to compile the example program bomb, i
obtain this message:
 make -f makefile.unx
g++ -c `wx-config --cxxflags` -o bombs.o bombs.cpp
bombs.cpp: In member function `virtual bool AppClass::OnInit()':
bombs.cpp:43: conversion from `const char[8]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp: In constructor `BombsFrameClass::BombsFrameClass(wxFrame*, const
   wxString&, const wxPoint&, const wxSize&, long int)':
bombs.cpp:75: conversion from `const char[6]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:77: conversion from `const char[10]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:78: conversion from `const char[6]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:80: conversion from `const char[9]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:82: conversion from `const char[6]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:83: conversion from `const char[8]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:84: conversion from `const char[11]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:85: conversion from `const char[6]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp: In member function `void BombsFrameClass::OnAbout(wxCommandEvent&)':
bombs.cpp:127: could not convert `"wxBombs (c) 1996 by P.
   Foggia\n<foggia@amalfi.dis.unina.it>"' to `const wxString&'
/usr/include/wx/msgdlg.h:30: in passing argument 1 of `int wxMessageBox(const
   wxString&, const wxString&, long int, wxWindow*, int, int)'
bombs.cpp: In constructor `BombsCanvasClass::BombsCanvasClass(wxFrame*, const
   wxPoint&, const wxSize&, long int)':
bombs.cpp:167: conversion from `char[2]' to `const wxString' is ambiguous
/usr/include/wx/string.h:303: candidates are: wxString::wxString(wchar_t,
   unsigned int = 1) <near match>
/usr/include/wx/string.h:281:                 wxString::wxString(int) <near
   match>
bombs.cpp:172: warning: passing `double' for argument 1 of `wxCoord
   wxDCBase::LogicalToDeviceX(int) const'
bombs.cpp:173: warning: passing `double' for argument 1 of `wxCoord
   wxDCBase::LogicalToDeviceY(int) const'
make: *** [bombs.o] Error 1


And it's the same for another wx program.

My conf is :

Portage 2.0.46-r9 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.19-gentoo-r10 i686 AMD Athlon(tm) MP 2000+
GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss apm avi crypt encode gif jpeg libg++ libwww mikmod mpeg ncurses nls
pdflib png qtmt quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang
readline bonobo svga tcltk java guile sdl gpm tcpd pam ssl perl python esd imlib
oggvorbis motif opengl mozilla ldap snmp cdr X gtk gtk2 mmx 3dnow cups qt kde
arts gnome alsa xinetd"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon-mp -O3 -pipe"
CXXFLAGS="-mcpu=athlon-mp -O3 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"

Thanks a lot for your help.

Frederic


Reproducible: Always
Steps to Reproduce:
1.emerge wxGTK-2.4.0
2.install demos-2.4.0
3.and make -f makefile.unx in the bomb directory
Comment 1 Nick Hadaway 2003-02-12 21:22:10 UTC
blackie bombs # make -f makefile.unx 
g++ -c `wx-config --cxxflags` -o bombs.o bombs.cpp
bombs.cpp: In constructor `BombsCanvasClass::BombsCanvasClass(wxFrame*, const 
   wxPoint&, const wxSize&, long int)':
bombs.cpp:172: warning: passing `double' for argument 1 of `wxCoord 
   wxDCBase::LogicalToDeviceX(int) const'
bombs.cpp:173: warning: passing `double' for argument 1 of `wxCoord 
   wxDCBase::LogicalToDeviceY(int) const'
g++ -c `wx-config --cxxflags` -o game.o game.cpp
g++ -c `wx-config --cxxflags` -o bombs1.o bombs1.cpp
g++ -o bombs bombs.o game.o bombs1.o `wx-config --libs`
blackie bombs # 

I did not have a similar problem.  Please paste the output of "emerge info" to this bug.
Comment 2 Nick Hadaway 2003-02-12 21:33:50 UTC
nm the emerge info thing... i see you already did... 
Comment 3 Nick Hadaway 2003-02-12 21:39:27 UTC
You might have a problem with the fact that you have gtk2 enabled in USE.
Make sure that wxGTK is build -gtk2 and then re-test the bombs demo.  
Comment 4 Nick Hadaway 2003-02-13 00:49:33 UTC
I have now verified this on a couple machines differnt test boxes.
Comment 5 Frederic DEGHETTO 2003-02-13 02:36:34 UTC
Hello,

Now wxGTK is compiled with "USE=-gtk2 emerge wxGTK" and all is OK.
Thanks you for your help. Like we say in france : merci pour votre aide.

Frederic
Comment 6 John Davis (zhen) (RETIRED) gentoo-dev 2003-04-04 01:21:36 UTC
db fix
Comment 7 John Davis (zhen) (RETIRED) gentoo-dev 2003-04-04 01:26:27 UTC
db fix