-
January 24th, 2011, 09:21 AM
#1
how to compile a console application with wxwidgets?H
Hi,
I have configured codeblocks with wxwidgets and works but i try to make an application in mode console dont work... what's going on wrong?
Code:
#include <iostream>
#include <wx/string.h>
#include <wx/utils.h>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
wxString str1 = wxT("Linux");
wxString str2 = wxT("Operating");
wxString str3 = wxT("System");
wxString str;
str = str1 + wxT(" ") + str2 + wxT(" ") + str3;
wxPuts(str);
wxPrintf(wxGetHomeDir());
long mem = wxGetFreeMemory().ToLong();
wxPrintf(wxT("Memory: %ld\n"), mem);
return 0;
}
-
January 24th, 2011, 10:48 AM
#2
Re: how to compile a console application with wxwidgets?H
What do you mean mode console? What errors are you getting? I don't see any problems
-
January 24th, 2011, 11:06 AM
#3
Re: how to compile a console application with wxwidgets?H
now works !!!
Solution:
Global compiler Setting-> Linker setting->other linker options
add: -lwxmsw28
Thanks everone !
-
January 24th, 2011, 11:08 AM
#4
Re: how to compile a console application with wxwidgets?H
Originally Posted by ninja9578
What do you mean mode console? What errors are you getting? I don't see any problems
a CLI application
thanks !!
-
January 24th, 2011, 11:33 AM
#5
Re: how to compile a console application with wxwidgets?H
Oh, that's not a compiler error, it's a linker one.
-
January 24th, 2011, 09:21 PM
#6
Re: how to compile a console application with wxwidgets?H
If you are new to wxWidgets then head over to
http://wxdsgn.sourceforge.net/
download the IDE with visual designer( its free) , everything is setup ready to go , try the same code in this IDE , it take care of all header and linker issues for you , codeblocks is a Good IDE , however more meat for exprienced developers ,
further http://www.3dbuzz.com have some great tutorials on wxWidgets and C++
-
January 24th, 2011, 10:18 PM
#7
Re: how to compile a console application with wxwidgets?H
There is a good forum here: http://forums.wxwidgets.org/
I used to use wxWidgets a lot, but I stopped and wrote my own library after I saw something that really irked me with their implementation, but unless you are doing complex library stuff, you don't need to worry about that.
-
February 6th, 2011, 03:16 PM
#8
Kasiko
Kasika hello friend, I see you already solved your problem but I'm still the same, and took 1 ½ months searching for a solution and still nothing I can compile programs in graphical mode but not in console mode, not as I contact you or at least he would know how to compile programs in console mode from the beginning as a manual from 0, now I'm using codeblocks (without MinGW), MinGW (latest version) and WxPack
I would like to know how to install each of them
for example in two ways Mingw one that says, previous packet or the latest updates
and how you set the wxwidgets:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
sorry for my english, i'm peruvian
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|