compiling audacity with wxwidgets 2.9.3

Hi,

I have got some problems compling audacity on win XPSP3 with wxWidgets 2.9.3 :
There are 10 errors in files file dialog.h and filedialogprivate.cpp :

c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(58) : error C2440: ‘default argument’ : impossible de convertir de ‘const char []’ en ‘const wxChar *’
Les types pointés n’ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(62) : error C2440: ‘default argument’ : impossible de convertir de ‘const char []’ en ‘const wxChar *’
Les types pointés n’ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(67) : error C2548: ‘FileSelector’ : paramètre par défaut manquant pour le paramètre 1
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(67) : error C2548: ‘FileSelector’ : paramètre par défaut manquant pour le paramètre 5
FileDialogPrivate.cpp
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(58) : error C2440: ‘default argument’ : impossible de convertir de ‘const char []’ en ‘const wxChar *’
Les types pointés n’ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(62) : error C2440: ‘default argument’ : impossible de convertir de ‘const char []’ en ‘const wxChar *’
Les types pointés n’ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(67) : error C2548: ‘FileSelector’ : paramètre par défaut manquant pour le paramètre 1
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogfiledialog.h(67) : error C2548: ‘FileSelector’ : paramètre par défaut manquant pour le paramètre 5
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogwinfiledialogprivate.cpp(204) : warning C4312: ‘cast de type’ : la conversion de ‘LONG’ en ‘OPENFILENAME *’ d’une taille supérieure
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogwinfiledialogprivate.cpp(212) : error C2440: ‘cast de type’ : impossible de convertir de ‘wxCStrData’ en ‘LPTSTR’
Aucun opérateur de conversion définie par l’utilisateur disponible qui puisse effectuer cette conversion, ou l’opérateur ne peut pas être appelé
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogwinfiledialogprivate.cpp(218) : warning C4312: ‘cast de type’ : la conversion de ‘LONG’ en ‘OPENFILENAME *’ d’une taille supérieure
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogwinfiledialogprivate.cpp(235) : warning C4312: ‘cast de type’ : la conversion de ‘LONG’ en ‘OPENFILENAME *’ d’une taille supérieure
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogwinfiledialogprivate.cpp(242) : warning C4312: ‘cast de type’ : la conversion de ‘LONG’ en ‘OPENFILENAME *’ d’une taille supérieure
c:documents and settingslaurentmes documentsvisual studio 2008projectsaudacity-src-2.0.1lib-srcfiledialogwinfiledialogprivate.cpp(720) : error C2440: ‘cast de type’ : impossible de convertir de ‘wxCStrData’ en ‘LPTSTR’
Aucun opérateur de conversion définie par l’utilisateur disponible qui puisse effectuer cette conversion, ou l’opérateur ne peut pas être appelé


the first error is on this line :
wxString
FileSelector(const wxChar *message = wxFileSelectorPromptStr,
const wxChar *default_path = NULL,
const wxChar *default_filename = NULL,
const wxChar *default_extension = NULL,
const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
int flags = 0,
wxWindow *parent = NULL,
wxString label = wxEmptyString,
fdCallback cb = NULL,
void *cbdata = NULL);

If i have a look for definition wxFileSelectorPromptStr :
extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorPromptStr[];

I don’t understand and don’t know how to solve thsi problem.
Thank’s you for yours answers.



PS I usually work with wxWidgets 2.9.3. I know that audacity works fine with wxwidgets 2.8.12 but it’s difficult for me to go back with wx 2.8.12.

Audacity doesn’t support later than wx 2.8.12.


Gale

Compiling Audacity with wx2.9+ is not easy but it is possible. See here:
https://forum.audacityteam.org/t/moving-to-wxwidgets-3-0/22073/1

Due to functional changes in wx2.9 there may be some problems in the Audacity GUI when using wx2.9. These will need to be addressed after it compiles.

In my opinion it would be far easier to install a second version of Widgets 2.8.12 (for example, to usr/local/bin/ if on Linux) then point Audacity to that, than go through all the 2.9 hoops that are likely to occur.

See http://wiki.audacityteam.org/wiki/Developing_On_Linux#wxWidgets .



Gale

I agree with Gale on this 100%! Since the user is on Windows XP SP3 my solution is to make a wxWidgets folder at the root of a hard drive:
C:\wxWidgets or D:\wxWidgets (other as suitable) then have (at least two) sub-folders:
C:\wxWidgetswx28 (for wx2.8.12 or 2.8.13 if/when it is available)and C:\wxWidgetswx29 (for wx2.9.3 release; maybe also C:\wxWidgetsSVN if Laurent keeps a separate SVN HEAD compile folder).

One then has two or three different environmental variables:
wx.png
Of course, there are a lot of benefits to porting Audacity to wx2.9, mainly the many bug fixes! Very little is being back-ported for the potential 2.8.13 release, mainly critical bug fixes which are simple to implement. If Laurent still wants to undertake this I am happy to help out!

Thanks, Ed. I added “if on Linux” to my “usr/local/bin/” example.

On Windows, Audacity looks for the WXWIN variable by default, so I think all Laurent really needs to do is just build wx 2.8.12 in a given directory separate from 2.9.3, set WXWIN to point to that 2.8.12 directory, then reboot, then build Audacity.

When you (Ed) build Audacity against Widgets SVN with that WXWIN29 variable, where do you modify the Audacity solution to look for WXWIN29, or do you just cut and paste the required path to WXWIN as needed?



Gale

I just rename the affected environmental variables:
wx.png
You may note that I have an environmental variable for compiling Audacity with MS VS2010 (WXWIN for 2010). This is the one I generally use as I compile my personal version of Audacity with MS VC++ Express 2010 (not 2008) and it will not link with wxWidgets libraries compiled with VC2008. This means that when I compile Audacity SVN HEAD I must change my environmental variable (although recently it seems that linking on VC2008 to VC2010 wx libraries is now working–I have not done any extensive testing and would not recommend the method).

Thanks you for all yours answers particulary to edgar for his whork (move to wxwidgets 2.9)
I have post a message (because I think it’s better to go on) in this topic https://forum.audacityteam.org/t/moving-to-wxwidgets-3-0/22073/1

I must say taht I have download source of audacity in zip file at http://audacity.googlecode.com/files/audacity-minsrc-2.0.1.tar.bz2. Some files were missing.
With SVN repositeries http://audacity.googlecode.com/svn/audacity-src/ all files are OK and I have found errors like in the post https://forum.audacityteam.org/t/moving-to-wxwidgets-3-0/22073/1

Please see what it says on Redirecting to: https://www.audacityteam.org/download .

So, you would want the full source tarball for Windows http://audacity.googlecode.com/files/audacity-fullsrc-2.0.1.tar.bz2 .



Gale