| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
TDS and OBJ files- what do they do?
|
Original Message
|
Name: k
Date: December 4, 2003 at 14:39:31 Pacific
Subject: TDS and OBJ files- what do they do? OS: win 2000 CPU/Ram: 1.1ghz/512mb
|
Comment: Hi, I'm using the Borland C++ command line compiler to compile my c++ programs. Whenever I compile (a cpp file) a .TDS and .OBJ file appear, in addition to the EXE (which I want!) The .TDS files are bigger than the EXE! I've noticed if I delete both the TDS and OBJ file, the EXE still works fine. Do I really need these files, and what are they there for? (I'm a newb to C++) Thanks!
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: borelli35
Date: December 4, 2003 at 19:55:51 Pacific
|
Reply: (edit) ========================================================== The .tds I'm not sure of but the .obj file is definitely normal (I'm sure the .tds is as well but, as I indicated, I don't know its function). In all C/C++ compilers the compiling of your source to application is a three step process. First, the compiler actually pre-compiles the source. This term is actually a misnomer as it doesn't actually do any compiling during this stage. Rather, the compiler preforms pre/parsing and merging of the text that is your source code. As an example, your include files are assembled as part of the source and parsed during this stage. The second stage is an intermediary process that actually creates the .obj (or .lib if your compiler settings are set to create general library files) file(s) for your project. These object files are simply binary files containing the machine language code that is derived and compiled from your parsed and assembled source code. Object files contain subroutines and functions that are to be called from within your "void main()" function as well as other functions statically. The third stage is the actual linking process that links (big surprise their) the object file with the main function in your source and any other included object or library files that are externally called from within your program and then creates the .exe file with proper implementation of the stack and entry point into your main function. This is where the pieces of the puzzle are all put together. In step two the pieces where simply identified and organized. I hope that this at least helps for you to better understand the process and the reason the .obj files you are finding are their. And yes, once the program is compiled in the third and final stage, the .obj file is no longer necessary. It should be noted, however, that it is usually a waste of time to delete it as it is just re-created when you compile your application again. Thanks for listening to my rambling and I hope it helped you in some way.borelli35
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: Dillbo
Date: January 14, 2004 at 01:04:56 Pacific
|
Reply: (edit)Hey im using the same compiler as the first guy and i am also quite newb. I want to know how i compile scripts using the same compiler as he mentioned. I have tried already and all i can find is the .obj file, it's driving me insane.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home