I have been trying all kinds of keywords on Google to find out how I can convert a wxString to std::string, but have yet to find anything at all on the subject. Which is weird, because I would expect it to be fairly common if you want to use other libraries with wxWidgets.
So I am hoping at least one of you has this experience and is willing to share.
I need to take a url from a text control and pass it to a library that expects a std::string. I can get the url from the control using GetValue, but that gives me a wxString.
I have tried to use wxString::c_str(), but that gives me a compilation error:
error: conversion from `const wxChar*' to non-scalar type `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' requested
I am using wxWidgets 2.6.3 unicode and Codeblocks with Mingw.