linker

How to get OCaml linker flags to link with C++ cmake build

十年热恋 提交于 2019-12-24 02:18:25
问题 I'm trying to link some C++/cmake code with some OCaml code. If the C++ side were simple, I'd just add its object file to ocamlopt. If the OCaml side were simple, I'd add its object file to cmake. But they're both complex programs with lots of dependencies. Currently, I have it working, but it's a bit of a hack: I run ocamlopt -output-obj to get the main OCaml object: add_custom_command( OUTPUT ocaml_main.o DEPENDS ocaml.ml COMMAND ocamlfind ocamlopt -package mylib -linkpkg -output-obj -o

undefined references to functions in linked avrfix library using avr-gcc compiler/linker

ぃ、小莉子 提交于 2019-12-24 02:07:09
问题 I am trying to use the avrfix library in a project, using Eclipse (v4.2.2) as the IDE and avr-gcc as the compiler. Both the header file (avrfix.h) and the library file (libavrfix.a) are included in the same directory, which is in the project's search path as well as the linker's library search path. When compiling, i get the following errors: D:\Documents\Arduino\IMU_Kalman\Release/../HMC5883/HMC5883.cpp:359: undefined reference to `lsincoslk(long, long*)' D:\Documents\Arduino\IMU_Kalman

GLSL: shader linking fail (but no log)

霸气de小男生 提交于 2019-12-24 01:54:16
问题 I'm trying to create a little shader for brightness and contrast of the window (that I've seen here). I can load the file, and compile the shader successfully. But I fail to link it. My problem is that the log has no output, so I can't see what's wrong with it. How can I check the linking problem? Where can I find informations about linking failing, and check why linking can fail (I'm new to shaders). I'm using Ubuntu 12.04. This is the initialization code if (GLEW_ARB_fragment_shader) { // I

GLSL: shader linking fail (but no log)

感情迁移 提交于 2019-12-24 01:54:14
问题 I'm trying to create a little shader for brightness and contrast of the window (that I've seen here). I can load the file, and compile the shader successfully. But I fail to link it. My problem is that the log has no output, so I can't see what's wrong with it. How can I check the linking problem? Where can I find informations about linking failing, and check why linking can fail (I'm new to shaders). I'm using Ubuntu 12.04. This is the initialization code if (GLEW_ARB_fragment_shader) { // I

No deadlock unless linked to pthreads?

…衆ロ難τιáo~ 提交于 2019-12-24 01:33:46
问题 Why is it that creating a std::mutex deadlock will not actually cause a deadlock unless the program is linked to pthreads? The following will deadlock when linked with pthreads library and will not deadlock if pthreads is not linked in. Tested on gcc and clang. // clang++ main.cpp -std=c++14 -lpthread #include <mutex> int main() { std::mutex mtx; mtx.lock(); mtx.lock(); return 0; } I understand that without a thread library you don't actually need mutex functionality, but is the compiler

How to pass -libm to MPICC? libimf.so: warning: feupdateenv is not implemented and will always fail

孤街浪徒 提交于 2019-12-24 01:16:16
问题 I am a newbie who tries to compile a program via mpicc replacing icc with gcc . I have already discovered, that I need to use the following command to compile $ OMPI_CC=gcc make However, I get the following error message (which is well-known) /opt/intel/fce/9.1.036/lib/libimf.so: warning: warning: feupdateenv is not implemented and will always fail I try to do $ make clean && OMPI_CC=gcc OMPI_LDFLAGS=-libm make Then I see /usr/bin/ld: cannot find -libm collect2: ld returned 1 exit status

What is the link file limit using Visual Studio's link.exe?

て烟熏妆下的殇ゞ 提交于 2019-12-24 01:07:10
问题 I know some linkers have a limit of how many object files are allowed on the command line. What is Visual Studio's? Also, if you exceed this number, some linkers allow you to specify a file containing the name of all the object files, and you would only pass that as an argument. Here's an example to show you what I mean: some_linker file1.o file2.o ... file9000.o -out=some.lib Suppose 9000 is too much for this linker, but it allows you to write the path to the objects in another file, example

How to link a library build using make rule in bazel

六月ゝ 毕业季﹏ 提交于 2019-12-24 00:46:16
问题 I have built a lib.so using make rule in bazel. How do I link this external lib.so to a regular cc_library rule. I tried adding it in deps, but the guide suggests that deps can have cc_library or objc_library targets. Also, do I need to pass any specific linking options, and how can I read more about them? 回答1: In the BUILD file, create a cc_library target that imports the built lib.so for other cc_library targets to depend on: cc_library( name = "lib", srcs = ["lib.so"], linkopts = ["...", "

Undefined reference to curl objects

大兔子大兔子 提交于 2019-12-24 00:37:19
问题 (EDITED) I'm trying to get curl to call information from a webpage for weeks and I get the seemingly common error where my program is unable to identify curl objects: C:/Users/.../CurlAttempt/CurlAttempt1.cpp:25: undefined reference to `_imp__curl_global_init' C:/Users/.../CurlAttempt/CurlAttempt1.cpp:26: undefined reference to `_imp__curl_easy_init' C:/Users/.../CurlAttempt/CurlAttempt1.cpp:28: undefined reference to `_imp__curl_easy_setopt' collect2.exe: error: ld returned 1 exit status I

clang 4.0 fails to build clang 3.42 on ubuntu 17.04

烈酒焚心 提交于 2019-12-24 00:30:05
问题 I have posted my failures of building llvm 3.42 with gcc6.3 here and here. I am posting separately the failure of clang 4.0 to build llvm 3.42 from source as these are somewhat different developers communities. Here is the script I've used: svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_342/final llvm svn co https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_342/final llvm/tools/clang svn co https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_342/final llvm/projects