LpcXpresso - Linked File not compiling

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LpcXpresso - Linked File not compiling

1,124 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Carl-SolderSplash on Mon Apr 22 16:53:40 MST 2013

Hi, A question reguarding project structuring in LpcXpresso, My file structure as follows :


MyProj1


|- src


MyProj2


|- src


CMSIS


|-Cmsis files


Drivers


|-USB


|-OtherDrivers


Shared_Src


|-SharedCode1


I have Lpcxpresso projects set up in Myproj1 and Myproj2, linked to CMSIS and compiling.


Now I want to use shared source in the Shared_Src folder between projects, rather than duplicating it. The shared source files are stored outside of the project folder as shown above.


I've done two things, first added it to the include search path, using the following : "${build_project}../../shared_src/" this works and header files in the shared_src can be reference by my project. 


Next I need to use code in the shared_src dir, so I imported it into the project chosing the link option "Create links in workspace" this then adds to the shared_src folder and it's files as links, rather than duplicating them.


But the code fails to link when calling a function in shared_src from the project.


Any ideas, my goal is to have 1 or more projects share some of the same code. This shared code is configured based upon defines in the project so isn't a standalone lib.


标签 (1)
0 项奖励
回复
1 回复

1,086 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Carl-SolderSplash on Mon Apr 22 17:19:11 MST 2013

Found it,


It seems LPCxpresso ticks the "Exclude resource from build" option when you import and link a directory into a project, helpful!


Right click the folder/file you have imported and make sure "Exclude resource from build" is unchecked.

0 项奖励
回复