Author Topic: Porting wxSmith smith project Linux to Windows  (Read 3115 times)

Offline muxecoid

  • Single posting newcomer
  • *
  • Posts: 3
Porting wxSmith smith project Linux to Windows
« on: January 17, 2009, 02:17:59 pm »
Hey. I created a small project using wxSmith under Linux and later copied the code to Windows. The project fails to compiles as Linux and Windows versions of wxSmith generate different project options and build options. Is it possible to generate a cross platform project file using wxSmith? Is it possible to export options (include dirs, linker liraries, etc...) from another project (empty wxSmith project generated under Windows)? Currently I'm I'm hunting differences in Linux and Windows generated projects one by one through GUI and copying them, it is very irritating.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Porting wxSmith smith project Linux to Windows
« Reply #1 on: January 21, 2009, 11:10:57 pm »
I did this by creating new project on windows, opening project files in any text editor and copying proper sections from windows one to the linux one - this creates new project but from that point it will work on windows only.

There's also another solution I could suggest. I've written a plugin called lib_finder. These features I'll describe here were added after 8.02 release so newer version is needed.
It works like this: instead of configuring the library inside the project file, you configure it inside code::blocks (lib_finder's database) - after that you can just select in your project options to use wxWidgets library and that's all. The only drawback is that anyone willing to compile the project will require lib_finder plugin and wxWidgets library configured inside lib_finder's database.

To create lib_finder database entry for wxWidgets, the easiest way is to use lib_finder to automatically detect wxWidget's settings. Simply go to menu: Plugins->Lib Finder and click on 'Scan' button. An window will popup allowing you to choose directories where libraries may be located. These directories will be scanned recursively.
If you have any problems with automated detection you can create library entry manually and copy settings from some existing project.

If the library is properly set-up (of course you'll have to setup it on both linux and windows C::B) go to project's properties and then to 'Libraries' tab. Make sure that the 'Don't setup automatically' option is not checked and add the 'wx' library into project. And that's it - the same project may be used on both windows and linux. While compiling, settings from lib_finder's database will be applied to compiler options automatically.

Regards
   BYO