Build problem

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

Build problem

948 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by giovanniquaglia on Tue Jan 10 09:17:08 MST 2012
I have a problem building a project that contains static libraries.
The project contains :
CMSIS2.0
MyLib (C Static Library Project)
TryLib (C Project)
In Project Reference property of TryLib there are both CMSIS and MyLib.

If I make a change in MyLib.c and then Build TryLib project the make process correctly invoke C Compiler on MyLib.c and then Archiver but do not invoke Linker on TryLib Project.

Where is the mistake?
0 Kudos
Reply
3 Replies

937 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Jan 11 04:25:54 MST 2012
Please see:

http://support.code-red-tech.com/CodeRedWiki/BuildBehaviorLibraryProjects

Regards,
CodeRedSupport
0 Kudos
Reply

937 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Jan 10 16:03:17 MST 2012
Same thing happens here.

The poject MyLib is selected as a project reference in TryLib and MyLib is correctly being included as library during linking.

MyLib contains a function that is used in TryLib (the test application).
If I import the projects and compile, everything works OK (the first time).
But when I now change MyLib (I changed the name of the function) and then perform a "Build 'TryLib'" I do see that a new .lib file is being created but the MyLib project just states that it is up to date.
When I clean the trylib project it is (of course) being compiled and linked and linking now fails - as expected.

When I look at the makefile, there is no dependency on the .lib file. And I am not able to find how to set this correctly.
In fact, the makefile(s) are a bit strange: objects.mk does contain a reference to all libs but the directories for this libs are hard coded in the gcc line in makefile.

So the LPCXpresso tools do traverse through all the projects that we identified we depend on, but the makefile contains no dependency rule for the output files of those projects :eek:

I am a bit disappointed by the way in which the makefiles are being used.
It's hardly usable for a larger scale system with multiple projects and I am just an inch away from abandoning LPCXpresso's autmagic makefile generation :confused:

Regards,[INDENT]Rob
[/INDENT]
0 Kudos
Reply

937 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Jan 10 10:16:48 MST 2012
Are you sure that MyLib is listed in TryLib as a library? It is not enough to set up a project reference. The library has to be put into the Libraries and Library search path boxs that show up in the Properties / C-C++ Build / Settings / MCU Linker / Libraries dialog.

P.S. There is no need to write "libMyLib.lib" in Libraries, simply "MyLib" will work but the Library search path needs to be filled out to point to the MyLib Debug or Release directory.
0 Kudos
Reply