Thread: What is linker error in function programs?

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

  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, 01: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, 02:23 AM