×

# Compilation Error : C++ code taken as C

 0 Hi all, I am participating the the September Challenge 2012. When I am submitting my program in c++, I am getting the following compilation error :- /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function _start': /home/aurel32/tmp/glibc/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference tomain' collect2: ld returned 1 exit status When I go to My Submissions, it shows me that I submitted the code in C, but while submitting I always select "C++(gcc 4.3.2)". Moreover, I have tried with the extension .cpp as well as .cc, but it didn't help. The code is compiling perfectly fine in my machine(having gcc 4.4.6). It would be great if anyone of you guide me in what's the correct way of submitting the code in c++. I have already gone through the complete FAQ twice, but didn't find any reference to such a problem. Regards, Jayant asked 10 Sep '12, 18:48 1●2●2●3 accept rate: 0%

 0 Do you have a main() function in your program?? answered 10 Sep '12, 19:52 31●3 accept rate: 0%
 0 @jayantjpr use your official proxy instead of gproxy or ccproxy :D answered 02 Aug '13, 17:23 1 accept rate: 0%
 0 I was using a memset(), when I removed it the error disappeared .. answered 03 Nov '13, 10:56 1 accept rate: 0%
 0 main() function missing answered 21 Aug '14, 18:47 2★avi_nash 38●1 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,917
×1,424
×525
×19

question asked: 10 Sep '12, 18:48

question was seen: 4,476 times

last updated: 09 Jul '18, 16:03