Linker Error

This is a discussion on Linker Error within the C Programming forums, part of the General Programming Boards category; I get an error when I try to Run the following code. Linker Error : Undefined symbol N_SCOPY@ in module ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    1

    Linker Error

    I get an error when I try to Run the following code.

    Linker Error : Undefined symbol N_SCOPY@ in module TC\BIN\XLIN.C

    Can someone tell my why its happening and the corrective measure ?


    The code :
    Code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <conio.h>
    #include <graphics.h>
    
    int main(void)
    {
       int gdriver = DETECT, gmode, errorcode;
       int xmax, ymax;
       int sg,st;
       clrscr();
       initgraph(&gdriver,&gmode,"");
       errorcode = graphresult();
       if (errorcode != grOk)
       {
          printf("Graphics error: %s\n", grapherrormsg(errorcode));
          printf("Press any key to halt:");
          getch();
          exit(1);
       }
        setbkcolor(BLACK);
        initsig();
    getch();
    }
    
    
    
    initsig()
    {
    int psg,x,quo,q;
    int sg1[]={1,2,3,4,1,2,3,4,1,3,2};
    for(psg=1;psg<600;psg++)
    	   {
    	    if(psg%50==0)
    	      {
    	      rectangle(psg,155,psg+5,160);
    	      rectangle(psg,160,psg+5,165);
    	      rectangle(psg,155,psg+5,160);
    	      rectangle(psg,165,psg+5,170);
    	      rectangle(psg,170,psg+5,175);
    	      x=(psg/50)-1;
    
    
    	      if(sg1[x]==2)
    		{
    		  setfillstyle(1,YELLOW);
    		  bar(psg,165,psg+5,170);
    		  rectangle(psg,165,psg+5,170);
    		}
    //	      else
    	      if(sg1[x]==4)
    		{
    		  setfillstyle(1,GREEN);
    		  bar(psg,160,psg+5,165);
    		  rectangle(psg,160,psg+5,165);
    		}
    //	      else
    	      if(sg1[x]==3)
    		{
    		  setfillstyle(1,YELLOW);
    		  bar(psg,155,psg+5,160);
    		  rectangle(psg,155,psg+5,160);
    		  setfillstyle(1,YELLOW);
    		  bar(psg,165,psg+5,170);
    		  rectangle(psg,165,psg+5,170);
    		}
    //	       else
    		if(sg1[x]==1)
    		  {
    		   setfillstyle(1,RED);
    		   bar(psg,170,psg+5,175);
    		   rectangle(psg,170,psg+5,175);
    		  }
    
    	      }
     }
    }
    Last edited by Salem; 01-22-2005 at 03:59 AM. Reason: tagging the code

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    1) Welcome to the boards
    2) Use Code Tags
    3) You need to make sure you're linking the necessary libraries and compiling the necessary source files.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It could be your computer telling you that Turbo C is an old piece of crap and that you need to upgrade.

    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    Registered User xxxrugby's Avatar
    Join Date
    Jan 2005
    Posts
    178
    It could be a problem like at me.
    Dont have graphics library.
    This error is at me - in Visual Studio 6.0 and Dev C++, maybe is the same problem at you.
    Code:
    fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory
    Last edited by xxxrugby; 01-22-2005 at 05:07 PM.
    Sorry for spelling errors, not English!
    xxxrugby: "All Human Race Will Die From My Hand!"
    xxxrugby: "We are all philosophers, when question is about politics!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 03:49 AM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 04:27 AM

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