This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fopen error in uvision3

Hi all

when I run the below program i am getting the error
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL

could any suggest me how to remove the error?

looking for your help
t.senthil

#include <ARTX.h>
#include <stdio.h>
void tst_fopen();

void main()
{
tst_fopen();
}

void tst_fopen (void) {
   FILE *fin;

   fin = fopen ("Test.txt","r");
   if (fin == NULL) {
      printf ("File not found!\n");
   }
   else {
      // process file content
      fclose (fin);
   }
}

  • when I run the below program i am getting the error

    No, you don't. You get it when you build the program. And you get it because you're blindly assuming that some function exists, which doesn't. The error message also tells you which function that is.

  • Hi this is the complete error that I am getting when i buid the program.

    looking for help!
    t.senthil

    Build target 'LPC2100'
    linking...
    *** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS
    *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL: fopen?T

    ADDRESS: 0000016EH
    *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL: fprintf?T
    ADDRESS: 00000182H
    *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL: fprintf?T
    ADDRESS: 00000198H
    *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL: fclose?T
    ADDRESS: 000001A4H
    Program Size: data=1168 const=34 code=444
    Target not created

  • "looking for help!"

    Hans-Bernhard Broeker has already said it:

    "you get it because you're blindly assuming that some function exists, which doesn't"

    For details, see:

    http://www.keil.com/support/man/docs/ca/ca_xa_librarydif.htm

  • fopen (is part of the Flash File System and) exists in the ARTX Library. Do you have this product?

    Reinhard

  • "... exists in the ARTX Library. Do you have this product?"

    Even if you do have the product, the Linker is telling you that you haven't included it in your project.

    If you have the product, you will also have the documentation that tells you how to use it!

  • "Do you have this product?""

    yes I am having the ARTX.h ARTX_Config.c and ARTX_Config.h files... .I have an updated version of uvision3 too....


    Tool Version Numbers:
    Toolchain Path: C:\Keilarmnew\ARM\BIN\
    C Compiler: CA.Exe V2.42
    Assembler: AA.Exe V2.40b
    Linker/Locator: LA.Exe V2.42
    Librarian: LIBA.Exe V4.26
    Hex Converter: OHA.Exe V2.10
    CPU DLL: SARM.DLL V1.29
    Dialog DLL: DARMP.DLL V1.10c
    Target DLL: BIN\UL2ARM.DLL V1.14a
    Dialog DLL: TARMP.DLL V1.10


    "Even if you do have the product, the Linker is telling you that you haven't included it in your project"

    Even after including ARTX_config.c file in my project I am getting the same error!

    Do I need to change anything in ARTX_config file?

    t.senthil

  • "Do I need to change anything in ARTX_config file?"

    What does the Manual say?

  • "yes I am having the ARTX.h ARTX_Config.c and ARTX_Config.h files"

    The error messages tell you that the functions you are missing are: fopen, fprintf, and fclose.

    Do you have definitions for those functions anywhere in your source code?
    Probably not.

    Probably, they are in a Library that forms part of the ARTX Product. if so, you need to include this Library in your project (or select suitable project options that will cause it to be included).
    Once again, the Manual will tell you how to do this.

    http://www.keil.com/ararm/