Jump to content
OMRON Forums

PMAC IDE C compiler links library code to ALL background programs


teaguehall

Recommended Posts

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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Guest
This topic is now closed to further replies.

×
×
  • Create New...