CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling problem with VS2005+Intel C++ 11 about operator()() overloading (https://www.cfd-online.com/Forums/openfoam-installation/97046-compiling-problem-vs2005-intel-c-11-about-operator-overloading.html)

zouchu February 7, 2012 17:19

Compiling problem with VS2005+Intel C++ 11 about operator()() overloading
 
I want to compile OpenFOAM 2.0.x with VS2005+Intel C++ 11. There is a operator()() overloading problem. I think somebody has solved this problem. Could someone help me?

Quote:

1>------ Build started: Project: OpenFOAM20, Configuration: Debug Win32 ------
1>Compiling with Intel(R) C++ 11.0.066 [IA-32]... (Intel C++ Environment)
1>mapDistribute.C
1>F:\Work\OpenFOAM\include\OpenFOAM\../../src/OpenFOAM/containers/Lists/FixedList/FixedListI.H(448): error: no instance of function "Foam::FixedList<T, Size>::Hash<HashT>::operator() [with T=int, Size=2U, HashT=int]" matches the argument list
1> argument types are: (const int, unsigned int)
1> object type is: Foam::FixedList<int, 2U>::Hash<int>
1> val = HashT()(lst[i], val);
1> ^
1> detected during:
1> instantiation of "unsigned int Foam::FixedList<T, Size>::Hash<HashT>::operator()(const Foam::FixedList<T, Size> &, unsigned int) const [with T=int, Size=2U, HashT=Foam::FixedList<int, 2U>::Hash<int>]" at line 51 of "F:\Work\OpenFOAM\include\OpenFOAM\../../src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H"
1> instantiation of "Foam::label={int} Foam::HashTable<T, Key, Hash>::hashKeyIndex(const Key &) const [with T=Foam::nil, Key=Foam::labelPair, Hash=Foam::FixedList<int, 2U>::Hash<Foam::FixedList<int, 2U>::Hash<int>>]" at line 238 of "F:\Work\OpenFOAM\include\OpenFOAM\../../src/OpenFOAM/containers/HashTables/HashTable/HashTable.C"
1> instantiation of "bool Foam::HashTable<T, Key, Hash>::set(const Key &, const T &, bool) [with T=Foam::nil, Key=Foam::labelPair, Hash=Foam::FixedList<int, 2U>::Hash<Foam::FixedList<int, 2U>::Hash<int>>]" at line 85 of "F:\Work\OpenFOAM\include\OpenFOAM\../../src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H"
1> instantiation of "bool Foam::HashTable<T, Key, Hash>::insert(const Key &, const T &) [with T=Foam::nil, Key=Foam::labelPair, Hash=Foam::FixedList<int, 2U>::Hash<Foam::FixedList<int, 2U>::Hash<int>>]" at line 119 of "F:\Work\OpenFOAM\include\OpenFOAM\../../src/OpenFOAM/containers/HashTables/HashSet/HashSet.H"
1> instantiation of "bool Foam::HashSet<Key, Hash>::insert(const Key &) [with Key=Foam::labelPair, Hash=Foam::FixedList<int, 2U>::Hash<Foam::FixedList<int, 2U>::Hash<int>>]" at line 153 of "..\..\src\OpenFOAM\meshes\polyMesh\mapPolyMesh\ma pDistribute\mapDistribute.C"
1>
1>compilation aborted for ..\..\src\OpenFOAM\meshes\polyMesh\mapPolyMesh\map Distribute\mapDistribute.C (code 2)
The website http://www.scai.fraunhofer.de/en/ope...m/porting.html has something which is similar to this problem:

There have been problems with different instantiations of \texttt{HashTable}
(\texttt{HashTableI.H, HashTable.H, HashTable.C}), e.g.
\texttt{operator()()} cannot be distinguished between different
types. This has lead to linker errors because the symbols got
stripped during linking.


All times are GMT -4. The time now is 18:26.