code: def run(self):
      syms = {}
      reg = getattr(self.generator, "export_symbols_regex", ".+?")
      if "msvc" in self.env.CC_NAME:
          outputs = [
              x.abspath() for x in self.generator.link_task.outputs
          ]
          binary_path = list(
              filter(lambda x: x.endswith("lib"), outputs)
          )[0]
          reg_compiled = re.compile(
              r"External\s+\|\s+(?P<symbol>%s)\b" % reg
          )
          cmd = (self.env.LINK_CC) + ["/dump", "/symbols", binary_path]
      else:  # using gcc? assume we have nm
          outputs = [
              x.abspath() for x in self.generator.link_task.outputs
          ]
          binary_path = list(
              filter(lambda x: x.endswith("dll"), outputs)
          )[0]
          reg_compiled = re.compile(r"(T|D)\s+_(?P<symbol>%s)\b" % reg)
          cmd = (self.env.NM or ["nm"]) + ["-g", binary_path]
      dump_output = self.generator.bld.cmd_and_log(cmd, quiet=STDOUT)
      syms = set([])
      for m in reg_compiled.finditer(dump_output):
          syms.add(m.group("symbol"))
      syms = list(syms)
      syms.sort()
      self.outputs[0].write("EXPORTS\n" + "\n".join(syms))
  
file_path: aubio/waf_gensyms.py
imports: import re
  import os.path
  from waflib import TaskGen, Task
  from waflib.Context import STDOUT
  from waflib.Utils import O644
label_desc: Use image node_id 1 for calling the gen_sym_file obj's underlying member method code with example usage: obj.run() without return types