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.
Build Variables not defined in v1.0.2893
-
- CodeLite Enthusiast
- Posts: 14
- Joined: Sun Aug 23, 2009 10:24 pm
- Contact:
Build Variables not defined in v1.0.2893
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Build Variables not defined in v1.0.2893
I committed a fix for this on SVN trunk, so now the following macros are available during the post/pre build commands: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).
Code: Select all
ConfigurationName
IntermediateDirectory
OutDir
WorkspacePath
ProjectPath
User
Date
CodeLitePath
Also, those macros are ONLY available when using the default build system (i.e. it will not work when using custom makefile/qmake etc.)
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.saurav wrote:Can't open perl script "c:\Program": No such file or directory
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 14
- Joined: Sun Aug 23, 2009 10:24 pm
- Contact:
Re: Build Variables not defined in v1.0.2893
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.Eran wrote: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.saurav wrote:Can't open perl script "c:\Program": No such file or directory
Eran
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Build Variables not defined in v1.0.2893
This is definitly one of your scripts - try to search for it. (are you using any post commands? are you using custom build?)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.
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
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 14
- Joined: Sun Aug 23, 2009 10:24 pm
- Contact:
Re: Build Variables not defined in v1.0.2893
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
----------------------------------------------------------------------------
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
----------------------------------------------------------------------------
-
- CodeLite Enthusiast
- Posts: 14
- Joined: Sun Aug 23, 2009 10:24 pm
- Contact:
Re: Build Variables not defined in v1.0.2893
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.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Build Variables not defined in v1.0.2893
This has nothing to do with it.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.
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.saurav wrote:"c:/cygwin/bin/make.exe"
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
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 14
- Joined: Sun Aug 23, 2009 10:24 pm
- Contact:
Re: Build Variables not defined in v1.0.2893
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.
http://codelite.org/forum/viewtopic.php?f=11&t=568
Thanks for your help.
Saurav.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Build Variables not defined in v1.0.2893
I have replied to those problems in the other threadsaurav wrote: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
Eran
Make sure you have read the HOW TO POST thread