C problem involving creating creating your own .LIB file 
Author Message
 C problem involving creating creating your own .LIB file

   hello ppl.

*Please* don't multiply post your question.  It won't help your cause
at all.
--
"I ran it on my DeathStation 9000 and demons flew out of my nose." --Kaz

Please: do not email me copies of your posts to comp.lang.c
        do not ask me C questions via email; post them instead



Sun, 04 Mar 2001 03:00:00 GMT  
 C problem involving creating creating your own .LIB file

Quote:

> hello ppl.
> I just recently created a .LIB file. using TLIB when copiling the code(main
> program) it refuses to liknk. TLINK reported error
> what should i do.
> here is the source code.

The short answer is that since you never define nc(), the linker can't
find it. Write nc() if you expect to link it.

There are other issues here, however.  The use of <conio.h>, <dos.h>,
_Cdecl, cdecl, gotoxy, and textcolor all mark this as non-standard C.
Questions about the "Borland-C language" are better asked in the Borland
newsgroups  where the Borland experts hang out.

The use of an implicit return type on tb() is a bad idea.

The K&R code in pwr2.c should be avoided:

Quote:
> tc(clr)
> int clr;
> { textcolor(clr); }

make this
    void tc(int clr)
    {
        textcolor(clr);
    }
or even just
    #define TC(clr) textcolor((clr))
But these efforts to avoid typing a few characters seem silly.

In test.c

Quote:
> #include <pwr2.h>
> main()

  again, make the return type explicit.  Implicit returns types are a
bad
  idea:
  int main(void)
Quote:
> {
> nc();
> tc(0);

  It is nice to
  return 0;
Quote:
> }



Sun, 04 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. problem creating LIB file

2. creating my own section handler for .config files

3. Newbie: separate big .cs file into small .cs files

4. Using Lib to create a .lib for linking

5. how to create .lib (library) files ?

6. lib files and how to create them

7. .lib files and how to create them

8. Create a lib file for a dll

9. Creating a lib file in a dll project?

10. How to create a lib file

11. Create .h-file from .dll, .lib or .obj

12. how can I create a .LIB file?

 

 
Powered by phpBB® Forum Software