# Sclib unable to link in HC 2023

**URL:** <https://forum.techsoft3d.com/t/sclib-unable-to-link-in-hc-2023/3015>\
**Category:** HOOPS Visualize Web\
**Tags:** knowledge-base\
**Created:** [December 7, 2023, 9:09pm UTC](https://forum.techsoft3d.com/t/sclib-unable-to-link-in-hc-2023/3015 "2023-12-07T21:09:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/mike/32/228_2.png) [@mike](https://forum.techsoft3d.com/u/mike)\
**Post date:** [December 7, 2023, 9:09pm UTC](https://forum.techsoft3d.com/t/sclib-unable-to-link-in-hc-2023/3015/1 "2023-12-07T21:09:42Z")

</div>

Microsoft made a change that may require additional link options (cf. [Microsoft Developer Community post \_\_imp\_\_\_std\_init\_once\_complete unresolved external symbol after linking msvcprtd.lib](https://developercommunity.visualstudio.com/t/ __imp___ std_init_once_complete-unresolve/1684365)).

For example, building a sample (e.g. authoring\_samples.sln) with the authoring library (i.e. sc.lib) in release mode produces

> unresolved external symbol \_\_imp\_\_\_std\_init\_once\_begin\_initialize  
> unresolved external symbol \_\_imp\_\_\_std\_init\_once\_complete

In debug, the link errors are as follows;

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/5/528fbdf5fad179f1a18d6a84e4db645640f0f971.png)

This problem may be sensitive to the versions of Visual Studio, the toolset and SDK version.

The following version of Visual Studio:

> Microsoft Visual Studio Professional 2019  
> Version 16.11.15

with the following properties:

> SDK version: 10.0 (latest installed version)  
> Platform toolset: Visual Studio 2019 (v142)

does not have this problem. It builds and links successfully.

If you experience these errors, you should the the version details mentioned.

Alternatively, adding these two lines to the link line fixes the problem:

> /ALTERNATENAME:\_\_imp\_\_\_std\_init\_once\_begin\_initialize=\_\_imp\_InitOnceBeginInitialize /ALTERNATENAME:\_\_imp\_\_\_std\_init\_once\_complete=\_\_imp\_InitOnceComplete

See also the Microsoft article [C++ binary compatibility 2015-2022](https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170).
