Using Clang to get function definitions - c++

I would like use clang to get the functions names from a cpp file.
I found some tutorials but always I received this error when I executed 'make':
/usr/bin/ld: error: ../../lib/libLLVMSelectionDAG.a: ELF section name out of range
collect2: error: ld returned 1 exit status
tools/lto/CMakeFiles/LTO.dir/build.make:269: recipe for target 'lib/libLTO.so.7.0.0svn' failed
make[2]: * [lib/libLTO.so.7.0.0svn] Error 1
CMakeFiles/Makefile2:18957: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed
make[1]: * [tools/lto/CMakeFiles/LTO.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Any idea of how can I solve this problem or any tutorial?
Thanks in advance.

I solved the problem increasing the /dev/sda1 size and removing the file ../../lib/libLLVMSelectionDAG.a
After that I only executed 'make' and It worked.

Related

I got an "cannot find -lOpenGL::OpenGL" error when make install partio

When I install the partio it shows the following error message
/usr/bin/ld: cannot find -lOpenGL::OpenGL
collect2: error: ld returned 1 exit status
src/tools/CMakeFiles/partview.dir/build.make:91: recipe for target 'src/tools/partview' failed
make[2]: *** [src/tools/partview] Error 1
CMakeFiles/Makefile2:967: recipe for target 'src/tools/CMakeFiles/partview.dir/all' failed
make[1]: *** [src/tools/CMakeFiles/partview.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
When I search the internet I barely see any information regard to -lOpenGL::OpenGL. I have seen OpenGL::GLU or GL. But I havent seen OpenGL::OpenGL yet. So I don't know how to solve this.
I am using the cmake version exactly 3.15.0.
Is there any solution to this? Anything would help.
Welcome to Stack Overflow!
The library you're looking for is called libGL.so, not libOpenGL.so or similar. To link it, add -lGL to your command line and delete references to OpenGL::OpenGL on the command line. (If you're still having troubles, show us your whole build command line.)
That said, OpenGL is a C-based library, so C++ constructs like OpenGL::OpenGL (presumably a constructor of a class) will not be found therein. Or perhaps that's a reference to CMake, in which case my answer would need to change significantly.

Permission denied error when running simple c++ program

I get this error almost everytime i try to run a simple code on CLion.
I'm not trying to save the project in c drive.
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot open output file A__IQ_test.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
CMakeFiles\A__IQ_test.dir\build.make:95: recipe for target 'A__IQ_test.exe' failed
mingw32-make.exe[3]: * [A__IQ_test.exe] Error 1
mingw32-make.exe[2]: [CMakeFiles/A__IQ_test.dir/all] Error 2
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/A__IQ_test.dir/all' failed
mingw32-make.exe[1]: [CMakeFiles/A__IQ_test.dir/rule] Error 2
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/A__IQ_test.dir/rule' failed
mingw32-make.exe: * [A__IQ_test] Error 2
Makefile:117: recipe for target 'A__IQ_test' failed
This usually means your program is already running. You can't replace it with a new one while it's running. Ensure you've closed your program before you try to rebuild it. If you think you've done so, there may be a bug where it is hanging — attach your debugger to find out.

open cv install not working properly

when i am doing make in /opencv/build directory it is working upto some extent after that it is showing this kind of error what should i do
Linking CXX executable ../../bin/opencv_test_core
CMakeFiles/opencv_test_core.dir/test/ocl/test_arithm.cpp.o: file not
recognized:
File truncated collect2: error: ld returned 1 exit status modules/core
/CMakeFiles/opencv_test_core.dir/build.make:824: recipe for target 'bin/opencv_test_core' failed make[2]: * [bin/opencv_test_core]
Error 1 CMakeFiles/Makefile2:1421: recipe for target
'modules/core/CMakeFiles/opencv_test_core.dir/all' failed make[1]: *
[modules/core/CMakeFiles/opencv_test_core.dir/all] Error 2
Makefile:147: recipe for target 'all' failed make: *** [all] Error 2
Your problem is most likely here:
CMakeFiles/opencv_test_core.dir/test/ocl/test_arithm.cpp.o: file not recognized: File truncated
Delete the object (.o) file and rerun. The make call was probably interrupted before which caused the object file to be truncated.

make "sumo 0.17.1" on ubuntu 13.10

I installed and tested v0.19.1 successfully before, however, I needed to downgrade to 0.17.1 in order to run some example in omnetpp's veins simulator.
Whenever I run the "make" command, I get the following error:
/usr/bin/ld: ./utils/foxtools/libfoxtools.a(MFXMutex.o): undefined reference to symbol 'pthread_mutexattr_settype##GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [sumo-gui] Error 1
make[3]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make: *** [all-recursive] Error 1
What am I missing?!
Problem solved, had to install libproj-dev and include proj in the ./configure using the --with-proj-includes=DIR
[EDIT] after 15 minutes of making, same error raised again!!!

Cannot find library reference to libmysqlclient_r Angstrom

I downloaded the MySQL Connector / C++ code from dev.mysql.com. I also used opkg to download the libmysqlclient-r-dev package, which gave me libmysqlclient_r.so and .la in my /usr/lib directory.
When I attempt to make the source code for the MySQL connector, I get the following error:
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
make[2]: *** [driver/libmysqlcppconn.so.1.0.5] Error 1
make[1]: *** [driver/CMakeFiles/mysqlcppconn.dir/all] Error 2
make: *** [all] Error 2
It tells me that the library is missing, eventhough it is present in /usr/lib?
How does that work, and what should I do?