Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to resolve a few last exgternal link references in my program. Help in locating the correct libraries for Windows would be thanked. I may have incorrect versions of some of my current libraries. The link errors are:

1>------ Build started: Project: shpFOD, Configuration: Release MinDependency Win32 ------
1>Compiling...
1>ShapePublisher.cpp
1>.\ShapePublisher.cpp(789) : warning C4996: 'QgsMapLayerRegistry::addMapLayer': was declared deprecated
1>        C:\OSGeo4W\apps\qgis\include\qgsmaplayerregistry.h(66) : see declaration of 'QgsMapLayerRegistry::addMapLayer'
1>Linking...
1>libshp.lib(wpoly.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>   Creating library ReleaseMinDependency/shpFOD.lib and object ReleaseMinDependency/shpFOD.exp
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapLayer::staticMetaObject" (?staticMetaObject@QgsMapLayer@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsCoordinateTransform::staticMetaObject" (?staticMetaObject@QgsCoordinateTransform@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapRenderer::staticMetaObject" (?staticMetaObject@QgsMapRenderer@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsVectorLayer::staticMetaObject" (?staticMetaObject@QgsVectorLayer@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsApplication::staticMetaObject" (?staticMetaObject@QgsApplication@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static bool QgsApplication::mRunningFromBuildDirVERSION_INT" (?mRunningFromBuildDirVERSION_INT@QgsApplication@@0_NA)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mCfgIntDirVERSION_INT" (?mCfgIntDirVERSION_INT@QgsApplication@@0VQString@@A)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mBuildSourcePathVERSION_INT" (?mBuildSourcePathVERSION_INT@QgsApplication@@0VQString@@A)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mBuildOutputPathVERSION_INT" (?mBuildOutputPathVERSION_INT@QgsApplication@@0VQString@@A)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapLayerRegistry::staticMetaObject" (?staticMetaObject@QgsMapLayerRegistry@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapCanvas::staticMetaObject" (?staticMetaObject@QgsMapCanvas@@2UQMetaObject@@B)
1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QStringList QgsApplication::mGdalSkipListVERSION_INT" (?mGdalSkipListVERSION_INT@QgsApplication@@0VQStringList@@A)
1>.\../bin/Release/shpFOD.dll : fatal error LNK1120: 12 unresolved externals
1>Build log was saved at "file://c:\SGIS\newshpfod\ReleaseMinDependency\BuildLog.htm"
1>shpFOD - 13 error(s), 1 warning(s)
------ Starting pre-build validation for project 'shpSetup' ------ 
------ Pre-build validation for project 'shpSetup' completed ------
2>------ Build started: Project: shpSetup, Configuration: Release ------
Building file 'C:\SGIS\Setup1\Release\shpSetup.msi'...
WARNING: Unable to create registration information for file named 'mpsuomlib.tlb'
WARNING: Unable to create registration information for file named 'fodmlib.tlb'
ERROR: Could not find file 'c:\SGIS\bin\Release\shpFOD.dll' 'The system cannot find the file specified.'
========== Build: 0 succeeded, 2 failed, 1 up-to-date, 0 skipped ==========
share|improve this question
add comment

1 Answer

Yes, looks like you either have the wrong version of the QGIS libraries or they just aren't there. Going by the linking errors, this looks like an issue with name mangling, which can vary from compiler version to compiler version. It might be that all those libraries were built with a different compiler version, ensure that version of QGIS was built with VS2008 and not MinGW or another version of MSVC.

share|improve this answer
    
Thanks Jason. I think I accidentally reposted the question today a little different way and through close examination I would agree that it could and probably is name mangling. How can I tell what version of MSVC was used to buid the OSGeo4W complete download install –  Tygh Porak Dec 9 '12 at 23:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.