Từ 1 tới 3 trên tổng số 3 kết quả

Đề tài: Mã đi tuần lỗi: Linker error unable open file 'tclasss.lib'

  1. #1
    Ngày gia nhập
    03 2008
    Bài viết
    4

    Wink Mã đi tuần lỗi: Linker error unable open file 'tclasss.lib'

    Tep graphics.cpp
    C++ Code:
    1. #include "conio.h"
    2. #include "stdio.h"
    3. #include "stdlib.h"
    4. #include "graphics.h"
    5.  
    6. #define CL_khung RED
    7. #define  MAXX getmaxx()
    8. #define  MAXY getmaxy()
    9. #define  SIZE 50
    10.  
    11.  
    12. extern int hn,hd,x,y;
    13.  
    14. void Fill(int i,int j)//to o ban co
    15.  {
    16.     if((i+j)%2==0) {                setfillstyle(SOLID_FILL,MAGENTA);
    17.                      floodfill(j*SIZE+35,MAXY-i*SIZE-35,WHITE);
    18.                   }
    19.             else {
    20.                      setfillstyle(SOLID_FILL,CYAN);
    21.                      floodfill(j*SIZE+35,MAXY-i*SIZE-35,WHITE);
    22.                   }
    23.  }
    24.  
    25. extern void ban_co(int a=1,int b=0)    //ve ban co
    26.  {
    27.      int i,j;
    28.         setcolor(WHITE);
    29.     for(i=0;i<hd;i++)
    30.         for( j=0;j<hn;j++)
    31.          {
    32.               if(a){
    33.             rectangle(j*SIZE+10,MAXY-i*SIZE-10,(j+1)*SIZE+10,MAXY-(i+1)*SIZE-10);
    34.                 }
    35.               Fill(i,j);//fill pane
    36.               if(b) {
    37.                    setcolor(YELLOW);
    38.                 circle(j*SIZE+10+SIZE/2,MAXY-i*SIZE-10-SIZE/2,14);
    39.                  }
    40.          }
    41.  }
    42.  
    43. void khung()//ve khung
    44.  {
    45.   //khung va nen
    46.   setcolor(CL_khung);
    47.   rectangle(0,0,MAXX,MAXY);
    48.  
    49.   setfillstyle(SOLID_FILL,BLACK+BLUE);
    50.   floodfill(1,1,CL_khung);
    51.   //bong do 3D cho ban co
    52.   setfillstyle(1,BLACK+DARKGRAY);
    53.   bar(hn*SIZE+10,MAXY-5,hn*SIZE+15,MAXY-hd*SIZE-5);//doc
    54.   bar(15,MAXY-5,hn*SIZE+10,MAXY-10);//ngang
    55.  }

    Tep testrun.cpp
    C++ Code:
    1. #include <stdio.h>
    2. #include <stdlib.h>
    3. #include <conio.h>
    4. #include <alloc.h>
    5. #include <string.h>
    6. #include <iostream.h>
    7. #include <graphics.h>
    8. #define MAXX getmaxx()
    9. #define MAXY getmaxy()
    10. #define SIZE 50
    11.  
    12. int a[12][12];
    13. int hn,hd,x,y;
    14. int O_FREE=0;
    15. unsigned socach;
    16.  
    17. struct save{
    18.  int A[8][8];
    19.   save *tiep;
    20. };
    21. save *luu1,*luu2;
    22. int state=0;
    23.  
    24. extern void luu_ban_co(){
    25. socach++;
    26. if(state==0) {
    27.   luu1=(struct save *) malloc(sizeof(save));
    28.   luu2=luu1;
    29.       for(int i=0;i<hd;i++)
    30.        for(int j=0;j<hn;j++)
    31.      luu1->A[i][j]=a[i+2][j+2];
    32.   state=1;
    33.   luu1->tiep=NULL;
    34. }
    35.  luu1=luu2;
    36.   while(luu1->tiep!=NULL) luu1=luu1->tiep;
    37.    luu1->tiep=(struct save*)malloc(sizeof(save));
    38.     luu1=luu1->tiep;
    39.       for(int i=0;i<hd;i++)
    40.        for(int j=0;j<hn;j++)
    41.      luu1->A[i][j]=a[i+2][j+2];
    42.      luu1->tiep=NULL;
    43. }
    44.  
    45. extern void ban_co(int a,int b);
    46.  
    47.  //not graphics
    48. int  HC[8][2]={-2,1,-1,2, 1, 2,2,1,2,-1,1,-2,-1,-2,-2,-1};
    49.  
    50. void khoi_tao(){
    51.  int i,j;
    52.   for(i=0;i<hd+4;i++)
    53.     for(j=0;j<hn+4;j++)
    54.      a[i][j]=-1;
    55.  
    56.   for(i=2;i<hd+2;i++)
    57.     for(j=2;j<hn+2;j++)
    58.      a[i][j]=O_FREE;
    59.   a[y+1][x+1]=1;
    60.  }
    61.  
    62. void WriteResult()//viet ket qua
    63. {
    64.    luu1=luu2;
    65.    char *ch,*ch1;
    66.    int i,j;
    67.    unsigned sc=1;
    68.  
    69.    setcolor(RED);
    70.    outtextxy(20,50,"So cot :");
    71.    outtextxy(130,50,itoa(hn,ch1,10));
    72.    outtextxy(20,60,"So hang:");
    73.    outtextxy(130,60,itoa(hd,ch1,10));
    74.    outtextxy(20,70,"Vi tri dat ma:[   ][   ]");
    75.    setcolor(YELLOW);
    76.    outtextxy(148,70,itoa(x,ch1,10));
    77.    setcolor(CYAN);
    78.    outtextxy(188,70,itoa(y,ch1,10));
    79.  
    80.    setcolor(WHITE);
    81.    outtextxy(20,20,"Ban hay bam phim bat ky de xem ket qua");
    82.    outtextxy(20,30,"Co tat ca:");
    83.      outtextxy(110,30,itoa(socach,ch1,10));
    84.    setcolor(WHITE);
    85.    outtextxy(20,40,"Cach thu:");
    86.  
    87.    while(luu1->tiep!=NULL){
    88.    getch();
    89.    ban_co(0,1);//xoa khi nhay sang buoc khac
    90.         //  j*SIZE+10,MAXY-i*SIZE-10 j*SIZE+10+SIZE/2,MAXY-i*SIZE-10-SIZE/2
    91.     setfillstyle(SOLID_FILL,RED);//tao vi tri con ma dau tien
    92.      floodfill((x-1)*SIZE+10+SIZE/2,MAXY-(hd-y)*SIZE-10-SIZE/2,YELLOW);
    93.  
    94.    setfillstyle(SOLID_FILL,BLUE);
    95.    bar( 108,39,108+strlen(itoa(sc,ch1,10))*8+2,49);
    96.     outtextxy(110,40,itoa(sc,ch1,10));//hien cach chay thu..n..cua con ma
    97.  
    98.   setcolor(BLACK);
    99.   for(i=0;i<hd;i++)
    100.      for(j=0;j<hn;j++)
    101.       outtextxy(j*SIZE+SIZE/2+5,MAXY-(hd-i)*SIZE-15+SIZE/2,itoa(luu1->A[i][j],ch,10));
    102.   luu1=luu1->tiep;
    103.   sc++;
    104.   }
    105.  }
    106.  
    107. void Try(int sb,int u,int v)//thu cac buoc chay cua Ma
    108. {
    109.   int i,uu,vv;
    110.   for(i=0;i<8;i++)
    111.     {
    112.       uu=u+HC[i][0];
    113.       vv=v+HC[i][1];
    114.        if(a[uu][vv]==O_FREE){
    115.       a[uu][vv]=sb;
    116.       if(sb==hn*hd) luu_ban_co();
    117.        else  Try(sb+1,uu,vv);
    118.           a[uu][vv]=O_FREE;
    119.        }
    120.     }
    121. }
    122.  
    123. extern void ma_di_tuan()
    124.  {
    125.      khoi_tao();
    126.      Try(2,y+1,x+1);
    127.      if(state) WriteResult();
    128.      setcolor(WHITE);
    129.      outtextxy(MAXX/2,MAXY/2,"THE END");
    130.      getch();
    131.  }

    tep main.cpp

    C++ Code:
    1. #include <graphics.h>
    2. #include <stdio.h>
    3. #include <iostream.h>
    4. #include <conio.h>
    5.  
    6. void ban_co(int a,int b);
    7. void khung();
    8. void ma_di_tuan();
    9. extern int hn,hd,x,y;
    10.  
    11. extern int dong_y(int a,int b)
    12.  {
    13.    if(a>=1&&a<=b) return 1;
    14.    else  return 0;
    15.  }
    16.  
    17.  //function main
    18. main()
    19. {
    20.  cout<<"NHAP KICH THUOC CUA BAN CO (!;;!)"<<endl;
    21.   do{
    22.      cout<<"Nhap hang ngang cua ban co (!;;! voi 3<=hang<=8)"<<endl;
    23.       cin>>hn;
    24.       if(hn<3) hn=0;
    25.      }while(!dong_y(hn,8));
    26.   do{
    27.      cout<<"Nhap hang doc cua ban co (!;;! voi 3<=cot<=8)"<<endl;
    28.       cin>>hd;
    29.       if(hd<3) hd=0;
    30.      }while(!dong_y(hd,8));
    31.    cout<<"NHAP TOA DO CUA CON MA (!;;!)"<<endl;
    32.      do{
    33.     cout<<"Nhap vao toa do X (!;;! voi 1<=X<="<<hn<<"):"<<endl;
    34.      cin>>x;
    35.      }while(!dong_y(x,hn));
    36.      do{
    37.     cout<<"Nhap vao toa do Y (!;;! voi 1<=Y<="<<hd<<"):"<<endl;
    38.      cin>>y;
    39.      }while(!dong_y(y,hd));
    40.  
    41.   int mh=DETECT,kieu;
    42.   initgraph(&mh,&kieu,"c:\\tc\\bgi");
    43.   khung();//khung
    44.   ban_co(1,0);//ban co
    45.   ma_di_tuan();
    46.   closegraph();
    47.   return 0;
    48. }

    nhưng em bị lỗi này: LINKER ERROR UNABLE OPEN FILE 'TCLASSS.LIB'
    GIÚP EM NHÉ

    Vui lòng để code vào tag code. Đọc Nội quy để biết thêm chi tiết
    Đã được chỉnh sửa lần cuối bởi Kevin Hoang : 16-03-2008 lúc 10:08 PM. Lý do: Nhắc nhở vi phạm

  2. #2
    Ngày gia nhập
    10 2006
    Nơi ở
    In Your Bugs
    Bài viết
    823

    Tclass nó ở đâu rứa. Sao ko thấy trong bài. Kiểm tra lại path coi ...

  3. #3
    Ngày gia nhập
    03 2008
    Bài viết
    4

    tclasss.lib là thư viện của C
    lỗi này đại loại là ko mở được tclasss.lib nen ko chạy được

Các đề tài tương tự

  1. Export File Jar Lỗi error:Unable to access jarfile?
    Gửi bởi huydaibang trong diễn đàn Thắc mắc lập trình Java
    Trả lời: 4
    Bài viết cuối: 30-07-2016, 07:40 AM
  2. Báo lỗi Unable to open include file 'IOSTREAM.H' trong lập trình C++
    Gửi bởi dnv2006 trong diễn đàn Thắc mắc lập trình C/C++/C++0x
    Trả lời: 8
    Bài viết cuối: 24-05-2013, 05:05 PM
  3. Linker error: unable open file C0S.OBJ. Xử lý thế nào?
    Gửi bởi dongta001 trong diễn đàn Thắc mắc lập trình C/C++/C++0x
    Trả lời: 6
    Bài viết cuối: 23-02-2011, 04:03 AM
  4. Error 31 fatal error LNK1104: cannot open file
    Gửi bởi duytuyen26 trong diễn đàn Thắc mắc lập trình Visual C++
    Trả lời: 1
    Bài viết cuối: 14-09-2010, 10:15 PM
  5. lỗi unable to open file *.obj trong borlan C 3.1
    Gửi bởi dinhvanvo trong diễn đàn Nhập môn lập trình C/C++
    Trả lời: 1
    Bài viết cuối: 24-10-2009, 07:49 AM

Quyền hạn của bạn

  • Bạn không thể gửi đề tài mới
  • Bạn không thể gửi bài trả lời
  • Bạn không thể gửi các đính kèm
  • Bạn không thể chỉnh sửa bài viết của bạn