Hi,
I use the wxWidgets wizard in Code::Blocks to create GUI projects and it works fine. But sometimes I need to create a console application (no GUI) but still have wxWidgets support. For example, I need to create a console application using wxFTP, for special purpose FTP tasks.
Is there a wxWidgets console application wizard somewhere? Alternatively, what are the steps I need to perform to create a console application where I can use wxFTP?
I do not know of an wizard for wxWidgets console application; just the wxWidgets GUI one.
Might look at the wxWidgets sample/console/console.cpp it contains FTP code in it using the define TEST_FTP to enable it.
Tim S
Quote from: stahta01 on June 26, 2009, 11:59:08 PM
I do not know of an wizard for wxWidgets console application; just the wxWidgets GUI one.
Might look at the wxWidgets sample/console/console.cpp it contains FTP code in it using the define TEST_FTP to enable it.
Tim S
Ok, thanks for that tip. After some struggle and "hand editing" of the Code::Blocks project file, I got it to work. Actually a wxWidgets console wizard would be a good thing and make it simpler. It would set up the wx include paths, libraries and generate the wxInitializer stuff that is needed. Essentially as for a GUI app.
And the FTP sample does not seem to work as written
wxFTP ftp;
ftp.Connect(...);
wxInputStream* in = ftp.GetInputStream(filename);
size_t size = in->GetSize(); // this always returns zero
int size2 = ftp.GetFileSize(filename); // this works