← Back to team overview

kicad-developers team mailing list archive

Re: Compiling probems

 

On 12/28/2010 02:25 AM, Martin wrote:
> dsnlexer is OK now.
> There are some other problems...
>
> (build 2690 on PCLinuxOS 2010)
>
> /home/martin/kicad/common/richio.cpp: In member function ‘virtual 
> unsigned int FILE_LINE_READER::ReadLine()’:
> /home/martin/kicad/common/richio.cpp:116: error: call of overloaded 
> ‘IO_ERROR(const wxChar*)’ is ambiguous
> /home/martin/kicad/include/kicad_exceptions.h:50: note: candidates are: 
> IO_ERROR::IO_ERROR(const std::string&)
> /home/martin/kicad/include/kicad_exceptions.h:45: note: 
> IO_ERROR::IO_ERROR(const wxString&)
> /home/martin/kicad/common/richio.cpp: In member function ‘virtual 
> unsigned int STRING_LINE_READER::ReadLine()’:
> /home/martin/kicad/common/richio.cpp:167: error: call of overloaded 
> ‘IO_ERROR(const wxChar*)’ is ambiguous
> /home/martin/kicad/include/kicad_exceptions.h:50: note: candidates are: 
> IO_ERROR::IO_ERROR(const std::string&)
> /home/martin/kicad/include/kicad_exceptions.h:45: note: 
> IO_ERROR::IO_ERROR(const wxString&)
> /home/martin/kicad/common/richio.cpp: In member function ‘virtual const 
> char* OUTPUTFORMATTER::Quoted(std::string*)’:
> /home/martin/kicad/common/richio.cpp:306: error: call of overloaded 
> ‘IO_ERROR(const wxChar*)’ is ambiguous
> /home/martin/kicad/include/kicad_exceptions.h:50: note: candidates are: 
> IO_ERROR::IO_ERROR(const std::string&)
> /home/martin/kicad/include/kicad_exceptions.h:45: note: 
> IO_ERROR::IO_ERROR(const wxString&)
> /home/martin/kicad/common/richio.cpp: In member function ‘virtual void 
> STREAM_OUTPUTFORMATTER::write(const char*, int)’:
> /home/martin/kicad/common/richio.cpp:364: error: call of overloaded 
> ‘IO_ERROR(const wxChar*)’ is ambiguous
> /home/martin/kicad/include/kicad_exceptions.h:50: note: candidates are: 
> IO_ERROR::IO_ERROR(const std::string&)
> /home/martin/kicad/include/kicad_exceptions.h:45: note: 
> IO_ERROR::IO_ERROR(const wxString&)
> make[2]: *** [common/CMakeFiles/common.dir/richio.cpp.o] Error 1
> make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
> make: *** [all] Error 2
>
> greetings
>
> Martin Kratoska

Martin,

Either your compiler is at a different version than mine, or you have a
different wxWidgets version or character type (i.e. string type).

1) Please let me know what

$ wx-config --libs

says.  For example if I run a version of wx-config against a wxWidgets
compiled with --disable-unicode, I get:

$ /opt/wx2.8-utf8/bin/wx-config --libs

-L/opt/wx2.8-utf8//lib -pthread   -lwx_gtk2_xrc-2.9 -lwx_gtk2_html-2.9
-lwx_gtk2_qa-2.9 -lwx_gtk2_adv-2.9 -lwx_gtk2_core-2.9 -lwx_base_xml-2.9
-lwx_base_net-2.9 -lwx_base-2.9



2) Try the attached patch.

If it works, you can run with this patch for a few days. 

The testing branch is going to be very dynamic for the next little bit (~2
weeks or so) (but that is a good thing).


Dick

--- /svn/kicad/testing.checkout/include/kicad_exceptions.h	2010-12-27 23:36:14.000000000 -0600
+++ include/kicad_exceptions.h	2010-12-28 07:26:49.000000000 -0600
@@ -42,6 +42,15 @@
 {
     wxString    errorText;
 
+    /**
+     * Constructor ( const wxChar* )
+     * handles the case where _() is passed as aMsg.
+     */
+    IO_ERROR( const wxChar* aMsg ) :
+        errorText( aMsg )
+    {
+    }
+
     IO_ERROR( const wxString& aMsg ) :
         errorText( aMsg )
     {

Follow ups

References