You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, when I fork your renderer and compile it with VS2013 on Windows, I found the compiler will encounter error of "the xxx(variable) already defined in core.lib". I think maybe the reason is you defined the variable in the head file and give them a value. Many people will give them value in cpp usually that won't cause these errors.
Such as: the class "FileInputStreambuf" in FileStreamBuf.hpp have declared the varable "static CONSTEXPR size_t PutBackSize = 8", if FileUtil.cpp include this head file, when other files also include this head file, the compile will encounter the error of redefined.
I want to know how you solve this error in your project, thank you very much!
The text was updated successfully, but these errors were encountered:
I tested locally on VS2013 and VS2015, but did not encounter the same error. I also set up automated VS2013 builds recently to make sure, but the builds succeed. Is it possible that you modified the project, or do these errors also occur in a freshly cloned repository?
Thanks for your reply. I do these errors in a freshly cloned repository. Maybe there are little different settings in my environment. I will test whether this error will encounter on VS2015.
Yeah I am also getting the same (symbol already defined linker errors) on the latest (master) branch in VS2013. I am compilimg using vs2013 ultimate on Windows 8.1 64-bit. The code compiles and builds without errors on VS2015.
On VS2013, the solution is to comment the constant declaration line inside the namespace tungsten in the .cpp file. For example, in BitManip.cpp file
#include "BitManip.hpp"
#include <cmath>
namespace Tungsten {
//CONSTEXPR uint32 BitManip::LogMantissaBits; //comment this line
std::unique_ptr<float[]> BitManip::_logLookup;
BitManip::Initializer BitManip::initializer;
Just a suggestion, would it be better to put the TILE_SIZE variable in the parent class (Integrator) rather than declaring and defining in each child class?
hi, when I fork your renderer and compile it with VS2013 on Windows, I found the compiler will encounter error of "the xxx(variable) already defined in core.lib". I think maybe the reason is you defined the variable in the head file and give them a value. Many people will give them value in cpp usually that won't cause these errors.
Such as: the class "FileInputStreambuf" in FileStreamBuf.hpp have declared the varable "static CONSTEXPR size_t PutBackSize = 8", if FileUtil.cpp include this head file, when other files also include this head file, the compile will encounter the error of redefined.
I want to know how you solve this error in your project, thank you very much!
The text was updated successfully, but these errors were encountered: