Peter,

2016-08-25 11:03 GMT-04:00 Wolfgang Bangerth <bange...@colostate.edu>:
>
>> In the case of trying to compile the tbb.cc code using the command
>> sudo gcc tbb.cc -std=c++11
>>
>> I get a long string of errors that look something like this
>>
>>
>> tbb.cc:(.text._ZN9__gnu_cxx13new_allocatorISt10_List_nodeIN6dealii10WorkStream8internal15Implementation225IteratorRangeToItemStreamINS_17__normal_iteratorIPiSt6vectorIiSaIiEEEE12scratch_data9copy_dataE8ItemType17ScratchDataObjectEEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIN6dealii10WorkStream8internal15Implementation225IteratorRangeToItemStreamINS_17__normal_iteratorIPiSt6vectorIiSaIiEEEE12scratch_data9copy_dataE8ItemType17ScratchDataObjectEEE8allocateEmPKv]+0x46):
>>     undefined reference to `operator new(unsigned long)'
>>     /tmp/ccAgCMHw.o: In function
>
>
> Peter -- two comments:
>
> 1/ Using sudo is almost always a terrible idea. What you're doing is calling
> the compiler as *root* (i.e., as the superuser). There really shouldn't be
> any reason to do this, but so many reasons *not* to do this because you may
> accidentally overwrite files that shouldn't be overwritten, you could be
> writing into directories that need to stay as they are, etc.
>
> 2/ The command 'gcc tbb.cc -std=c++11' trie to compile and link the tbb.cc
> file into an executable. But tbb.cc depends on many other files, so while
> you should be able to compile it into an object file, you won't be able to
> link it into an executable without linking in a large number of other object
> files. That's in essence what the error message is saying.
On top of what Wolfgang already said, gcc is a C compiler but tbb is a
C++ library so you would need to use g++.

> My suggestion is to just stick with how the installation process is intended
> to be used:
> * no sudo, no superuser
> * compile and install into a directory somewhere within your homedir
> * go to one of the example dirs in the installation directory
> * call 'cmake .'
> * compile
> This should work.
@Peter before trying what Wolfgang said, you need to make sure that
you have removed deal.II from /usr/local otherwise your system will
try to use this version. You can use candi
https://github.com/dealii/candi to build deal.II in a directory.

Best,

Bruno

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to