I am using Codelite on Linux (self complile version)
I have some small issues that I try to search to bypass:
1/ If I want to add 2 differents files into project with samename (for example Abc.cpp and abc.cpp which is completely legal on Linux), Codelite only add one of them. Is there any option to tell CodeLite that the filename is case sentitive ?
2/ I I have a text file in my project (which is needed by our team Software factory) whose name begin with Makefile (for ex: Makefile.factory), I cannot compile correctly the project and have the following error :
>> g++: error trying to exec 'cc1objplus': execvp: No such file or directory
>> make[1]: *** [Debug/Makefile.o.d] Error 1
If I remove the file from the project, it will compile correctly
Thanks
Unable to compile because of filename
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Unable to compile because of filename
Hi,
Following what happens from FileViewTree::AddFilesToVirtualFolder, it calls Manager::AddFilesToProject which checks for uniqueness with a call to Manager::GetProjectNameByFile; and GetProjectNameByFile() uses wxString::CmpNoCase.
Perhaps you could test if replacing this by Cmp() solves your problem.
Eran, any objection to allowing this for non-windows platforms? If not, I'll add a DoCasesensitiveComparison parameter to Manager::GetProjectNameByFile
Regards,
David
There are various ways of adding files to a project and I don't know if they all use the same common pathway, but:1/ If I want to add 2 different files into project with same name (for example Abc.cpp and abc.cpp which is completely legal on Linux), Codelite only adds one of them
Following what happens from FileViewTree::AddFilesToVirtualFolder, it calls Manager::AddFilesToProject which checks for uniqueness with a call to Manager::GetProjectNameByFile; and GetProjectNameByFile() uses wxString::CmpNoCase.
Perhaps you could test if replacing this by Cmp() solves your problem.
Eran, any objection to allowing this for non-windows platforms? If not, I'll add a DoCasesensitiveComparison parameter to Manager::GetProjectNameByFile
Regards,
David
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to compile because of filename
It will fix it for Linux / FreeBSD, but it will cause errors under Mac / Windows (both allows non-case sensitive filenames)DavidGH wrote:Perhaps you could test if replacing this by Cmp() solves your problem
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to compile because of filename
Thanks a lot
For the second issue, do you have any suggestion for workaround ?
For the second issue, do you have any suggestion for workaround ?
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Unable to compile because of filename
The first issue is now fixed in trunk, 5463, for wxGTK.
I'm sorry, but I don't know that part of the codebase at all, and a search for 'Makefile' didn't find anything obvious.For the second issue, do you have any suggestion for workaround ?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to compile because of filename
Can you please post your project and workspace generated makefile ? it is <project-name>.mk and <workspace-name>_wsp.mk2/ I I have a text file in my project (which is needed by our team Software factory) whose name begin with Makefile (for ex: Makefile.factory), I cannot compile correctly the project and have the following error :
FYI: I was not able to reproduce this behavior (i.e. I added Makefile.factory file to a project and it compiles fine)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to compile because of filename
Can you try to add to new file to the project: abc.mm
It will reproduce the issue.
It will reproduce the issue.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to compile because of filename
Thanksdhs wrote:Can you try to add to new file to the project: abc.mm
The compilation you are getting is because the .mm file has a built-in command line (from "settings -> build settings -> <your compiler> -> file types -> mm")
Since codelite did find a match for file with .mm extension, it tried to execute its compilation rule. In this specific case, gcc failed to execute the objective-c compiler.
You can either:
- Install object-c compiler for gcc
- Delete the '.mm' rule from "settings -> build settings -> <your compiler> -> file types -> mm"
Eran
Make sure you have read the HOW TO POST thread