Compiling but not linking correctly


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!


Relevant Pages

  • portable makefiles with f90 modules
    ... What is the current status of designing portable makefiles (on ... unix-like OSs and beyond) in large programming projects with f90 ... I'm assuming in a large project that source code is spread across ... files (or whatever they happen to be called by that compiler). ...
  • SUMMARY: problem : install openssl
    ... Makefiles that use a syntax construction that confuses the compiler. ... Look for Makefiles where EXHEADER is not assigned a value: ... but it bombs out during make install and display ...
  • Re: compiling VS6 C++ in VS2005 using a makefile
    ... using the VS2005 compiler) to produce two ATL COM servers. ... If you really want to stick with makefiles, ... IDE is able to take advantage of it by parallelizing some builds (at the ... ..dep files, generated by VS 6.0, for this. ...
  • Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)
    ... can have declarations that *won't* compile on some compiler. ... > different makefiles for Aonix and Gnat. ... with some kind of build process and/or CM. Separate makefiles (if you ... environments are *not* always identical. ...
  • Re: C++ Project Files?????
    ... by the compiler. ... executables, because the code of the function is duplicated instead of ... object files are not really standardized. ... > unsigned long int square; ...