HOW TO CREATE .LIB file FROM .obj or .c file

how to create a user-defined library file, with functions written by t

Page 1 of 1

4 Replies - 8568 Views - Last Post: 09 February 2009 - 08:33 AM Rate Topic: -----

#1 lakshmun  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 28-April 08

HOW TO CREATE .LIB file FROM .obj or .c file

Post icon  Posted 05 February 2009 - 10:12 AM

HI..

After A long search for what I need, I finally came to consult here.

I use turbo c in DOS environment. I need to generate a library file in order to link with the main program.

precisely.
I have a .c file. with the main in it.
I have created a ex.c file and ex.h file.
Ex.c is compiled to get ex.obj


I found a command on net TLIB EX+EX.OBJ to generate lib file. which is not working for me.

is there some other method?

my purpose of generating the Lib file is to disable the user to manipulate and to deny access to the function file and only to modify and compile the main file. I would appreciate other ideas too..

Thankyou
Lakshman

Is This A Good Question/Topic? 1

Replies To: HOW TO CREATE .LIB file FROM .obj or .c file

#2 lakshmun  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 28-April 08

Re: HOW TO CREATE .LIB file FROM .obj or .c file

Post icon  Posted 05 February 2009 - 10:17 AM

HI..

After A long search for what I need, I finally came to consult here.

I use turbo c in DOS environment. I need to generate a library file in order to link with the main program.

precisely.
I have a .c file. with the main in it.
I have created a ex.c file and ex.h file.
Ex.c is compiled to get ex.obj

I found a command on net TLIB EX+EX.OBJ to generate lib file. which is not working for me.


is there some other method?

my purpose of generating the Lib file is to disable the user to manipulate and to deny access to the function file and only to modify and compile the main file. I would appreciate other ideas too..

Thankyou
Lakshman
Was This Post Helpful? 0
  • +
  • -

#3 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1105
  • View blog
  • Posts: 6,918
  • Joined: 07-September 06

Re: HOW TO CREATE .LIB file FROM .obj or .c file

Posted 05 February 2009 - 04:35 PM

Please don't post duplicate topics.

Merged.
Was This Post Helpful? 0
  • +
  • -

#4 lakshmun  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 28-April 08

Re: HOW TO CREATE .LIB file FROM .obj or .c file

Posted 06 February 2009 - 01:50 AM

View PostBetaWar, on 5 Feb, 2009 - 03:35 PM, said:

Please don't post duplicate topics.

Merged.

the duplicatiošn was not intentional. it was due to the slow response time of the post new topic command, and i had to stop and posted with corections. finally I found it twice and did not know to delete it.

anyways, do u hae an idea of the answer
Was This Post Helpful? 0
  • +
  • -

#5 lakshmun  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 28-April 08

Re: HOW TO CREATE .LIB file FROM .obj or .c file

Posted 09 February 2009 - 08:33 AM

hi there....

after a lot of effort I figured out how it could be done.

though the solution was easy, the way to the solution was pretty tiresome.

my basic necessity was to block the use of the files with functions and to only modify and compile the main file.

the function.c file is made and a function.h file is written with headers of the function inside that. both the files are compiled for no errors. the .C file is compiled to get an object file function.OBJ.

link the files in a project and then create the .EXE which could be run.

but... I could not create a library, though my problem is solved.

thanks for any attempts made to help me with this.

gudluck
lakshman
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1