linker

gcc ignore casing of symbol names while linking

限于喜欢 提交于 2020-01-14 09:32:14
问题 A software I am working on ships with NETLIB BLAS/LAPACK embedded into its sources using all-lowercase symbol names but now while porting the application to windows I discovered that Intel MKL and several other BLAS/LAPACK implementations for this platform use all-uppercase symbol names. Is there a way to tell the gnu compiler/linker to ignore case while matching symbol names? . . . undefined reference to `_dgeqp3' . . . $ nm /lib/LAPACK.lib | grep -i " T _dgeqp3" 00000000 T _DGEQP3 回答1: The

Is it possible to link against a Windows .dll+.lib file combination using gcc/g++ under Cygwin?

爱⌒轻易说出口 提交于 2020-01-14 09:03:27
问题 I know how to link against libraries in Unix-ish contexts: If I'm working with .a or .so files, I specify the root search directory with -L/my/path/to/lib/ and for libMylib I add -lMyLib . But what if I have a .dll (e.g. in the Windows\System32 directory)? a .dll (in Windows\System32 ) and a .lib (someplace else)? These DLLs are by some other party; I don't have access to their sources - but do have access to the corresponding include files, against which I manage to compile. 回答1: If you can

Apply either --enable-shared or -fPIC on in Code::Blocks

♀尐吖头ヾ 提交于 2020-01-14 04:40:08
问题 As the question states, I need to apply either of those compiler/linker settings. I am using Code::Blocks 10.05. I've looked through all the build settings screens. I cannot find where to apply these settings. I am getting the following on output: -------------- Build: Release in 39dll-4-Linux --------------- Linking dynamic library: ./39DLL.so /usr/bin/ld: obj/Release/buffer.o: relocation R_X86_64_32 against `CBuffer::retval' can not be used when making a shared object; recompile with -fPIC

Cython unable to find shared object file

只愿长相守 提交于 2020-01-13 16:29:13
问题 I am trying to link to my own C library from Cython, following the directions I've found on the web, including this answer: Using Cython To Link Python To A Shared Library I am running IPython through Spyder. My setup.py looks like this: from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize import numpy as np setup( ext_modules = cythonize( [Extension("*",["*.pyx"], libraries =["MyLib"], extra_compile_args = ["-fopenmp","-O3"], extra

Search path for a DLL referenced by a plug-in DLL

余生颓废 提交于 2020-01-13 14:36:10
问题 I'm writing a Windows application plug-in (as a DLL) in native C++. Let's call it myplugin.dll . My plug-in references another DLL which we'll call other.dll . My plug-in is installed in the myplugin subdirectory of the application's plugins directory: application.exe plugins\ myplugin\ myplugin.dll myplugin.dll links implicitly to other.dll . I cannot delay-load other.dll because it exposes classes with virtual methods, and virtual method tables being considered as data, they cannot be

Search path for a DLL referenced by a plug-in DLL

风流意气都作罢 提交于 2020-01-13 14:31:14
问题 I'm writing a Windows application plug-in (as a DLL) in native C++. Let's call it myplugin.dll . My plug-in references another DLL which we'll call other.dll . My plug-in is installed in the myplugin subdirectory of the application's plugins directory: application.exe plugins\ myplugin\ myplugin.dll myplugin.dll links implicitly to other.dll . I cannot delay-load other.dll because it exposes classes with virtual methods, and virtual method tables being considered as data, they cannot be

Happily linking incompatible types leads to chaos

南楼画角 提交于 2020-01-13 11:43:32
问题 I've been trying to figure out some boundaries of g++ , especially linking (C++) object files. I found the following curiosity which I tried to compress as much as possible before asking. Code File common.h #ifndef _COMMON_H #define _COMMON_H #include <iostream> #define TMPL_Y(name,T) \ struct Y { \ T y; \ void f() { \ std::cout << name << "::f " << y << std::endl; \ } \ virtual void vf() { \ std::cout << name << "::vf " << y << std::endl; \ } \ Y() { \ std::cout << name << " ctor" << std:

Happily linking incompatible types leads to chaos

旧时模样 提交于 2020-01-13 11:43:25
问题 I've been trying to figure out some boundaries of g++ , especially linking (C++) object files. I found the following curiosity which I tried to compress as much as possible before asking. Code File common.h #ifndef _COMMON_H #define _COMMON_H #include <iostream> #define TMPL_Y(name,T) \ struct Y { \ T y; \ void f() { \ std::cout << name << "::f " << y << std::endl; \ } \ virtual void vf() { \ std::cout << name << "::vf " << y << std::endl; \ } \ Y() { \ std::cout << name << " ctor" << std:

Imported files not recognized in OCUnit

六月ゝ 毕业季﹏ 提交于 2020-01-13 10:12:12
问题 I am doing unit testing on my iPhone app using OCUnit on XCode 3.2.3, and iOS 4.0. I have successfully set up my testing environment to pass and fail basic tests appropriately, but when I import my own files (in this case, "UserAccount.h", it fails to compile and tells me: "_OBJC_CLASS_$_UserAccount", referenced from: It then says "Symbol(s) not found". This strikes me as some sort of linker error, but I have no idea what's going on. I have built and cleaned all targets numerous times, but to

Imported files not recognized in OCUnit

折月煮酒 提交于 2020-01-13 10:11:05
问题 I am doing unit testing on my iPhone app using OCUnit on XCode 3.2.3, and iOS 4.0. I have successfully set up my testing environment to pass and fail basic tests appropriately, but when I import my own files (in this case, "UserAccount.h", it fails to compile and tells me: "_OBJC_CLASS_$_UserAccount", referenced from: It then says "Symbol(s) not found". This strikes me as some sort of linker error, but I have no idea what's going on. I have built and cleaned all targets numerous times, but to