Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10846 closed defect (fixed)

build error with --disable-unicode --enable-stl on OSX and GTK

Reported by: csomor Owned by:
Priority: normal Milestone:
Component: base Version: 2.9.0
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

using the configure switches from above, the build fails in

./../src/common/fs_mem.cpp: In static member function ‘static void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString&, const wxString&, const wxString&)’:
../../src/common/fs_mem.cpp:196: error: invalid static_cast from type ‘const wxString’ to type ‘const char*’

Change History (9)

comment:1 Changed 11 years ago by csomor

looking at the sourcecode, I'd think that we should be able to just write

    AddFileWithMimeType(filename,
                        static_cast<const char *> (textdata.To8BitData()), data.length(),
                        mimetype);

with no need for the local variable data at all

comment:2 Changed 11 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [60771]) compilation fix for STL/!UNICODE case (closes #10846)

comment:3 Changed 11 years ago by vadz

Yes, you're right, I don't know why did I do it like this, fixed now, thanks.

comment:4 Changed 11 years ago by csomor

sorry, didn't adjust the length param name, I'll commit

comment:5 Changed 11 years ago by SC

(In [60774]) fixing length param, see #10846

comment:6 Changed 11 years ago by jan_van_dijk

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopened: with revision 60781 I still get (another) error:

../src/gtk/artgtk.cpp: In function ‘const wxScopedCharBuffer<unnamed>::wxArtIDToStock(const wxArtID&)’:
../src/gtk/artgtk.cpp:126: error: conversion from ‘const char*’ to non-scalar type ‘const wxScopedCharBuffer’ requested

comment:7 Changed 11 years ago by csomor

oh dear, for an unstable release I'd actually like to release it, with this known restriction, but we need more coverage as fast as possible, otherwise a 3.0 b end of the year is simply not realistic

comment:8 Changed 11 years ago by VZ

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [60822]) fix ANSI build compilation (closes #10846)

comment:9 Changed 11 years ago by vadz

Should be fixed now but I strongly recommend switching to Unicode build anyhow. ANSI build will be dropped sooner or later.

Note: See TracTickets for help on using tickets.