-
Senior Member
registered user
Compiling simple C code
I'm tryng some C exercises in my 3.8.2 knpx, and the follow is an example:
/* Program to calculate the product of two numbers. */
#include <stdio.h>
int a,b,c;
int product(int x, int y);
main()
{
/* Input the first number */
printf("Enter a number betwen 1 and 100: ");
scanf("%d", &a);
/* Input the second number */
printf("Enter another number betwen 1 and 100: ");
scanf("%d", &b);
/* Calculate and display the product */
c = product(a, b);
printf ("%d times %d = %d\n", a, b, c);
return 0;
}
/* Function returns the product of its two arguments */
int product(int x, int y)
{
return (x * y);
}
When I try to compile it with "gcc namefile.c" I have the follow error message:
/tmp/cc0KOUWj.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Any suggest? Thanks!
Similar Threads
-
By Redbeard in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 12-01-2007, 05:35 PM
-
By crazy_monkey108 in forum General Support
Replies: 14
Last Post: 07-04-2006, 07:52 AM
-
By nick47 in forum General Support
Replies: 5
Last Post: 09-26-2005, 02:28 AM
-
By RandomGoon in forum Networking
Replies: 2
Last Post: 12-18-2004, 05:59 AM
-
By estranged in forum General Support
Replies: 3
Last Post: 08-21-2003, 07:13 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Netac DDR4 32GB 16GB DDR4 3200MHz UDIMM C16 Desktop Internal Memory RAM Kit
$99.99

32GB KIT (2x16GB) DDR4 2666MHz PC4-21300 - 288 pin DESKTOP Non ECC - Black/Gold
$121.00

Major Brand 16GB (2x8GB) PC3-12800U DDR3-1600MHz DDR3-12800 DESKTOP RAM NON-ECC
$29.99

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$21.68

128GB (4x32GB) SK hynix DDR4 PC4-2666V RDIMM ECC Server Ram HMA84GR7CJR4N-VK
$799.00

Samsung 16GB LPCAMM2 PC5 7500 DDR5 LPDDR5X CAMM2 M561K1LC4DM0-CCTGM RAM Memory
$189.00

Crucial DDR3L 16GB 2 x 8GB 1600 MHz PC3L-12800 Laptop RAM Sodimm Memory 1.35V
$41.00

RAMAXEL Lenovo 32GB LPDDR5X CAMM2 7500MHz Laptop RAM | UNTESTED
$445.00

Dell 16GB PC4-21300 (DDR4-2666) Memory (SNPPWR5TC16G)
$89.99

Micron 32GB 1x32GB DDR5 5600 CL46 ECC Unbuffered SO-DIMM MTC20C2085S1TC56BD1
$399.00