Skip to main content

Posts

Showing posts with the label wxWidgets

Executing shell commands with wxWidgets with C++

ever wondered how to execute a shell comand via commandline that will not quit itself? i did have to get that to work and it took me quite a while. here my knowledge as its nowhere on the net so far: i am talking about some command that will invoke something that will stay active as long you do not abort it (like with CTRL-C). Note: like a command that you, when in commandline type in, will not immediately return you to type something in but you have to abort it. in my case this was true to commandline commands for zeroconf (example for linuux is avahi ) if you want to run that on a button click, you of course cannot use system("yourCommand") because then your button event will never end. first idea would be now to create your own thread class via pthreads, and start the thread inside the button event, its execute routine calling this system("yourcommand"). unfortunately this will also cause wxWidgets to hang. wxWidgets itself has an own command called wxSystem fo...

wxWidgets and Eclipse

maybe this article can help someone trying to figure if to or how to run wxWidgets with c++ under linux/windows. but first some intro. In the company i currently work in we are creating software for an embedded linux environment in c++. Because of Development Tools available in Windows, (yes linux also has many development tools but most are not as good as the MS tools, i just say: debugger [you are of course invited to start an argue ;)]) i decided to make the code run on both platforms where possible. then i had the idea to create a simulator with a GUI with which the status of the firmware can be shown . additionally it should be possible to "simulate" all non-hardware related parts on windows so that the software department could easily test their and our stuff. my second approach to this GUI then were wxWidgets. Coming from .NET i only was familiar with windows.forms programming and very sparse MFC, but for one and a half months i also looked into creating swing app...