1

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.

2 Answers 2

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.

  1. Create project from perforce
  2. Create separate language-specific project and set it up so that it is created from existing sources.
  3. Share project (in perforce plugin terminology) so this is under perforce control now
6
  • Could you explain what you mean by create project from Perforce??
    – user900785
    Dec 14, 2011 at 16:17
  • Press ctrl+N and choose "project from perforce". Then select the branch you're going to consider as the project.
    – user1087439
    Dec 14, 2011 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, 2011 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)
    – user1087439
    Dec 14, 2011 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, 2011 at 9:17
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.