What is linker error in function programs?

This is a discussion on What is linker error in function programs? within the C Programming forums, part of the General Programming Boards category; I am getting this error- Linker error:Undefined symbol(Calsum)in module(the address where the program has been saved) Code: main() { int ...

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    45

    What is linker error in function programs?

    I am getting this error-
    Linker error:Undefined symbol(Calsum)in module(the address where the program has been saved)
    Code:
    main()
    {
    int a,b,c,sum;
    printf("Enter any three numbers");
    scanf("%d %d %d",&a &b &c);
    sum=calcum(a,b,c);
    printf("Sum=%d",sum);
    }
    calsum(int x,int y,int z)
    {
    int d;
    d=x+y+z;
    return(d);
    }

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    Spelling

    sum=calcum(a,b,c);

    calsum(int x,int y,int z)
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Sep 2012
    Posts
    45
    lol thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Linker error]Undefined reference for function
    By lisa92 in forum C Programming
    Replies: 6
    Last Post: 03-08-2012, 12:17 PM
  2. Static function pointer linker error
    By guitarist809 in forum C++ Programming
    Replies: 2
    Last Post: 10-24-2011, 03:24 AM
  3. Replies: 1
    Last Post: 06-27-2008, 06:41 PM
  4. Linker Error
    By Renegade in forum C++ Programming
    Replies: 5
    Last Post: 07-28-2005, 11:23 AM
  5. linker error
    By zell in forum C Programming
    Replies: 16
    Last Post: 01-24-2005, 01:23 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21