Thread: Errors when building program

  1. #1
    Registered User
    Join Date
    Jan 2003

    Angry Errors when building program

    Hi all,

    Had a program that worked and compiled correctly and have since added the following function.

    int point()
    FILE *pp;
    int findpoint=0, linepoint=1;
    char pointstemp[256];
    char pointsfilename[25];
    char pointsword[25];

    printf("Please enter file name: ");
    scanf("%s", pointsfilename);

    printf("Please enter word: ");
    scanf("%s", pointsword);

    if ((pp = fopen(pointsfilename, "r")) == NULL)

    while( fgets(pointstemp, 256, pp) != NULL)
    if ((strstr(pointstemp, pointsword)) !=NULL)
    printf("Points are %d", linepoint);
    printf("%s", pointstemp);


    if (findpoint == 0)
    printf("\nNo match found.\n");


    return 0;

    The program complies with no errors or warnings (using Microsoft Visual Studio) but when i try to build the program the following errors occur!

    8.obj : error LNK2001: unresolved external symbol _points
    Debug/8.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    8.exe - 2 error(s), 0 warning(s)

    Does anybody have any ideas why this is?

    Many thanks in advance.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    >Does anybody have any ideas why this is?
    Without a more useful example of your problem, I would guess that you named the function point, but actually called points.

    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Jan 2003

    All sorted now

    Thanks very much for the help.

    A very simple problem that has now been sorted. Couldn't see the wood for the trees!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. mega compile errors for small program
    By s_UNI_ in forum C++ Programming
    Replies: 4
    Last Post: 04-28-2005, 12:00 PM
  3. Errors with program
    By nizbit in forum C Programming
    Replies: 37
    Last Post: 12-19-2004, 09:56 PM
  4. Average Rainfall Program Errors
    By JamesAnthony23 in forum C Programming
    Replies: 1
    Last Post: 09-11-2002, 10:44 PM
  5. I'm a newbie and I can't understand the errors in my program
    By iluvmyafboys in forum C++ Programming
    Replies: 19
    Last Post: 02-20-2002, 10:40 AM