I have the Perforce plug-In in my Eclipse IDE. Now I want to import Eclipse C projects that is already in the Perforce server. However, I cannot build them. They do not get imported as a C project.
Asked
Active
Viewed 1,009 times
2 Answers
0
In my Eclipse, I can right click on the project and choose New --> "Convert to a C/C++ project (Adds C/C++ Nature)". See also this question: Adding a C/C++ nature to an Eclipse project

Community
- 1
- 1

Tor Klingberg
- 4,790
- 6
- 41
- 51
0
I observed the same situation for Java project. Looks like any project from perforce is imported as just the Project. So that to resolve the problem I used the following approach.
- Create project from perforce
- Create separate language-specific project and set it up so that it is created from existing sources.
- Share project (in perforce plugin terminology) so this is under perforce control now
-
Could you explain what you mean by create project from Perforce?? – user900785 Dec 14 '11 at 16:17
-
Press ctrl+N and choose "project from perforce". Then select the branch you're going to consider as the project. – Dec 14 '11 at 16:34
-
That key doesn't work for me. Also, in the File menu of Perforce I do not have this option.. I use p4v Perforce Visual Client/LINUX26X86/2010.2/317255 – user900785 Dec 14 '11 at 16:48
-
All those actions I was talking about should be performed inside of Eclipse IDE. So then in your case you should right-click on the required branch (holding your project) and choose sync to head revision. Notice where it is stored on your HDD. Then proceed from step 2 by specifying sources of that synced project (just point the folder perforceput your project to) – Dec 14 '11 at 17:03
-
Thanks Alexey. But I have a problem that when I try to build any perforce projects, I have no permissions: This is the error I got:Problems occurred building the selected resources. Errors running builder 'CDT Builder' on project 'proj1'. Could not write to read-only file: '/proj1/Debug/sources.mk'. Could not write to read-only file: '/proj1/Debug/sources.mk'. – user900785 Dec 15 '11 at 09:17
-
Ok I checked this post which had lot of information. The only conclusion is the files are always read-only :( Also, I do not see how I can import projects from other eclipse workspaces to the eclipse-perforce workspace and check it in each time... Check this link: http://www.eclipse.org/forums/index.php/t/206273/ – user900785 Dec 15 '11 at 09:48