Beginner: Add sub-folders of source code from one project to another

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Beginner: Add sub-folders of source code from one project to another

1,203 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by KG1 on Wed Oct 16 19:29:07 MST 2013
I wish to use a sub-fplder of one example project in another project. (transfer of a library? never compiled separately). What is the best way to move and include this source code in another project? Thanks for your help. Kevin.
ps I found a link to "Using library projects from your own projects" but it is a broken link. This is what I wish to do: take sub folders from my existing projects and add them to my new project.
0 Kudos
Reply
3 Replies

1,189 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Oct 18 01:19:19 MST 2013
If your project only contains C++ files, then just changing the C++ compiler options should be sufficient. But it is probably better to be safe than sorry and do the C compiler (and potentially the Assembler) too.

Regards,
LPCXpresso Support
0 Kudos
Reply

1,189 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by KG1 on Thu Oct 17 10:08:14 MST 2013
Thank you for your reply. I have completed the copy and paste and in Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU C Compiler -> Includes added a new line similar to existing ones "${workspace_loc:/${ProjName}/myInterface}"

As the new project is a C++ project I also did the same in MCU C++ Compiler -> Includes.

Is this correct or would C++ be sufficient?
0 Kudos
Reply

1,189 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Oct 17 02:25:35 MST 2013
It is not clear from your post as to what you actually want to do here.

At the simple level of just copying the folder from the old to the new project:
[list=1]
  [*]Right click on folder in the old project in Project Explorer. Select Copy.
  [*]Right click on place you want the folder to exist in the new project, and select Paste.
[/list]

Note that you may need to edit Include paths in the Project Properties of the new project - depending upon if header files are involved.

But if you are talking about libraries, then information on using library projects can be found at:

http://www.lpcware.com/content/faq/lpcxpresso/creating-linking-library-projects

If you need more help, please explain in more detail what you are actually trying to do.

Regards,
LPCXpresso Support

0 Kudos
Reply