Author Topic: About wxSmith and compiling on Linux  (Read 4729 times)

Offline nime1

  • Multiple posting newcomer
  • *
  • Posts: 22
About wxSmith and compiling on Linux
« on: September 21, 2010, 07:49:25 pm »
Hello,

1) I would like to know is this my fault (as usually) or wxSmith can't yet propagate events like KeyDown, GotFocus and so to textBoxes, listBoxes, comboBoxes to be achievable from code. For now I havent those events listed on propertyes for those controls but I would like to.
Is this possible to get with wxSmith?

2) I made small program at windows where in IDE and out of them program works OK.
Then I load same project (*.cbp) to Linux. I get that whole project looks properly but I can't compile them. On windows I have c::B 10.05, on Linux 8.02.
I get folowing message:

-------------- Build: Release in aaa ---------------
Compiling: aaaMain.cpp
cc1plus: error: unrecognized command line option "-mthreads"
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

What I need to do for successfully compiling on both OSes?


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: About wxSmith and compiling on Linux
« Reply #1 on: September 21, 2010, 10:30:40 pm »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nime1

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: About wxSmith and compiling on Linux
« Reply #2 on: September 22, 2010, 07:12:43 am »
Well, this dont helps me much as I am a novice.
After enabling full loging I get this (on Linux Ubuntu 9.10):

-------------- Build: Release in aaa ---------------

g++ -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -Wall  -O2    -IC:/wxWidgets-2.8.10/include -IC:/wxWidgets-2.8.10/contrib/include -IC:/wxWidgets-2.8.10/lib/gcc_dll/mswu  -c "/media/Win7/aaa (copy)/aaaMain.cpp" -o obj/Release/aaaMain.o
cc1plus: error: unrecognized command line option "-mthreads"
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
And I still dont know how to remove this -mthreads out of project and why they are here (obviously commes automatically). If i remove this somehow would windows compiling then be OK?
I also expect some concrete help (ansewer) regarding wxSmith.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: About wxSmith and compiling on Linux
« Reply #3 on: September 22, 2010, 10:40:54 am »
Create a sample wxWidgets-application with the wizard and see which flags are set there.
You can not use a windows-project directly on linux, due to other defines and possibly libs.

Offline nime1

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: About wxSmith and compiling on Linux
« Reply #4 on: September 22, 2010, 04:20:44 pm »
Thank you jens, this is wery important and helpful information (fact).
I see now, many things from windows wizard (which make my project automatically) commes to linux which messes compiler.
OK, my wx in linux works good so I should make new project with same files to have similar program on both platforms? If this is all - not a big deal.

And please, regarding wxSmith, how to get key and mouse events for text, combo, listboxes through them?
Or ansewer that this don't go will be also good if don't go.

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: About wxSmith and compiling on Linux
« Reply #5 on: September 22, 2010, 04:36:32 pm »
OK, my wx in linux works good so I should make new project with same files to have similar program on both platforms? If this is all - not a big deal.

Yep. The compiling options are quite different on both systems. My suggestion is to do the heavy developing on your platform of choice, then create an empty wxWidgets project on the other and add the source files.

Or you could set your environment under linux for crosscompiling a win binary as well, there are detailed instructions for that at the wiki. I used to do this, but I started having odd problems with some of my code, that I didn't manage to solve.

If a cross-environment project could be exported this would be a huge help...

Quote
And please, regarding wxSmith, how to get key and mouse events for text, combo, listboxes through them?
Or ansewer that this don't go will be also good if don't go.

I don't think I got this part.

Ken

Offline nime1

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: About wxSmith and compiling on Linux
« Reply #6 on: September 22, 2010, 05:26:04 pm »
Hello Ken,
thank you for further clearance of cross-compiling.

wxSmith.
When I put panel on the new form under Resources tab of project management I get all provided properties for them and events on the list.
When I put f.e. textBox on this panel I get all provided propertyes but only few events TEXT, TEXT_ENTER, TEXT_URL and TEXT_MAXLEN. I would like to have keyDown, KeyUp, Dblclick, MouseOver and other usual events for such controls too.
But I haven't it listed in list of events.
It is the same at win and lin version.
Should I do something what I missed regard this?

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: About wxSmith and compiling on Linux
« Reply #7 on: September 25, 2010, 12:08:11 am »
Hello Ken,
thank you for further clearance of cross-compiling.
Always a pleasure.

Quote
wxSmith.
When I put panel on the new form under Resources tab of project management I get all provided properties for them and events on the list.
When I put f.e. textBox on this panel I get all provided propertyes but only few events TEXT, TEXT_ENTER, TEXT_URL and TEXT_MAXLEN. I would like to have keyDown, KeyUp, Dblclick, MouseOver and other usual events for such controls too.
But I haven't it listed in list of events.
It is the same at win and lin version.
Should I do something what I missed regard this?

Not all available events are built into the wxSmith interface, but you can still call them. Look at the code that is generated by the IDE when you add a handler to a control, and try copying it for the events you want to use.

Ken

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: About wxSmith and compiling on Linux
« Reply #8 on: September 25, 2010, 09:34:35 am »
But if you add own code, do it outside the //(* ... //*) blocks, because the code between them is generated by wxSmith and all hand-made code will be overwritten if you change something in the wxsmith-file(s).