linker error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • john miller
    New Member
    • Jan 2012
    • 1

    linker error

    #include<stdio. h>
    main()
    {
    int i;
    for(i=1; i<=100; i++)
    printf("%d\n", i);
    }

    for this program in turboc I get the error

    linker error: undefined symbol '_printf' in module numprin.c
    linker warning: no stack

    can any one explain solving my problem
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    I'm not a Turbo C person but i looks like you are missing stdio.lib in your link.

    Comment

    • lspxy
      New Member
      • Nov 2011
      • 12

      #3
      give your code a test in turbo2.0, but no error.
      maybe you should have a setting in Options: directories, then save options.

      Comment

      • ksm2011
        New Member
        • Nov 2011
        • 2

        #4
        If you have not checked this Free C++ Compiler + IDE , Pls check this one . http://www.codeblocks.org/downloads/binaries . This is gcc compiler ported to windows and also have nice IDE . This is very user friendly and free too . Regarding this error , though you have included stdio.h ( thats where printf is defined ) Looks like some files are missing from your compiler installation .

        Comment

        • Mariostg
          Contributor
          • Sep 2010
          • 332

          #5
          I am new to C, and I heard nothing but grievances about Turbo C. I am on linux with gcc, and glancing at your code, that should compile ok.

          Comment

          Working...