cancel
Showing results for 
Search instead for 
Did you mean: 

Add CppuTest Library and Includes in a New Build configuration of a Project

RPriy
Associate II

0693W000001rYivQAE.pngIn this image, I have created a new build configuration of Test inside the project & trying to add external library (.a) of CppUTest but not getting add library and library path option. Could you guide me on how to add libraries to any new build configuration created within a project ?

Awaiting your early response.

Thanks

Ritu

6 REPLIES 6
Cartu38 OpenDev
Lead II

Here is one example extracted from STM32Cube AI pack setup. I guess you have to apply same.0690X00000BvtszQAB.png

RPriy
Associate II

This option is also not coming for New Build Configuration.

0693W000001rdk3QAA.png

Here just a context issue ... have try asking for properties on project folder instead your compilation folder ... you will see much more options.

RPriy
Associate II

I intent to include unit test for my firmware for which I have added New build configuration named "Test" (you can see in above pic). I just need to link library of CppUTest to this build configuration so that it doesn't affect the build of the firmware. If you have any other suggestion/way to do this, please help with it.

Not sure to get your issue here then ? I've provided you way to get access to proper option and their setup so ???

There are as always in Eclipse tools many ways to set this up. But I agree with @Cartu38 OpenDev​, in your last screenshot you are accessing the properties for only the "test" folder. This is not the place where you can make general project changes.

You need to do this:

  1. Create a new build configuration, call it "test" or whatever. Project -> Build configurations -> manage... -> New -> based on existing ... choose one Debug?!
  2. Set "test" build config as active
  3. Now you can make sure that for this configuration you link the libraries as describe in @Cartu38 OpenDev​'s first post + you must also add include paths!!

All-in-all you are almost on the right track.