Compiling but not linking correctly
- From: csharpdevp@xxxxxxxx
- Date: 7 Mar 2006 07:08:23 -0800
I am trying to build a C++ project in Visual Studio 2005. The source
files for this project were earlier being compiled and linked using
makefiles and running their script from the cygwin shell (with the VC80
compiler). The project uses a considerale number of both C and C++
files and the makefiles had also specified a bunch of preprocessor
directives. However, after setting all these from the project
directory, and what seemed like the right setup, I build my project.
I noticed that it was compiling correctly as it was generating all the
..obj files, but at link time, things startd going wrong. I'm getting a
lot of LNK2001 and LNK2019 errors. Trouble is that th external symbols
which the assembler thinks are unresolved don't show up as names used
for them in the code. They're some random names fetche from the object
file. I was able to resolve a of these errors by referencing to other
projects in the solution though I still have a handfulf of these
unresolved symbol errors.
Could someone suggest how I could troubleshoot this problem. I have the
makefile which tells me which files need to be compiled. It seems I
have all the object files I need for linking but somehow the compiler
is not getting the correct instruction to fetch these object files.
I also know which object files are complaining about unresolved
external symbols but do not know where these symbols are coming from.
So far I have not had any further success with this issue. I tried
examining the source code, but it's written in ANSI C and is a bit
convoluted. I did not find any hints to how I could fix this problem. I
would appreciate if anyone of you could suggest some sort of guideline
to solve this mess.
Thank a lot!