In reply to tech_savvy:
It would help to show correct syntax, and ALL declarations used by that syntax.
I assume port_name was meant to be an enum, and cfg.port_name was meant to be a variable of that type. You need to show us the type for link_command, and the two text macros.
Also, the 'with' construct was meant to iterate over all values of the bin type using 'item', and that is missing from your declaration.