Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create .lib from .cpp file like we have command for .c file "tcc -c cfile.c -cfile.obj " then we can create .lib file but in .cpp file I can't get .obj file is there any way to create .obj file of .cpp file on ms-dos using
Borland Turbo C++ 


What I have tried:

I want to create .lib from .cpp file like we have command for .c file "tcc -c cfile.c -cfile.obj " then we can create .lib file but in .cpp file I can't get .obj file is there any way to create .obj file of .cpp file on ms-dos using <pre>Borland Turbo C++ 
Posted
Updated 6-Jan-19 23:49pm

A quick search returned this page
How to create a library file in Turbo C | How to add a library file to the Turbo C library[^].
I guess turbo C++ works very similarly.
 
Share this answer
 
Assuming your file is file.cpp, then use
tcc -c -ofile.obj file.cpp

to create file.obj file

To create a lib file, use
tlib mylib.lib /C +file.obj
 
Share this answer
 
v2
Comments
Richard MacCutchan 7-Jan-19 6:34am    
But that is not what the question is asking.
monglung 7-Jan-19 16:51pm    
I thought he only has trouble creating an obj file...
Richard MacCutchan 8-Jan-19 4:39am    
Reading the question again, it is not clear what the problem is.
monglung 8-Jan-19 4:45am    
The question: is there any way to create .obj file of .cpp file on ms-dos using Borland Turbo C++
Richard MacCutchan 8-Jan-19 5:08am    
As I said, the question is not clear, look at the title.
Check the Borland documentation. You most likely need another command (LIB or LINK) to create a library from a cpp object file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900