Jump to content
  • Advertisement
Sign in to follow this  
RetroBilly

Problem while trying to convert project from VC 2008 to VC 2010

This topic is 2860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to convert my project from VC 2008 to VC 2010 but I don't know what this compiler error means:

Quote:

1>------ Build started: Project: Unbound Engine, Configuration: Template Win32 ------
1> stdafx.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2134): error C2668: 'swap' : ambiguous call to overloaded function
1> C:\Program Files (x86)\Recastnavigation\Detour\Include\DetourCommon.h(24): could be 'void swap<E_INTERFACE*>(T &,T &)' [found using argument-dependent lookup]
1> with
1> [
1> T=E_INTERFACE *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(100): or 'void std::swap<E_INTERFACE*>(_Ty &,_Ty &)'
1> with
1> [
1> _Ty=E_INTERFACE *
1> ]
1> while trying to match the argument list '(E_INTERFACE *, E_INTERFACE *)'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(3275) : see reference to function template instantiation 'void std::iter_swap<_RanIt,_RanIt>(_FwdIt1,_FwdIt2)' being compiled
1> with
1> [
1> _RanIt=E_INTERFACE **,
1> _FwdIt1=E_INTERFACE **,
1> _FwdIt2=E_INTERFACE **
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(3289) : see reference to function template instantiation 'void std::_Rotate<_RanIt,std::iterator_traits<_Iter>::difference_type,E_INTERFACE*>(_RanIt,_RanIt,_RanIt,_Diff *,_Ty *)' being compiled
1> with
1> [
1> _RanIt=E_INTERFACE **,
1> _Iter=E_INTERFACE **,
1> _Diff=std::iterator_traits<E_INTERFACE **>::difference_type,
1> _Ty=E_INTERFACE *
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(3300) : see reference to function template instantiation 'void std::_Rotate<E_INTERFACE**>(_RanIt,_RanIt,_RanIt,std::random_access_iterator_tag)' being compiled
1> with
1> [
1> _RanIt=E_INTERFACE **
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(689) : see reference to function template instantiation '_FwdIt std::rotate<std::_Vector_iterator<_Myvec>>(_FwdIt,_FwdIt,_FwdIt)' being compiled
1> with
1> [
1> _FwdIt=std::_Vector_iterator<std::_Vector_val<E_INTERFACE *,std::allocator<E_INTERFACE *>>>,
1> _Myvec=std::_Vector_val<E_INTERFACE *,std::allocator<E_INTERFACE *>>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(675) : see reference to function template instantiation 'std::_Vector_iterator<_Myvec> std::vector<_Ty>::emplace<E_INTERFACE*&>(std::_Vector_const_iterator<_Myvec>,_Valty)' being compiled
1> with
1> [
1> _Myvec=std::_Vector_val<E_INTERFACE *,std::allocator<E_INTERFACE *>>,
1> _Ty=E_INTERFACE *,
1> _Valty=E_INTERFACE *&
1> ]
1> stdafx.cpp(2794) : see reference to function template instantiation 'std::_Vector_iterator<_Myvec> std::vector<_Ty>::insert<E_INTERFACE*&>(std::_Vector_const_iterator<_Myvec>,_Valty)' being compiled
1> with
1> [
1> _Myvec=std::_Vector_val<E_INTERFACE *,std::allocator<E_INTERFACE *>>,
1> _Ty=E_INTERFACE *,
1> _Valty=E_INTERFACE *&
1> ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Any help would be appreciated!

Share this post


Link to post
Share on other sites
Advertisement
What is "Recastnavigation" because it looks like it's defining its own swap template that's making instantiation of swap ambiguous because of std::swap.

Share this post


Link to post
Share on other sites
Quote:
Original post by Washu
You should be using a newer version of that library. Because, as the commit notes note...
Quote:
Moved common functions behind name decoration.


I had version 1.4 which I thought was the latest and I had been wondering why he didn't update it for a whole year but he just didn't update the downloads. Also I am some what impressed that you found the exact revision where he fixed the problem. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by SteveDeFacto
I had version 1.4 which I thought was the latest and I had been wondering why he didn't update it for a whole year but he just didn't update the downloads. Also I am some what impressed that you found the exact revision where he fixed the problem. [smile]

Wasn't hard, I looked at the blame of the source file and it was trivial to identify the revision.

He should be using namespaces.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!