User forums > Using Code::Blocks
OS care in build process
(1/1)
dje:
Hi all !
Fed up with synchronising 2 sandboxes on 2 PCs, I split my XP disk into 3 partitions :
- NTFS XP
- ext3 Ubuntu 7.04
- fat32
I put my sandbox and plugin project on the fat32 partition to share it between XP and Ubuntu and avoid plugin file transfers/sandbox synchro.
I built all on Ubuntu => OK
When I try to build on XP, I have this error message:
--- Code: ---Linking console executable: build_tools\autorevision\autorevision.exe
.objs\build_tools\autorevision\autorevision.o: In function `Z11WriteOutputRKSsRSsS1_':
autorevision.cpp:(.text+0x3a): undefined reference to `ZNSsC1Ev'
...
--- End code ---
As I never built C::B at this place on XP, I was surprised not to compile anything.
Then I realised that both projects build everything at the same location... Am I wrong ?
If not, I'd like the build process to take into account the OS (through a variable ?) to be able to use the same sandbox from diferent OSs.
If nobody disagrees, I'll create a feature request.
Dje
thomas:
I deem it a bad idea to build the same code base from two operating systems. This means you have to do a full rebuild (including deleting the precompiled headers) every time, instead of incremental builds.
Failure to do so will most likely break your build, or may cause the application to crash in an irreproducible manner.
dje:
Hi Thomas,
the main idea was to have on one side, the sources shared buy all OSs and on the other side, output files (intermediate + useful binaries) in different directories that depends on OSs, for example
win/.obj or ubuntu/.objs
win, ubuntu and others could be set by a variable.
Dje
JGM:
--- Quote from: dje on September 01, 2007, 04:20:42 pm ---win/.obj or ubuntu/.objs
--- End quote ---
What I do is, if i have to projects one for linux and one for windows, I modify the project properties for each and make that changes that you are pointing.
For example:
--- Code: ---Project for windows:
- Object outputs dir: .obj/windows/release[ or debug]
- Output filename: bin/windows/release[ or debug]/file.exe
Project for linux:
- Object outputs dir: .obj/linux
- Output filename: bin/linux/release[ or debug]/file
--- End code ---
It work fine for me, just change that properties for each project and build target.
Navigation
[0] Message Index
Go to full version