I'm trying to set up Code::Blocks under Windows 7 Professional SP1 to work for remote compilation (using PuTTY link -> plink) on a linux server, but I am not much familiar with that topic. This is the manual I used:
http://wiki.codeblocks.org/index.php?title=Using_Xming_for_remote_compilation
I configured Code blocks as follows:
Settings->Compiler and debugger->Global compiler settings->Toolchain executabes:
Program Files->Make program: plink.exe
Project->Properties->Project Settings:
Makefile: makefile_name
[checked] This is a custom makefile
Execution direction: Z:\Path\to\Samba\Share
Project's build options->Debug->"Make" commands:
Build project/target:
$make -X -ssh user@linux_server -pw my_great_password make -f $makefile -C /path/to/my/makefile
Compile single file:
$make -X -ssh user@linux_server -pw my_great_password make -f $makefile -C /path/to/my/makefile $file
Clean project/target:
$make -X -ssh user@linux_server -pw my_great_password make -f $makefile clean -C /path/to/my/makefile
Ask if rebuild is needed:
$make -X -ssh user@linux_server -pw my_great_password make -q -f $makefile -C /path/to/my/makefile
Silent build:
$make -X -ssh user@linux_server -pw my_great_password make -s -f $makefile -C /path/to/my/makefile
By the way, do I invoke the compiler/linker on the linux server or is Code::Blocks itself compiling and linkung the source on the linux server? Excuse my nescience.
The problem I am facing now, is that I can not access environment variables in the makefile:
include $(MY_ENV_VAR)/path/to/another/makefile
The error I receive let's me assume, that MY_ENV_VAR
remains empty:
/path/to/another/makefile: No such file or directory
I checked if Code::Blocks tries to resolve the environment variable of my windows computer but that is not the case.
Additional information:
Code::Blocks version:
Version: 10.05, Build: May 27 2010, 19:10:05 - wx2.8.10 (Windows, unicode) - 32 bit
Linux server:
Linux linux_server 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
I can provide more information if needed. I also welcome other suggestions to realize a remote compilation on a linux machine from windows. Or is another IDE more suitable for doing remote compilation?
Thanks for reading/helping.
Edit:
I found someone having a similar problem with NetBeans IDE: