Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building an app using qgis in Windows 7 with VS 2008. It was diagnosed that I must have the wrong versions of the libraries because of a potential name mangling problem. I have 12 unresolved externals and I can find them in gis_core by micreosoft name. Does anyone have a different library for me to link to?

share|improve this question
Can you please add what library you are currently using to the question – Kelso Dec 12 '12 at 3:50
I am using the lib called c:\OSgeo4W\apps\qgis\lib\qgis_core.lib. It is dated with a create date of 11/13/2012. I downloaded it from the OSGeo4W site and the link on the main page, I am not sure how to get the original version number of it. It is not included in the file properties. – Tygh Porak Dec 12 '12 at 4:19

Does your project have the option Treat wchar_t as a built-in type turned on?

Assuming QGIS is built against a default version of Qt on Windows, Qt has Treat wchar_t as a built-in type turned off. So the library you're linking with probably has no idea what wchar_t is

Another thing to note is that Qt is more than just a C++ library/framework. It uses its own pre-compiler (moc) to set up reflection and signals/slots in your classes. If you created your project in raw Visual Studio, it won't know to run moc against your code first before compiling it. Whereas QtCreator or a project created by Qt's Visual Studio addin does.

share|improve this answer
Yes, you are right the Treat wchar_t as a built-in type was turned on. I turned it off and still the same results. The same unresolved symbols. – Tygh Porak Dec 12 '12 at 6:16
I did a little more digging and found that I have 2 types of unresolved symbols. At least one is coming from QT. I also found a link that talks of the same problem. "Unresolved external symbol "staticMetaObject". Since I am not building the qtcore4 library myself, I would not know where to change. This is the only QT library I am linking to. I tried versions 4.8.4 & 4.6.4. – Tygh Porak Dec 12 '12 at 6:24
The other commonality of symbol types are ones that include VERSION_INT as part of the name. example: QgsApplication::mGdalSkipListVERSION_INT – Tygh Porak Dec 12 '12 at 6:29
Thanks for the help so far. – Tygh Porak Dec 12 '12 at 6:30
Updated answer to cover Qt's moc – jumpinjackie Dec 12 '12 at 9:43

Your Answer


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.