Page 1 of 1
Build Variables not defined in v1.0.2893
Posted: Fri Aug 28, 2009 9:27 am
by saurav
I created a workspace containing a simple project where I tried to use the Build variables like WorkspacePath, ProjectPath etc for the intermediate and output files. But other than IntermediateDirectory, ConfigurationName and OutDir, none of the variables are defined. Try building the attached workspace and see the output from Pre Build Commands. Am I doing something wrong? Or is this an unimplemented feature? For me, this is an issue on both Windows (XP Pro SP2) and Linux (Ubuntu 9.04).
Also, under Windows, CodeLite emits the following at the end:
Can't open perl script "c:\Program": No such file or directory
What is this about? On my system, Perl is installed in E:\E:\Perl-5.6.1.635. CodeLite is installed in "E:\Program Files\CodeLite".
On Windows, my Build System is set to "GNU makefile for g++/gcc. Build Tool is "c:\cygwin\bin\make.exe"
Cheers,
Saurav.
Re: Build Variables not defined in v1.0.2893
Posted: Fri Aug 28, 2009 3:19 pm
by eranif
saurav wrote:I created a workspace containing a simple project where I tried to use the Build variables like WorkspacePath, ProjectPath etc for the intermediate and output files. But other than IntermediateDirectory, ConfigurationName and OutDir, none of the variables are defined. Try building the attached workspace and see the output from Pre Build Commands. Am I doing something wrong? Or is this an unimplemented feature? For me, this is an issue on both Windows (XP Pro SP2) and Linux (Ubuntu 9.04).
I committed a fix for this on SVN trunk, so now the following macros are available during the post/pre build commands:
Code: Select all
ConfigurationName
IntermediateDirectory
OutDir
WorkspacePath
ProjectPath
User
Date
CodeLitePath
However, the file specific macros (CurrentFileName , CurrentFulePath , CurrentFileFullPath ) are still not available during those steps.
Also, those macros are ONLY available when using the default build system (i.e. it will not work when using custom makefile/qmake etc.)
saurav wrote:Can't open perl script "c:\Program": No such file or directory
I am missing the context here, but my guess is that you should surround your command with quotation marks cause the path that you are trying to use includes space in it.
Eran
Re: Build Variables not defined in v1.0.2893
Posted: Mon Aug 31, 2009 8:48 am
by saurav
Eran wrote:saurav wrote:Can't open perl script "c:\Program": No such file or directory
I am missing the context here, but my guess is that you should surround your command with quotation marks cause the path that you are trying to use includes space in it.
Eran
I am not running a perl command anywhere. That's my problem. I don't know what is trying to run the perl script, or what that script is.
Re: Build Variables not defined in v1.0.2893
Posted: Mon Aug 31, 2009 9:22 am
by eranif
saurav wrote:I am not running a perl command anywhere. That's my problem. I don't know what is trying to run the perl script, or what that script is.
This is definitly one of your scripts - try to search for it. (are you using any post commands? are you using custom build?)
I can help you locate the offensive script, but please provide more information (e.g. paste here the entire 'build' tab output + 'trace' tab output)
Eran
Re: Build Variables not defined in v1.0.2893
Posted: Mon Aug 31, 2009 9:41 am
by saurav
The only pre/post build commands my project has are to echo the build variables. I am not using custom build. If I just run "Build" on the project, I get the perl related error.
If I run make in the wsp.mk file in a command prompt window, I don't see the perl related error. I only see it inside codelite.
I attached a project in my first post. Please try to build the project/workspace therein.
Thanks,
Saurav.
Trace tab output
----------------------------------------------------------------------------
10:14:01: Loaded debugger: GNU gdb debugger, Version: v1.0
10:14:01: Loaded plugin: Abbreviation plugin
10:14:01: Loaded plugin: Source Code Formatter (AStyle)
10:14:02: Loaded plugin: Continuous build plugin which compiles files on save and report errors
10:14:02: Loaded plugin: Copyright Plugin - a small plugin that allows you to place copyright block on top of your source files
10:14:02: Loaded plugin: Cscope Integration for CodeLite
10:14:02: Loaded plugin: A plugin that allows user to launch external tools from within CodeLite
10:14:02: Loaded plugin: Gizmos Plugin - a collection of useful utils for C++
10:14:02: Loaded plugin: Qt's QMake integration with CodeLite
10:14:03: Loaded plugin: Snippet wizard
10:14:03: Loaded plugin: Subversion
10:14:03: Loaded plugin: A Unit test plugin based on the UnitTest++ framework
10:14:03: Loaded plugin: wxFormBuilder integration with CodeLite
10:14:04: Loading accelerators from 'e:\Program Files\CodeLite/config/accelerators.conf.default'
10:14:04: Loading accelerators from 'e:\Program Files\CodeLite\plugins\resources\abbreviation.accelerators'
10:14:04: Loading accelerators from 'e:\Program Files\CodeLite\plugins\resources\external_tools.accelerators'
10:14:04: Loading accelerators from 'e:\Program Files\CodeLite/config/accelerators.conf.default'
10:14:04: Loading accelerators from 'e:\Program Files\CodeLite\plugins\resources\abbreviation.accelerators'
10:14:04: Loading accelerators from 'e:\Program Files\CodeLite\plugins\resources\external_tools.accelerators'
10:14:04: Install path: e:\Program Files\CodeLite
10:14:04: Startup Path: e:\Program Files\CodeLite
10:14:00: Error: Cannot read typename from '\\hydres1\msdn\'!
----------------------------------------------------------------------------
Build Tab output
----------------------------------------------------------------------------
----------Build Started--------
"c:/cygwin/bin/make.exe" -j 1 -f "trycodelite_wsp.mk"
----------Building project:[ core - Debug ]----------
Executing Pre Build commands ...
WorkspacePath is
ProjectPath is
ProjectName is core
IntermediateDirectory is ./Debug
ConfigurationName is Debug
OutDir is ./Debug
CurrentFileName is
CurrentFilePath is
CurrentFileFullPath is
User is
Date is
CodeLitePath is
Done
Can't open perl script "c:\Program": No such file or directory
make.exe[1]: *** [Debug/core.o.d] Error 2
make: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings
----------------------------------------------------------------------------
Output of make in a command prompt
----------------------------------------------------------------------------
F:\work\trycodelite>c:\cygwin\bin\make.exe -f trycodelite_wsp.mk
----------Building project:[ core - Debug ]----------
make.exe[1]: Entering directory `/cygdrive/f/work/trycodelite/core'
Executing Pre Build commands ...
WorkspacePath is
ProjectPath is
ProjectName is core
IntermediateDirectory is ./Debug
ConfigurationName is Debug
OutDir is ./Debug
CurrentFileName is
CurrentFilePath is
CurrentFileFullPath is
User is
Date is
CodeLitePath is
Done
makedir: not found
make.exe[1]: *** [Debug/core.o.d] Error 127
make.exe[1]: Leaving directory `/cygdrive/f/work/trycodelite/core'
make: *** [All] Error 2
----------------------------------------------------------------------------
Re: Build Variables not defined in v1.0.2893
Posted: Mon Aug 31, 2009 10:15 am
by saurav
Also, I see the Perl related error only when I set the "Compiler:" option in Project Settings to "gnu g++". If set to VC++, it encounters a different set of problems, but not the perl related error.
Re: Build Variables not defined in v1.0.2893
Posted: Mon Aug 31, 2009 3:32 pm
by eranif
saurav wrote:Also, I see the Perl related error only when I set the "Compiler:" option in Project Settings to "gnu g++". If set to VC++, it encounters a different set of problems, but not the perl related error.
This has nothing to do with it.
saurav wrote:"c:/cygwin/bin/make.exe"
I see that you are using cygwin, this could cause a problem, especially if it will try to locate files like /cygdrive/..., since these paths are only recognized within cygwin shell.
Unless told speicifically, cygwin does not understand paths like C:\ etc, only /cygdrive/c/ - the 'make' command that you are using is part of the cygwin installation - google it and you will how to disable cygwin paths and tell cygwin's make to understand Windows native paths.
or you could install codelite with MinGW (there is a package for this on sourceforge)
Eran
Re: Build Variables not defined in v1.0.2893
Posted: Tue Sep 01, 2009 1:51 pm
by saurav
I am now using MinGW 5.1.4. The perl error is gone, but I have a different set of problems, which I have posted here:
http://codelite.org/forum/viewtopic.php?f=11&t=568
Thanks for your help.
Saurav.
Re: Build Variables not defined in v1.0.2893
Posted: Tue Sep 01, 2009 2:25 pm
by eranif
I have replied to those problems in the other thread
Eran