teaguehall Posted May 3, 2017 Share Posted May 3, 2017 Hello there, I've run into an issue in which the PMAC IDE C compiler appears to link "C Library" code to all background programs regardless of whether or not the background program uses the library. This becomes an issue when a library requires an external definition. Example: Let's say I declare the following in a file called "library.h": extern void myAppSpecificFunc(); My library (library.c) calls this function. However, it is the responsibility of the end program to actually define the behavior. This should be fine since I will just make sure to define the function in whatever program uses the library. However, I've noticed that even background C programs that don't use the library are still being linked against the library. This causes an 'undefined reference to myAppSpecificFunc' error to be raised. The short term workaround is just to place a dummy define "void myAppSpecificFunct(){}" in all my background programs, however, it creates clutter. IDE version: 2.1.0.107 Link to comment Share on other sites More sharing options...
steve.milici Posted May 10, 2017 Share Posted May 10, 2017 This behavior is expected. Background Capps were intended to use your library functions. "#include" your "library.h" in your background Capps or do what your doing now. Link to comment Share on other sites More sharing options...
Recommended Posts