Registered Member
|
When compiling Eigen 3.1.1 into a Visual Studio 2005 C++ project in debug I get the following error:
error C2061: syntax error : identifier 'ptr' c:\m_lincs\3p\eigen\eigen\src\Core\util\Memory.h 326 The code in memory.h is as follows: template<typename T> inline T* construct_elements_of_array(T *ptr, size_t size) { for (size_t i=0; i < size; ++i) ::new (ptr + i) T; return ptr; } Can anyone help with this, please? Thanks. |
Registered Member
|
As a temporary work-around I've commented out the two for loop lines and put in a line to throw an std::exception, as this method doesn't seem to be getting called in my implementation. However, I'd like a proper solution if anyone can help.
Thanks. |
Registered Member
|
Hi James,
Unfortunately, I cannot help you with the issue since I have not been working with Visual Studio 2005 for years. When I first started using Eigen I added quite a few Visual Studio related fixes but Visual Studio 2005 was already outdated back then. I think there is pretty much no chance the we start to add Visual Studio 2005 support. Unfortunately, the only suggestion I have is to switch to a newer version. Since Visual Studio 2012 has been recently released, I would recommend switching to this version (the express version is even free). Not only should Eigen compile out of the box but it should also show much much better performance with more recent compilers. Kind regards, Hauke |
Moderator
|
indeed, it's already difficult enough for us to support more recent MSVC versions, so I don't see ourself maintaining support for MSVC 2005.Nevertheless, we can still accept patches...
|
Registered Member
|
Thanks for the replies. I can appreciate that you can't support everything so no worries.
Unfortunately moving onto a more recent version of Visual Studio is not something I can do at the moment, although it may be possible next year. As and when I move on I'll let you know what happens. At present my temporary fix isn't something that I think is suitable long term (it may be for my specific use of Eigen but I suspect not for the wider user base). If I come up with something better I'll send it in. Thanks again for your help. James. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]