<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Javier,</p>
<p>the symbol is CPL_DLL exported and defined in static.cpp. You
don't mention which type of linking you use: dynamic / static.</p>
<p>You may perhaps need to define PROJ_MSVC_DLL_IMPORT.</p>
<p>See the following in proj.h<br>
</p>
<p>#ifndef PROJ_DLL<br>
#ifdef PROJ_MSVC_DLL_EXPORT<br>
#define PROJ_DLL __declspec(dllexport)<br>
#elif defined(PROJ_MSVC_DLL_IMPORT)<br>
#define PROJ_DLL __declspec(dllimport)<br>
#elif defined(__GNUC__)<br>
#define PROJ_DLL __attribute__ ((visibility("default")))<br>
#else<br>
#define PROJ_DLL<br>
#endif<br>
#endif<br>
</p>
<p>Even</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 14/07/2021 à 12:33, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKtvzDg13i8ALyp4wQUM2r5UDTdKXSmmR2_peiMoBQxRaw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi all<br>
</div>
<div><br>
</div>
<div>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:<br>
</div>
<div><br>
</div>
<div><span style="font-family:monospace">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@Ellipsoid@datum@proj@osgeo@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B)
referenced in function "public: void __cdecl
pd::srs::SrsCatalog::Impl::populate(void)"
(?populate@Impl@SrsCatalog@srs@pd@@QEAAXXZ)</span></div>
<div><br>
</div>
<div>In the same function I am using proj methods like
getCRSInfoList or createCoordinateReferenceSystem, but not
another constant.<br>
</div>
<div><br>
</div>
<div>Do I have to do anything special to use/link that? Or is it
a problem in PROJ?</div>
<div>This happens in the CI machine. I do not have a Windows
local computer to reproduce it.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Javier<br>
</div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">.___ ._ ..._ .. . ._. .___
.. __ . _. . __.. ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>