visual studio 2012 - C++ static library using functions defined in another cpp project -


i working on vs 2012 project , using compiled static library (that compiled in vs 2013). library references "vacopy" method vs 2013 compatible not found in vs 2012.

when compile cpp project, linking error : error lnk2019: unresolved symbol __imp___vacopy

my first reflex add declaration , definition of va_copy in project, included following:

in header file :

void va_copy(va_list dest, va_list src); 

in cpp file :

void va_copy(va_list dest,va_list src) {    dest = src; } 

but didn't resolve problem, still same linking error.

thanks in advance answers.

you basic problem library compiled link standard libraries in dll (thus __imp__); application set differently (to grab standard calls statically linked in library).

you either have match compiler settings (in case project properties -> c/c++ -> code generation section) can specify use dll or static options.

it's worth checking if there way specify include files version of link need - libraries (curl example) allow define compiler predefines control functions linked to.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -