shared-libraries

OpenGL library not linking [duplicate]

妖精的绣舞 提交于 2021-02-10 14:29:57
问题 This question already has answers here : What is an undefined reference/unresolved external symbol error and how do I fix it? (34 answers) Closed 5 years ago . I have this error on Ubuntu Eclipse that doesn't go away: Invoking: GCC C++ Linker g++ -L/usr/lib/i386-linux-gnu -o "GLUT" ./src/GLUT.o -lglut -lGLU /usr/bin/ld: ./src/GLUT.o: undefined reference to symbol 'glEnable' //usr/lib/i386-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line collect2: error: ld

Adding .so to Xamarin android binding library

醉酒当歌 提交于 2021-02-10 05:37:51
问题 I have a xamarin android project (VS2015) which I added a Android bindings library project to to use a java lib. The wrapper works fine and I can call the classes/methods in my application project. However one of the java classes depends on armeabi/libjnisgfplib.so I have tried adding to both /Assets and /libs within my application. BuildAction = AndroidNativeLibrary, Copy = Always. Yet it can't find the lib and I keep getting. java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader

Adding .so to Xamarin android binding library

南楼画角 提交于 2021-02-10 05:37:11
问题 I have a xamarin android project (VS2015) which I added a Android bindings library project to to use a java lib. The wrapper works fine and I can call the classes/methods in my application project. However one of the java classes depends on armeabi/libjnisgfplib.so I have tried adding to both /Assets and /libs within my application. BuildAction = AndroidNativeLibrary, Copy = Always. Yet it can't find the lib and I keep getting. java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader

Linking static libraries into shared: enum class in header -> relocation R_X86_64_PC32 against undefined symbol

北战南征 提交于 2021-02-10 05:19:50
问题 What I want to do I try to separate my code into modules, which are compiled as static libraries with the -fPIC option. Finally, they are to be linked into a shared library using --whole-archive , also compiled with -fPIC . For the whole compilation, I use CMake generated make files and C++17 with GCC8 ! Problem Trying to do so with GCC8 x86_64 and libstdc++_pic fails with: /usr/bin/x86_64-linux-gnu-ld: CMakeFiles/shirabeengine.dir/code/source/core/engine.cpp.o: relocation R_X86_64_PC32

Linking static libraries into shared: enum class in header -> relocation R_X86_64_PC32 against undefined symbol

不问归期 提交于 2021-02-10 05:19:29
问题 What I want to do I try to separate my code into modules, which are compiled as static libraries with the -fPIC option. Finally, they are to be linked into a shared library using --whole-archive , also compiled with -fPIC . For the whole compilation, I use CMake generated make files and C++17 with GCC8 ! Problem Trying to do so with GCC8 x86_64 and libstdc++_pic fails with: /usr/bin/x86_64-linux-gnu-ld: CMakeFiles/shirabeengine.dir/code/source/core/engine.cpp.o: relocation R_X86_64_PC32

Linking static libraries into shared: enum class in header -> relocation R_X86_64_PC32 against undefined symbol

旧城冷巷雨未停 提交于 2021-02-10 05:19:12
问题 What I want to do I try to separate my code into modules, which are compiled as static libraries with the -fPIC option. Finally, they are to be linked into a shared library using --whole-archive , also compiled with -fPIC . For the whole compilation, I use CMake generated make files and C++17 with GCC8 ! Problem Trying to do so with GCC8 x86_64 and libstdc++_pic fails with: /usr/bin/x86_64-linux-gnu-ld: CMakeFiles/shirabeengine.dir/code/source/core/engine.cpp.o: relocation R_X86_64_PC32

Share common typescript code across node projects

自作多情 提交于 2021-02-08 15:19:18
问题 Assuming I have the following project structure: webapps ProjectA SomeClass.ts Package.json ProjectB SomeClass.ts Package.json Common LoggingClass.ts Package.json The Common "LoggingClass" need to import a module from NPM. Let's assume that module is UUID (https://www.npmjs.com/package/uuid) The problem, or the challenge is the following: We want to use and import the "LoggingClass" in both ProjectA and ProjectB. Thing is, they can import the code from the common folder without a problem, but

How does gdb set software breakpoints in shared library functions?

元气小坏坏 提交于 2021-02-08 13:21:41
问题 I know that software breakpoints in an executable file can work through replacing some assembler instruction at the desired place with another one, which cause interrupt. So debugger can stop execution exactly at this place and replace this instruction with original one and ask user about what to do the next or call some commands and etc. But code of such executable file is not used by another programs and has only one copy in memory. How can software breakpoints work with a shared libraries?

Python how to share package between multiple projects

梦想的初衷 提交于 2021-02-08 11:18:18
问题 I have a package that contains protocols for specific hardware from multiple vendors. This is basically a collection of multiple different protocols that have similar interface. It is ported to python by me. But now I have two projects that handle communication with this equipment using different transport protocols one is over TCP another is over RS-485/232. How to share the package with protocols between this two projects so that I don't need to copy it after I add new functionality support

Debug error before main() using GDB

寵の児 提交于 2021-02-08 08:54:25
问题 Is there anyway to debug a link error or any kind of error that may occur before the execution of the main() function using GDB? 回答1: Is there anyway to debug a link error Presumably you are asking about runtime link error (e.g. `error: libfoo.so: no such file or directory'), and not about (static) link step of your build process. The trick is to set a breakpoint on exit or ( exit_group on Linux) system call with e.g. catch syscall exit . You will then be stopped inside ld.so at the point