From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ahrens, Frank 6537 EPE-24" To: "'Mumit Khan'" Cc: "'cygwin@sourceware.cygnus.com'" Subject: AW: How to use gprof under cygwin? Date: Mon, 09 Aug 1999 22:26:00 -0000 Message-id: <7B9327EED0AAD211B0750090270F68EC0BAA5B@hdhexmbx02.ger02.heidelberg.com> X-SW-Source: 1999-08/msg00162.html Hello, if I try to compile the way below, I get the following message /tmp\ccCdYXI6.o(.text+0x4f):test.cc: undefined reference to `mcount'. Do I have to use a special library to link correctly for profiling? Greetings Frank e-mail: frank.ahrens@de.heidelberg.com "Ahrens, Frank 6537 EPE-24" writes: > Hi, > who can give me a hint, how to use gprof under cygwin? > Does it generally work? Are there special things to make regarding cygwin? > I have gprof for Cygwin at: ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/ports/ You do as you normally would: $ gcc -pg -c foo.c $ gcc -pg -o foo foo.o $ ./foo $ gprof foo.exe There are some limitations, but overall it works for C. There're problems with C++ code (you'll probably get linker errors from multiple template instances and so on), and you have to play a small trick with g77. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ahrens, Frank 6537 EPE-24" To: "'Mumit Khan'" Cc: "'cygwin@sourceware.cygnus.com'" Subject: AW: How to use gprof under cygwin? Date: Tue, 31 Aug 1999 23:49:00 -0000 Message-ID: <7B9327EED0AAD211B0750090270F68EC0BAA5B@hdhexmbx02.ger02.heidelberg.com> X-SW-Source: 1999-08n/msg00162.html Message-ID: <19990831234900.B5j5cE6YJJPtrODvLBbGMvWNwGegySt6_cHDGxfU8HM@z> Hello, if I try to compile the way below, I get the following message /tmp\ccCdYXI6.o(.text+0x4f):test.cc: undefined reference to `mcount'. Do I have to use a special library to link correctly for profiling? Greetings Frank e-mail: frank.ahrens@de.heidelberg.com "Ahrens, Frank 6537 EPE-24" writes: > Hi, > who can give me a hint, how to use gprof under cygwin? > Does it generally work? Are there special things to make regarding cygwin? > I have gprof for Cygwin at: ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/ports/ You do as you normally would: $ gcc -pg -c foo.c $ gcc -pg -o foo foo.o $ ./foo $ gprof foo.exe There are some limitations, but overall it works for C. There're problems with C++ code (you'll probably get linker errors from multiple template instances and so on), and you have to play a small trick with g77. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com