Undefined Referece to `dealii::DataOut_DoFData<dealii::DoFHandler<2, 2>, 2, 2>::get_dataset_names[abi:cxx11]() const'

23 views
Skip to first unread message

phillip mobley

unread,
May 3, 2018, 10:20:12 PM5/3/18
to deal.II User Group

Hello all,

I am getting an odd error where the program is not able to find a particular reference to one of the packages.

The error is listed below:

./Debug/main.cpp.o:(.rodata._ZTVN6dealii7DataOutILi2ENS_10DoFHandlerILi2ELi2EEEEE[_ZTVN6dealii7DataOutILi2ENS_10DoFHandlerILi2ELi2EEEEE]+0x28): undefined reference to `dealii::DataOut_DoFData<dealii::DoFHandler<2, 2>, 2, 2>::get_dataset_names[abi:cxx11]() const'

./Debug/main.cpp.o:(.rodata._ZTVN6dealii7DataOutILi2ENS_10DoFHandlerILi2ELi2EEEEE[_ZTVN6dealii7DataOutILi2ENS_10DoFHandlerILi2ELi2EEEEE]+0x30): undefined reference to `dealii::DataOut_DoFData<dealii::DoFHandler<2, 2>, 2, 2>::get_vector_data_ranges[abi:cxx11]() const'

./Debug/main.cpp.o:(.rodata._ZTVN6dealii4FE_QILi2ELi2EEE[_ZTVN6dealii4FE_QILi2ELi2EEE]+0x28): undefined reference to `dealii::FE_Q<2, 2>::get_name[abi:cxx11]() const'

I installed dealii according to the directions outlined here:

http://dealii.org/8.5.0/readme.html

Now, I do understand that it is recommended to use the cmake files however, I am linking directly to the library that was generated. I am following my own directions located here:

  1. In the compiler settings, you need to make sure that the include paths are to your installation for dealII.Both for the sources and what is bundled. Ex. /home/phillip/dealii851/include and /home/phillip/dealii851/include/deal.II/bundled

  2. In the linker settings, have the linker library search path point to the dealii installation director with the lib folder. And, place in the library name in the Libraries option Ex Path -> /home/phillip/dealii851/lib Library -> libdeal_II

  3. In order to actually run a program (steps 1 and 2 will allow you to compile the application), you need to copy the library libdeal_II.so.8.5.1 from the lib folder in the installation directory of DealII to the /usr/lib folder


Long story short, my application requires me to do this. (Maybe I just don't know how to use CMAKE too well). Basically, my application, I ma developing a GUI that will use dealii as the solver. So I am not sure how cmake will interact with the GUI library files that do not use cmake?


Anyways, I found that this is an easier procedure.


What is odd is that this code that I am compiling works fine on another machine and I generated my procedure from the working machine. Has anyone received a set of errors similar to this?



Bruno Turcksin

unread,
May 4, 2018, 8:33:27 AM5/4/18
to deal.II User Group
Philip,

You can do what you are doing but this is really error prone. Two things that can help you:
1) don't move libdeal_II.so but add the path to your LD_LIBRARY_PATH: export LD_LIBRARY_PATH=/path/to/lib:$LD_LIBRARY_PATH
2) you want to use the flags in lib/cmake/deal.II/deal.IIConfig.cmake In this file you will find all the flags and include path that are used by cmake to compile an application. You need to use the same.

Best

Bruno

phillip mobley

unread,
May 4, 2018, 8:53:50 AM5/4/18
to deal.II User Group
Hello Bruno,

Thank you for the information, I will apply these to my project.

I ran a test where I copied the the source code for step-1 into another project in my IDE. I have everything setup the same way as my own application.

I as able to compile step-1 and run it within the IDE without any issues. Maybe I am referencing something in my own code that is not being reference in the step-1

Bruno Turcksin

unread,
May 4, 2018, 9:02:05 AM5/4/18
to dea...@googlegroups.com
2018-05-04 8:53 GMT-04:00 phillip mobley <phillip...@gmail.com>:
I as able to compile step-1 and run it within the IDE without any issues. Maybe I am referencing something in my own code that is not being reference in the step-1
step-1 does not use DataOut or FE_Q. What happens with step-6? Do you have the same problem?

Bruno

phillip mobley

unread,
May 4, 2018, 9:06:15 AM5/4/18
to deal.II User Group
Yes, I do get the same error for step-6.

Also, I tried the above fixes and I am still receiving the error

Bruno Turcksin

unread,
May 4, 2018, 9:16:32 AM5/4/18
to dea...@googlegroups.com
Can you run step-6 if you use cmake, i.e., if you use the recommended way?

--
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 a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/NVFtQzaKv7c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

phillip mobley

unread,
May 4, 2018, 9:38:38 AM5/4/18
to deal.II User Group
Doing it the normal way with cmake, step 6 is able to run properly without any errors
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.

Bruno Turcksin

unread,
May 4, 2018, 9:43:10 AM5/4/18
to dea...@googlegroups.com
2018-05-04 9:38 GMT-04:00 phillip mobley <phillip...@gmail.com>:
Doing it the normal way with cmake, step 6 is able to run properly without any errors
You can do make VERBOSE=1 when you compile step-6 and you will see exactly which command is used to compile and link the tutorial. Then, you should be able to use that command for your own build system.

Wolfgang Bangerth

unread,
May 4, 2018, 11:50:21 AM5/4/18
to dea...@googlegroups.com

Philip,

> ./Debug/main.cpp.o:(.rodata._ZTVN6dealii7DataOutILi2ENS_10DoFHandlerILi2ELi2EEEEE[_ZTVN6dealii7DataOutILi2ENS_10DoFHandlerILi2ELi2EEEEE]+0x28):
> undefined reference to `dealii::DataOut_DoFData<dealii::DoFHandler<2,
> 2>, 2, 2>::get_dataset_names[abi:cxx11]() const'

Bruno already pointed out the right solution: use the cmake scripts and
build files provided by deal.II.

I don't know whether that has anything to do with your issues, but I
also see the [abi:cxx11] tag on all of the functions that you have
trouble with. This may or may not suggest that one possibility is that
you've used different compilers to compile different parts of your
project (or for your project and deal.II). Mixing compilers is generally
not a great idea, for exactly these sorts of reasons. As I said, it's
not clear to me from the error message whether that is really the issue,
but it's one thing that can be avoided because deal.II records the
compiler used to compile deal.II, and then uses the same compiler for
your project as well when you use the deal.II-provided cmake scripts.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

phillip mobley

unread,
May 7, 2018, 10:24:46 PM5/7/18
to deal.II User Group
Thank you wolfgang, thank you Bruno. I appreciate your input!

I did look through the settings of the cmake by running make VERBOSE=1. And I did notice that the compiler/linker that was running was v6 of gcc. In my IDE, it is running v4.9. A quick change to v6 was able to solve my issue


On Thursday, May 3, 2018 at 10:20:12 PM UTC-4, phillip mobley wrote:
Reply all
Reply to author
Forward
0 new messages