You are here:

C++/compiler linking error

Advertisement


Question
sorry for troubling u again ,but i am just a new user so please help.
What do you mean by the dependancy list?(do u mean the header files??)
please be specific.
-------------------------
Followup To
Question -
hi,
the stuff that u said went way up inthe sky.(i did not get u)
let me tell u this that the programs that i run now used to run before.
but are giving errors.
i think it is some of the internal settings of the compiler that has some how changed.so waht sort of settings may cause this to happen . i have tried the directories settings......dosen't work.
help me
SOS SOS SOS
waiting for your reply
thanking u
-------------------------
Followup To
Question -
hi,
i use a turbo editor to write c/c++ programs.
i did not use the compiler for a while.
But now when ever i try to run any file i get an error saying
Linking error:COS.OBJ not found
where as i never used math.h or cos function in the program.
I have checked the directory settings(They are correct).
please help me.
thanking you
Eagerly waiting for your reply
Answer -
Hi,

Do you know, why it is cribbing for that obj?
Check your makefile and see if you could get any dependencies or indirect dependencies on cos.c/cpp/C ?

Regards,
RaiD
Answer -
Hi,
 Please check in the dependency list if you could find any cos.cc or cos.c or cos.cpp file there.


Thanks,
RaiD

Answer
Hi,
 When you compile, the following things happen:
[1] All includes (.h) files in .c/cpp/cc are processed
[2] All c/cpp files are converted into .asm on windows and .s on unix machines
[3] these s/asm files are converted into o/obj files
[4] these objects files are now linked to resolve any variable or function resolution (in case you are using something which is defined in some other c/cpp file)

Now you are getting problems in [4] which means that obj is not there where it should be. If you could find the obj or corresponnding c/cpp file (which should be converted to obj) then you could solve the issue.

Thanks,
RaiD

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Dharmender Rai

Expertise

I can answer general and system level C/C++ questions.

Experience

I have 5 years of experience in C++.

©2016 About.com. All rights reserved.