[Trilinos-Users] Problems compiling with Trilinos

Lukas Korous lukas.korous at gmail.com
Wed Feb 2 06:40:57 MST 2011


On 2/2/2011 12:17 AM, Bartlett, Roscoe A wrote:
> Lukas,
>
> I can't see what is going on from this.  What does your actual link line look like (i.e. the actual -l flags)?

Hello,

thank you very much for your help. It turned out that linking the 
applications using our library directly to Trilinos libraries was the 
key. I do not exactly know why, as our library was (statically) linked 
to Trilinos and to all other libraries (UMFPack etc.), and for all of 
them, except Trilinos this setup worked (the applications only linked 
the one library).. For Trilinos it did not..

Regards,
Lukas

> - Ross
>
>
>> -----Original Message-----
>> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-
>> users-bounces at software.sandia.gov] On Behalf Of Lukas Korous
>> Sent: Tuesday, February 01, 2011 8:33 AM
>> To: Bartlett, Roscoe A
>> Cc: trilinos-users at software.sandia.gov
>> Subject: Re: [Trilinos-Users] Problems compiling with Trilinos
>>
>> Hello,
>>
>> I am sending how we link it using CMake in the attached file. Also a
>> weird behavior is that it somehow worked for Trilinos 10.4.1, but not
>> for 10.6.*.
>>
>> Thank you for any suggestions what might be wrong.
>>
>> Lukas Korous
>>
>> On 01/31/2011 08:06 PM, Bartlett, Roscoe A wrote:
>>> Lukas,
>>>
>>> What is your exact link line and what does 'nm the_teuchos_lib | grep
>> CommandLineProcessor' show?
>>> - ross
>>>
>>>
>>>> -----Original Message-----
>>>> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-
>>>> users-bounces at software.sandia.gov] On Behalf Of Lukas Korous
>>>> Sent: Monday, January 31, 2011 3:20 AM
>>>> To: trilinos-users at software.sandia.gov
>>>> Subject: [Trilinos-Users] Problems compiling with Trilinos
>>>>
>>>> Hello,
>>>>
>>>> our open source project (which is a library) optionally uses
>> Trilinos.
>>>> The build of the library itself is okay, but whenever anybody is
>>>> trying to import the library of ours, he gets the following;
>>>>
>>>> /usr/lib/gcc/i686-linux-
>>>> gnu/4.4.5/../../../../lib/libifpack.a(Ifpack.cpp.o):
>>>> In function `Ifpack::SetParameters(int, char**,
>>>> Teuchos::ParameterList&, std::basic_string<char,
>>>> std::char_traits<char>, std::allocator<char>   >&, int&)':
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:291:
>>>> undefined reference to
>>>> `Teuchos::CommandLineProcessor::CommandLineProcessor(bool, bool,
>>>> bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:295:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char>   >*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:298:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, int*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:301:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char>   >*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:305:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, int*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:309:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, double*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:312:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char>   >*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:315:
>>>> undefined reference to
>> `Teuchos::CommandLineProcessor::setOption(char
>>>> const*, int*, char const*, bool)'
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:320:
>>>> undefined reference to `Teuchos::CommandLineProcessor::parse(int,
>>>> char**, std::basic_ostream<char, std::char_traits<char>   >*) const'
>>>> /usr/lib/gcc/i686-linux-
>>>> gnu/4.4.5/../../../../lib/libifpack.a(Ifpack.cpp.o):
>>>> In function `__static_initialization_and_destruction_0':
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/ifpack/src/Ifpack.cpp:67:
>>>> undefined reference to
>>>> `Teuchos::StringToIntMap::StringToIntMap(std::basic_string<char,
>>>> std::char_traits<char>, std::allocator<char>   >   const&, int, char
>>>> const**)'
>>>> /usr/lib/gcc/i686-linux-
>>>> gnu/4.4.5/../../../../lib/libifpack.a(Ifpack.cpp.o):
>>>> In function `Ifpack::EPrecType
>>>> Teuchos::get<Ifpack::EPrecType>(Teuchos::StringToIntMap const&,
>>>> std::basic_string<char, std::char_traits<char>, std::allocator<char>
>>>>> const&, std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char>   >   const&)':
>>>> /home/lk/Downloads/trilinos-10.6.1-
>>>> Source/packages/teuchos/src/Teuchos_StringToIntMap.hpp:130:
>>>> undefined reference to
>>>> `Teuchos::StringToIntMap::get(std::basic_string<char,
>>>> std::char_traits<char>, std::allocator<char>   >   const&,
>>>> std::basic_string<char, std::char_traits<char>, std::allocator<char>
>>>> const&) const'
>>>> collect2: ld returned 1 exit status
>>>>
>>>>
>>>> Would you please advise what might be wrong?
>>>> Thank you,
>>>> Regards,
>>>>
>>>> Lukas Korous
>>>>
>>>> _______________________________________________
>>>> Trilinos-Users mailing list
>>>> Trilinos-Users at software.sandia.gov
>>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>




More information about the Trilinos-Users mailing list