i m a new user of c language.whenever i try to run my program a message error is displayed as"not able to open the file named C0S.OBJ.what is the meaning of that?and what should i do?please anybody help me.

Dani AI

Generated

The error about C0S.OBJ is a linker-level problem: the linker cannot find the Borland/Turbo C runtime startup object it needs to produce an executable. This is not a source-code syntax error — it’s a missing or unreachable library/OBJ file that the old Turbo/Borland toolchain expects during linking.

Common, practical steps that resolve this quickly include verifying the compiler installation and its library path. Locate the compiler’s LIB folder and look for C0S.OBJ (or similar startup OBJs). If the file is absent, a reinstall or repair of the Turbo/Borland package usually restores it. If the file exists but is still “not found,” ensure the IDE or command-line tool is configured to search that LIB directory (linker/library path settings) and that the build is run from the correct working folder.

Because Turbo C is a 16-bit-era compiler, modern 64-bit Windows will often not run it natively. Running Turbo C inside DOSBox or switching to a modern toolchain is usually faster and more reliable. For example, using a current GCC toolchain (MinGW-w64/MSYS2 on Windows) compiles like this:

gcc program.c -o program.exe

Additional troubleshooting items to consider: antivirus software that can quarantine OBJ files, file permission problems, a corrupted installation image, long or non-ASCII installation paths, or accidentally using a different compiler/linker than intended. As observed, exact compiler version and OS matter for a precise diagnosis; ’s point about the library file is on target; and ’s suggestion to move to a compiler compatible with the host OS is generally the most practical long-term solution. If a legacy Turbo environment must be used, running it under DOSBox and reinstalling the package from a known-good image is the least fragile approach.

Recommended Answers

All 3 Replies

>what is the meaning of that?
Your computer is mad at you for asking it to run a object file that for some reason doesn't exist.

>and what should i do?
Get your hands off the keyboard and step away from the computer.

>please anybody help me.
If you want someone to help you, more information is necessary.
What compiler you are using, what's the code you are trying to run, what is the original copy of the error message, and any pertinent information that it would make us understand what the heck you are doing.
Anything else is a guessing. Unless, someone, have created the same program and had the same error.

First See that if C0S.obj exist in the folder "...\TC\LIB\"
If this file does not exist then try to reinstall Turbo C.

Or install a compiler which is actually compatible with your real OS (and not just compatible with the 20th century emulation of a dead OS).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.