|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Strange error compiling wxwindows-2.4.2
OK, I have the version 8.38 of the digitalmars compiler and version 2.4.2 of
wxwindows. I have not modified wxwindows in any way. I have used the
makefiles provided for the symantec compiler (sc). Everything almost works
perfectly except for one thing. The compiler hiccoughs on fileconf.cpp. This
is the error msg:
-I..\../src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;..\../src/tiff
..\..\src\common\fileconf.cpp -o..\..\src\common\fileconf.obj
((m_linesTail) ? m_linesTail->Text().c_str() :
wxEmptyString) );
^
..\..\src\common\fileconf.cpp(1209) : Error: ambiguous reference to symbol
Had: wxLogTrace(char const *,...)
and: wxLogTrace(char const *,char const *,...)
--- errorlevel 1
--- errorlevel 1
And these are the offending lines of code:
wxLogTrace( _T("wxFileConfig"),
_T(" head: %s"),
((m_linesHead) ? m_linesHead->Text().c_str() :
wxEmptyString) );
wxLogTrace( _T("wxFileConfig"),
_T(" tail: %s"),
((m_linesTail) ? m_linesTail->Text().c_str() :
wxEmptyString) );
I assume the compiler is having problems disambiguating these overloaded
function definitions from log.h (#included in fileconf.cpp)
inline void wxLogTrace(const wxChar *, ...) { }
inline void wxLogTrace(const wxChar *, const wxChar *, ...) { }
Honestly, these overloads seem a little peculiar to me so I can understand
why the compiler might be confused. This is the strange part though.. If I
comment out any of the two function calls it compiles without complaint.
Even more bizarre, it compiles without error if I place a line of code
between the calls to wxLogTrace. For example:
wxLogTrace( _T("wxFileConfig"),
_T(" head: %s"),
((m_linesHead) ? m_linesHead->Text().c_str() :
wxEmptyString) );
int i = 0;
wxLogTrace( _T("wxFileConfig"),
_T(" tail: %s"),
((m_linesTail) ? m_linesTail->Text().c_str() :
wxEmptyString) );
Believe it or not, that compiles without error. I have been able to build
and use the library by utilizing that trick. However, I'm really curious to
know whether anyone else has experienced this and what a better fix might
be.
BTW, I must say that dmc's compilation speeds are insane! I do mostly
windows programming so I am in the process of switching from g++. BIG
difference. Great work!
Dec 15 2003
"grammer" <pgrammer_81 hotmail.com> wrote in message news:brlppd$1v8d$1 digitaldaemon.com...OK, I have the version 8.38 of the digitalmars compiler and version 2.4.2 Dec 15 2003
Dec 16 2003
<arjan someplace.nl> wrote in message news:brmfk6$314i$1 digitaldaemon.com... Dec 16 2003
"grammer" <pgrammer_81 hotmail.com> wrote in message news:brmue6$l86$1 digitaldaemon.com...<arjan someplace.nl> wrote in message news:brmfk6$314i$1 digitaldaemon.com... Dec 16 2003
"_" <mjoyl lineone.netX> wrote in message news:brm044$28jk$1 digitaldaemon.com..."grammer" <pgrammer_81 hotmail.com> wrote in message news:brlppd$1v8d$1 digitaldaemon.com...OK, I have the version 8.38 of the digitalmars compiler and version Dec 16 2003
|