Re: LNK2019 error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



hazizpour@xxxxxxxxx wrote:
> I am trying to build a sample for using a certain library ( IFC mapping
> to C++ classes, see www.cstb.fr) with MS Visual Studio 2003.

> main.obj : error LNK2019: unresolved external symbol
[...]

I assume you know how to use and link a library in general, so I won't go
into this.

> What I have found so far on the net wasn't very helpful. I have read
> somewhere, that the reason of the error could have something to do with
> different versions of VC (since the libraries were programmed in 2000,
> they were probably built with VC5 or 6, I dont know if that is a
> problem)

AFAIK, VC's major versions are not binary compatible with each othe (which
is exactly what a major version change usually signals). IOW, you need
different libs for different C++ compilers (which is not only true for VC,
btw). If you only have one, use the compiler it was compiled for.

Uli

.



Relevant Pages

  • Re: Dynamically loading a static C library (compiler suggestion?)
    ... I am programming a microcontroller, ... Manufacturer suggests using one of the following compilers: ... the tools I use produce OMF so I ... for dynamically loading libraries. ...
    (comp.os.msdos.programmer)
  • RE: Are bad developer libraries the problem with M$ software?
    ... >>I have never been able to fathom why compilers can't barf out better ... Secure Windows Initiative ... Are bad developer libraries the problem with M$ software? ...
    (SecProg)
  • Re: A concern about mixing C and C++
    ... the future users to use the library? ... expertise in the quirks of individual compilers and their run-time ... different run-time libraries. ... C++ compiled code from ...
    (comp.lang.c.moderated)
  • Re: Fortran libraries & modules...
    ... switch compilers in my own work, I just manually modify my Makefiles ... module-based Fortran library being distributed in a packaging system ... against C libraries such as libncurses or zlib because they are ...
    (comp.lang.fortran)
  • Re: good c compiler
    ... ABI for the platforms he is targeting. ... Same problem in reverse if the library is compiled with MSVC and the header refers to long double, although way round you can fix it by changing the header. ... Note that I'm NOT saying Jabob's decision is bad or unreasonable, just something the users of his compiler need to be aware of IF their code will be linked with code compiled with other compilers. ... I was not talking about libraries written BY MS, I was talking about libraries build USING MSVC. ...
    (comp.lang.c)