Error Id Returned 1 Exit Status Dev C%2b%2b

  
The ERROR information is:
/tmp/ccSmkZjg.o.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
I write all the code in only one *.cpp file. When typed:
gcc mf.cpp -o mds
the something wrong happened..
I don't know why.
shimmey@shimmey-laptop:~/c$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ./src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
  1. Error Id Returned 1 Exit Status Dev C 2b 2b 4
  2. Error Id Returned 1 Exit Status Dev C 2b 2b 3
  3. Error Id Returned 1 Exit Status Dev C 2b 2b 1

.status display On the front (IMD40) or on the side (. Return 1 character Isel Germany AG Positioning module IMD20, IMD40 36 Control character Meaning C. No selection 1 Status info 2 Freq. Function code MEI type Read Device Id code Object Id CRC16 2B 0E 01. Here, we are going to learn why an Error: Id returned 1 exit status (undefined reference to 'main') occurs and how to fixed in C programming language?

Hi,

Error Id Returned 1 Exit Status Dev C 2b 2b 4

Exit

I'm still a beginner for C programming. In my assignment I've encountered this problem and I know is a linker problem but I'm not sure how to solve it. I'm trying to link 3 files which 2 .c files and 1 .h file. Below are the codes for my file:

These 3 files are my codings. I hope someone can help me out. I'm stuck at his problem for long time. Thanks in advance. Appreciate your help.

  • 5 Contributors
  • forum4 Replies
  • 12,866 Views
  • 5 Years Discussion Span
  • commentLatest PostLatest Postby Sean1234$

Recommended Answers

I think you mean Ld returned 1 exit status.

Do you really mean you tried to link the 2 c files and the h file or do you mean you compiled the c files and tried to link the resulting objects?

The processor of building a program is

… Jump to Post

All 4 Replies

I think you mean Ld returned 1 exit status.

Do you really mean you tried to link the 2 c files and the h file or do you mean you compiled the c files and tried to link the resulting objects?

The processor of building a program is

Error Id Returned 1 Exit Status Dev C 2b 2b 3

  • Compile each individual source (.c) file producing an object file (.o or .obj)
  • Link all the object files produced in stage 1 with any require libraries

Error Id Returned 1 Exit Status Dev C 2b 2b 1

NOTE 1: you neither compile or link header (.h) files, they are included into source (.c) files and the code the contain is compiled in that manner.

NOTE 2: It is very poor practice to #include source files (.c) into other source files (.c) as you have done in your driver.c listing. However if you must/do do that then you should not separately compile the source (.c) that you included.

Normally the IDE handles the build process for you so it would help us to know what tools, compiler tool-chain and/or IDE you are using. Hitec usb interface driver.