mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Docs note that MSVC Compilers may require /bigobj (#591)
* Note that MSVC Compilers may require /bigobj So when making heavy use of headers or templates, MSVC will error with ["Fatal Error C1128"](https://msdn.microsoft.com/en-us/library/8578y171.aspx). The solution is to use the [/bigobj](https://msdn.microsoft.com/en-us/library/ms173499.aspx) flag. This does, however, mean that, as per msvc docs, "Linkers that shipped prior to Visual C++ 2005 cannot read .obj files that were produced with /bigobj". * Update usertype.rst
This commit is contained in:
parent
3ad438ac01
commit
e7c43ce242
|
@ -402,6 +402,13 @@ performance note
|
|||
Note that performance for member function calls goes down by a fixed overhead if you also bind variables as well as member functions. This is purely a limitation of the Lua implementation and there is, unfortunately, nothing that can be done about it. If you bind only functions and no variables, however, Sol will automatically optimize the Lua runtime and give you the maximum performance possible. *Please consider ease of use and maintenance of code before you make everything into functions.*
|
||||
|
||||
|
||||
MSVC note
|
||||
---------
|
||||
|
||||
.. note::
|
||||
|
||||
When using usertype templates extensively, MSVC may invoke `compiler error C1128 <https://msdn.microsoft.com/en-us/library/8578y171.aspx>`_ , which is solved by using the `/bigobj compilation flag <https://msdn.microsoft.com/en-us/library/ms173499.aspx>`_.
|
||||
|
||||
.. _destructible: http://en.cppreference.com/w/cpp/types/is_destructible
|
||||
.. _default_constructible: http://en.cppreference.com/w/cpp/types/is_constructible
|
||||
.. _runtime extensible: https://github.com/ThePhD/sol2/blob/develop/examples/usertype_advanced.cpp#L81
|
||||
|
|
Loading…
Reference in New Issue
Block a user