shared-libraries

JavaCPP, UnsatisfiedLinkError when native library is archived in JAR

牧云@^-^@ 提交于 2019-12-02 03:29:01
问题 I'm trying to call Haskell code from Java, using JavaCPP to help create the necessary JNI binding, as already discussed in this question. This is how I'm using it: <rootdir> /javacpp.jar /build (destination of libraris) /src (contains Haskell code) /com/example/HSCode.java (Java class to load and use native lib) Content of HScode.java : package com.example; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.annotation.*; import java.util.Scanner; import java.io.File; import java.io

Why is my shared library not found?

你。 提交于 2019-12-02 03:16:30
问题 I'm trying to compile an example program that links to the shared library produced by Sundown. I'm compiling the program like so. $ gcc -o sd sundown.c -L. -lsundown Yet, when I run it I get the following error. ./sd: error while loading shared libraries: libsundown.so: cannot open shared object file: No such file or directory The output of ls is. $ ls libsundown.so libsundown.so.1 sundown.c sd Why is the shared library not found by ld ? 回答1: Short solution: add . (or whatever it is from your

Output of 'make' is a shared object and not an executable

北城以北 提交于 2019-12-02 02:59:58
问题 Edit: It appears to be a g++ issue, as compiling with clang++ does output an executable file. I've written a C++ application that has a main function, creates an application window, loads a 3D fbx file and draws that using opengl. To create the Makefile for compiling i'm using a CMakeLists.txt file: cmake_minimum_required(VERSION 2.8) project(solight) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") INCLUDE_DIRECTORIES(lib/include) ########################################### #SET THIS TO

What's the order for gcc to link unresolved symbol in static library

こ雲淡風輕ζ 提交于 2019-12-02 02:18:37
When debug the function symbols conflicts problem, I find a strange behavior of gcc i couldn't understand, illustrate by the following sample code: main.c #include <stdio.h> int main() { b(); a(); } a.c #include <stdio.h> void a(void) { printf("func a in a\n"); } b.c #include <stdio.h> void a() { printf("func a in b\n"); } void b() { printf( "func b try to call a \n"); a(); } compile: gcc -c a.c gcc -c b.c ar -cr liba.a a.o ar -cr libb.a b.o gcc main.c liba.a libb.a execute: ./a.out func b try to call a func a in b func a in b My question is : Why calling function a in main function is a in b

Java's built-in libraries implementation

那年仲夏 提交于 2019-12-02 02:02:10
Does anyone happen to know where, if at all possible, I can take a look at the code of the java's built-in libraries? I've tried Ctrl + Shift + B (which is the Netbeans' equivalence of Eclipse's Ctrl + Shift T ) to "go to source", but I can only see the method header, and the body is always: //compiled code throw new RuntimeException("Compiled Code"); For instance, I'd see the following if I tried to view String.charAt(int) public char charAt(int i) { //compiled code throw new RuntimeException("Compiled Code"); } built-in libraries source code is available with jdk. For example on a windows

Java's built-in libraries implementation

ⅰ亾dé卋堺 提交于 2019-12-02 01:57:02
问题 Does anyone happen to know where, if at all possible, I can take a look at the code of the java's built-in libraries? I've tried Ctrl + Shift + B (which is the Netbeans' equivalence of Eclipse's Ctrl + Shift T ) to "go to source", but I can only see the method header, and the body is always: //compiled code throw new RuntimeException("Compiled Code"); For instance, I'd see the following if I tried to view String.charAt(int) public char charAt(int i) { //compiled code throw new

Why can't CUDA's examples makefile find the CUDA libraries?

烈酒焚心 提交于 2019-12-02 01:52:09
I'm running Arch Linux and have installed the cuda-sdk and cuda-toolkit from the repositories. I've compiled the libraries inside /opt/cuda-sdk/CUDALibraries fine. No I go to compile the sdk examples by running make in /opt/cuda-sdk/C and get the following error: # make make[1]: Entering directory `/opt/cuda-sdk/C/common' make[1]: Leaving directory `/opt/cuda-sdk/C/common' make[1]: Entering directory `/opt/cuda-sdk/C/common' make[1]: Leaving directory `/opt/cuda-sdk/C/common' make[1]: Entering directory `/opt/cuda-sdk/C/common' make[1]: Leaving directory `/opt/cuda-sdk/C/common' make[1]:

Fortran debugging with gdb on Mac OS?

核能气质少年 提交于 2019-12-02 01:10:00
I have problems debugging Fortran programs on Mac OS Mountain Lion with gdb. When I invoke gdb (fortran executable name) from a terminal, I get the following message: This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries. warning: Could not find object file "/Users/fx/devel/gcc/ibin-462-x86_64/x86_64-apple-darwin11/libgfortran/.libs/backtrace.o" - no debug information available for "../../../gcc-4.6.2-RC-20111019/libgfortran/runtime/backtrace.c". ... (an extremely long list of analogous warnings pop up for libgcc and libquadmath libraries) ... Basically, gdb

Output of 'make' is a shared object and not an executable

橙三吉。 提交于 2019-12-02 01:06:07
Edit: It appears to be a g++ issue, as compiling with clang++ does output an executable file. I've written a C++ application that has a main function, creates an application window, loads a 3D fbx file and draws that using opengl. To create the Makefile for compiling i'm using a CMakeLists.txt file: cmake_minimum_required(VERSION 2.8) project(solight) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") INCLUDE_DIRECTORIES(lib/include) ########################################### #SET THIS TO X32 IN CASE OF A 32 BIT SYSTEM ########################################### set (ARCH x64) set (SRC

Google Apps Script Auto Generated Library Documentation

Deadly 提交于 2019-12-02 00:50:37
问题 I am currently developing a Library for Google Apps Script that basically treats a spreadsheet as a database object. Currently, the library has a two identical functions like /** * Opens and creates a query object for a spreadsheet with the given url. * * @param {String} the url of the spreadsheet * @return {SpreadsheetQuery_} a spreadsheet query object for the given spreadsheet */ function openByUrl(url) { return new SpreadsheetQuery_(SpreadsheetApp.openByUrl(url)); } now, for the two public