News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Compilation problem with svn 7070, in codesnippets

Started by gd_on, March 26, 2011, 12:20:01 PM

Previous topic - Next topic

gd_on

While compiling svn 7070, I obtain this compilation error :
||=== Code Snippets, Plugin - Win32 ===|
C:\CodeBlocks_SVN\CodeBlocks_src\src\plugins\contrib\codesnippets\codesnippets.cpp||In member function 'bool CodeSnippets::GetTreeSelectionData(const wxTreeCtrl*, wxTreeItemId, wxString&)':|
C:\CodeBlocks_SVN\CodeBlocks_src\src\plugins\contrib\codesnippets\codesnippets.cpp|968|error: operands to ?: have different types 'const wxString' and 'const wxChar*'|
||=== Génération terminée : 1 erreurs, 0 avertissements (4 minutes, 49 secondes) ===|

I use Win XP, SP3 and my compiler is TDM 4.5.1.

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

MortenMacFly

Quote from: gd_on on March 26, 2011, 12:20:01 PM
||=== Code Snippets, Plugin - Win32 ===|
C:\CodeBlocks_SVN\CodeBlocks_src\src\plugins\contrib\codesnippets\codesnippets.cpp||In member function 'bool CodeSnippets::GetTreeSelectionData(const wxTreeCtrl*, wxTreeItemId, wxString&)':|
C:\CodeBlocks_SVN\CodeBlocks_src\src\plugins\contrib\codesnippets\codesnippets.cpp|968|error: operands to ?: have different types 'const wxString' and 'const wxChar*'|
||=== Génération terminée : 1 erreurs, 0 avertissements (4 minutes, 49 secondes) ===|

Is it resolved if you put a wxString() around wxEmptyString?

Alternatively, what about replacing wxEmptyString with wxT("")?

(I can't compile anything here for the moment...)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

gd_on

#2
Hi,
both solutions are OK for me  8)

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]