![]() | Unity Fixture |
|
05 May 2011, 06:10
M K (5 posts) |
Hi, I’m trying to get the unity framework running under IAR. Anyone successful with this? When I try to compile, I get an error that malloc, calloc, and free are being defined twice. Once in stdlib.h and once in the unity_fixture_malloc_overrides.h. Thanks. Marc |
|
05 May 2011, 18:49
Daniel Lehmann (5 posts) |
Hi Marc, Did you check the include paths? If there is a path to stdlib.h and the other header-file this may cause the problem. Regards |
|
06 May 2011, 00:33
M K (5 posts) |
Hi Dani, Thanks for the reply. stdlib.h is called from inside the unity_fixture.c program. Doesn’t it need stdlib.h then? Regards, |
|
06 May 2011, 19:33
Daniel Lehmann (5 posts) |
Hi Marc, If you have for instance the malloc defined in the fixture but have a include path definied where there is another definition of malloc this conflicts as I understand. Sometimes development environments have settings ‘behind the scenes’ and you don’t really know what’s going on. So what I do is search through the settings of the different dialogs, hoping to find something suspicious. Regards |
|
17 May 2011, 18:55
James Grenning (130 posts) |
Hi Marc To get memory leak detection we use the preprocessor to override I suggest that disable memory leak detection in the IAR build. Defining this symbol in the IAR IDE build (not sure what to call this) should turn off memory leak detection. CPPUTEST_MEM_LEAK_DETECTION_DISABLED In the Makefile we pass -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED to gcc. James |
| You must be logged in to comment |

