User forums > Using Code::Blocks
move project from linux <--> windows
bugmenot:
codeblocks v8.02
I have a linux wxwidgets project. So I just tried moving it (copied entire project folder) to a windows box. The project opens fine, but it wouldn't compile. Seems to be missing locations for wx include & lib files. And maybe needs to know different lib files for windows..? But before I start manually fixing it my own way, I was wondering is this wise?
Should I just maintain two different project files, one for linux and one for windows?
killerbot:
yes, the main difference is where the wx stuff is.
On linux you can see in the cbp file it uses backticks on wxconfig. On windows you can use the CB global variable.
Just create a wx project in CB on windows (with the wizards), and then have a compare on the cbp files, and it will become obvious which compiler/linker settings you will need to copy into the 'cbp that came from linux)
@biplab : This is something I have been thinking about for a long time. What about a wx project wizard for multiple platforms, giving you 4 targets :
1) Debug(linux)
2) Release(linux)
these 2 only for platform::linux
3) Debug(windows)
4) Release(windows)
these 2 only for platform::windows
Would be very cool, I myself am always manually copy/pasting cbp's to have the same project file for win and linux ...
cacb:
--- Quote from: killerbot on March 27, 2008, 08:37:37 am ---@biplab : This is something I have been thinking about for a long time. What about a wx project wizard for multiple platforms, giving you 4 targets :
1) Debug(linux)
2) Release(linux)
these 2 only for platform::linux
3) Debug(windows)
4) Release(windows)
these 2 only for platform::windows
Would be very cool, I myself am always manually copy/pasting cbp's to have the same project file for win and linux ...
--- End quote ---
A wizard to make portable projects would be very cool. If done it is needed to support different compilers on different platforms. I have done this for almost a year already, it almost works fine, I use 4 build targets
Debug_W32/Release_W32 : Windows XP with MS Visual Studio 2005 Express C++ compiler
Debug_UX/Release_UX : Linux Kubuntu 7.04/7.10 with GCC
The .cbp file was edited in a text editor to contain the 4 build targets. References to wxWidgets and other libraries in the build options always use C::B global variables which are different on different platforms. That way the .cbp file is independent on where libraries used are installed.
This works fine except that
a) You cannot compile individual files explicitely. You must always "build" the project.
b) Multiple warning dialogs about non-existing MSVC8 compiler is given for the Windows build targets when opening the project on Linux, even though the Windows build target is specified to be Windows only.
Given these limitations, it works ok. The .cbp, wxSmith and C++ files can be copied back and forth without problems. Komparator on Kubuntu is a great tool for such copying.
So a wizard to support this scenario would be most welcome. :lol:
Biplab:
--- Quote from: killerbot on March 27, 2008, 08:37:37 am ---@biplab : This is something I have been thinking about for a long time. What about a wx project wizard for multiple platforms, giving you 4 targets :
1) Debug(linux)
2) Release(linux)
these 2 only for platform::linux
3) Debug(windows)
4) Release(windows)
these 2 only for platform::windows
Would be very cool, I myself am always manually copy/pasting cbp's to have the same project file for win and linux ...
--- End quote ---
That would be a nice extension to the wizard. I'll try to work on it this weekend. :)
--- Quote from: cacb on March 27, 2008, 03:16:40 pm ---This works fine except that
a) You cannot compile individual files explicitely. You must always "build" the project.
b) Multiple warning dialogs about non-existing MSVC8 compiler is given for the Windows build targets when opening the project on Linux, even though the Windows build target is specified to be Windows only.
--- End quote ---
Bugs!! Please file them at Berlios. :)
killerbot:
@Biplab : just a little reminder 8)
Navigation
[0] Message Index
[#] Next page
Go to full version