Author Topic: How to build wxSmith project on Windows and Linux  (Read 2870 times)

Offline kathbeau

  • Multiple posting newcomer
  • *
  • Posts: 17
How to build wxSmith project on Windows and Linux
« on: November 26, 2014, 01:05:58 am »
I am working through the wxSmith tutorials, performing the steps first on Windows and then again on Linux. I will want to be able to work in either environment, and copy the latest files to the other machine.

I tried simply copying the Tutorial 1 (Hello World) from Windows to Linux, but get many build errors. In looking at the .cpb file, I can see there are significant differences, but editing that in a text editor is (so far) not successful, and probably the wrong way to go about it.

What is the correct way to develop a wxSmith project on either system and move it to the other?

Thank you for your help.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: How to build wxSmith project on Windows and Linux
« Reply #1 on: November 26, 2014, 02:27:24 am »
To me there is three obvious methods using normal CB Projects.

1. Have separate projects for both Windows and Linux
2. Have separate targets for both Windows and Linux inside the same CB Project
3. Have a single target for both Windows and Linux this is so hard that it is almost always impossible.
(But, it likely can be done using wx-config and maybe some CB scripting)

I think the first method is easiest for a CB newbie to do.
But, I think the second is better option just harder to do.

NOTE: My answer is based on wxWidgets CB Project NOT on wxSmith CB Project.
I am just a newbie on wxSmith CB Project. But, at intermediate level on wxWidgets CB Projects.

Tim S.
 
« Last Edit: November 26, 2014, 02:30:27 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline kathbeau

  • Multiple posting newcomer
  • *
  • Posts: 17
[SOLVED] How to build wxSmith project on Windows and Linux
« Reply #2 on: November 26, 2014, 03:25:09 pm »
EDITED: Answering my own question, I tried it... created a new project on Linux, and then copied in all files except the .cpb from Windows, re-opened the project, built it and ran it... works great.

Note that for a multi-form project (e.g., the wxSmith Tutorial 4), it was necessary to create each of the forms and name them appropriately in the "other" environment, and then copy over the .cpp, .h and .wxs files from the environment where I was making changes. (I'm just mentioning this in case somebody else has a similar question to mine.)

THANK YOU so much!

Earlier post...

Just to help me understand, when you say to use separate projects on Windows and Linux, how should I go about doing that?

A thought that occurred to me after I posted yesterday is to set up the project in each environment, and then as development evolves, copy in the files other than the .cpb, adding new units to the project as necessary.

Is that what you meant?

Thanks for your response.

Kathleen
« Last Edit: November 26, 2014, 04:33:24 pm by kathbeau »