0

I am trying to compile some C++ code to be used with gprof, and have tried using the -pg flag, but am getting errors regarding multiple definitions for each of my functions. My command is basically g++ -o -pg my_exec my_code.cp -mylib.

Any idea what I'm doing wrong?

yodafan86
  • 565
  • 1
  • 6
  • 14
  • can you show contents of my_code.cp ? – DOOM Apr 14 '13 at 18:36
  • I think I figured out my problem. -o and -pg appear to be mutually exclusive and conflict with each other. Removing the -o and the executable name, results in everything compiling fine, and being executable from ./a.out – yodafan86 Apr 17 '13 at 14:50

0 Answers0