Hello,
I am trying my hands on debugging on openSUSE 11.2 and when I use the following build command:
gcc -o -g tut tutorial01.c -I/usr/local/include -L/usr/local/lib -lavutil -lavformat -lavcodec
I get following linking error list:
/usr/src/packages/BUILD/glibc-2.10.1/csu/../sysdeps/i386/elf/start.S:65: multiple definition of `_start'
/usr/lib/gcc/i586-suse-linux/4.4/../../../crt1.o:/usr/src/packages/BUILD/glibc-2.10.1/csu/../sysdeps/i386/elf/start.S:65: first defined here
tut:(.rodata+0x0): multiple definition of `_fp_hw'
/usr/lib/gcc/i586-suse-linux/4.4/../../../crt1.o:(.rodata+0x0): first defined here
tut: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/i586-suse-linux/4.4/../../../crti.o:initfini.c:(.fini+0x0): first defined here
tut:(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/i586-suse-linux/4.4/../../../crt1.o:(.rodata.cst4+0x0): first defined here
tut: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/i586-suse-linux/4.4/../../../crt1.o:(.data+0x0): first defined here
tut: In function `__data_start':
(.data+0x4): multiple definition of `__dso_handle'
/usr/lib/gcc/i586-suse-linux/4.4/crtbegin.o:(.data+0x0): first defined here
tut: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/i586-suse-linux/4.4/../../../crti.o:initfini.c:(.init+0x0): first defined here
/tmp/cc2GqJnC.o: In function `SaveFrame':
tutorial01.c:(.text+0x0): multiple definition of `SaveFrame'
tut:(.text+0xb4): first defined here
/tmp/cc2GqJnC.o:(.data+0x0): multiple definition of `buffer_protocol'
tut:(.data+0x20): first defined here
/tmp/cc2GqJnC.o: In function `main':
tutorial01.c:(.text+0x423): multiple definition of `main'
tut:(.text+0x4d7): first defined here
/usr/lib/gcc/i586-suse-linux/4.4/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
tut:(.dtors+0x4): first defined here
/usr/lib/gcc/i586-suse-linux/4.4/../../../../i586-suse-linux/bin/ld: warning: Cannot create .eh_frame_hdr section, --eh-frame-hdr ignored.
/usr/lib/gcc/i586-suse-linux/4.4/../../../../i586-suse-linux/bin/ld: error in tut(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
But when I build it without -g option it builds fine. I am new on linux so is there something I might be missing? My machine is 32 bit and OS is OpenSUSE 11.2
Any help will be appreciated
Cheers!!!
Sandeep