[PROJ] unresolved external symbol EARTH (windows)

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Jul 14 03:33:22 PDT 2021


Hi all

I am using PROJ 8.1.0 in C++ in a library. While linking the unit test in
Windows (no problem in Ubuntu or macOS), I get this error message:

psrs.lib(SrsCatalog.cpp.obj) : error LNK2019: unresolved external symbol
"public: static class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const
osgeo::proj::datum::Ellipsoid::EARTH" (?EARTH at Ellipsoid@datum at proj@osgeo@
@2V?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@B)
referenced in function "public: void __cdecl
pd::srs::SrsCatalog::Impl::populate(void)" (?populate at Impl@SrsCatalog at srs
@pd@@QEAAXXZ)

In the same function I am using proj methods like getCRSInfoList or
createCoordinateReferenceSystem, but not another constant.

Do I have to do anything special to use/link that? Or is it a problem in
PROJ?
This happens in the CI machine. I do not have a Windows local computer to
reproduce it.

I solved it easily not using the variable
osgeo::proj::datum::Ellipsoid::EARTH, but the string "Earth". However, it
could be interesting if there is any problem in proj code.

Thanks,
Javier
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210714/77ef7ced/attachment.html>


More information about the PROJ mailing list