linker

Can you copy linker/additional dependancies etc to other projects

情到浓时终转凉″ 提交于 2019-12-24 17:06:35
问题 I consistently have to add directx lib files etc to all of my projects, dependencies, linker stuff etc... Is there a file I can copy across that has all that stuff.. and I just copy it to every project that needs it? 回答1: Yes. You have the option of creating a property sheet that can be added to new or existing projects. Here are the basic steps. Open the Property Manager (View menu). Right click on a project and select "Add New Property Sheet" Once the property sheet has been created/added

Linking Python into my C++ code on windows - linker error

拈花ヽ惹草 提交于 2019-12-24 16:29:12
问题 I have an error trying to link python into my C++ code. This is the error line I am getting: C:\Python27\libs/libpython27.a(dmmes00855.o):(.idata$7+0x0): undefined reference to `_head_C__build27_cpython_PCBuild_libpython27_a' collect2.exe: error: ld returned 1 exit status For background, here is minimal case: #include <Python.h> int main() { Py_Initialize(); } I am using scons to build: import os env = Environment(ENV = os.environ) env.Append(CPPPATH = "C:/Python27/include/") env.Append

g++ linking and swig

只愿长相守 提交于 2019-12-24 15:27:01
问题 I have a cpp file with functions that I'm using in python with SWIG. I use the following commands to compile the source and create the file to use with python. swig -c++ -python mini.i g++ -O2 -c mini.cpp -I/usr/include/python2.4 -I/usr/lib/python2.4 g++ -O2 -c mini_wrap.cxx -I/usr/include/python2.4 -I/usr/lib/python2.4 g++ -shared mini.o mini_wrap.o -o _mini.so I'm trying now to use GSL in my source cpp source file. If I was just compiling the GSL file I would do g++ -lgsl -lgslcblas -lm -o

Multiple decorated/mangled versions from the same function in a single library

我与影子孤独终老i 提交于 2019-12-24 15:19:11
问题 When you dump the external symbols of a library, you may find there are multiple versions of the same function name; such as the case with printf function from the C library, you will find names like __imp__printf _printf ___imp___printf_l Why there is no just one version of the function? When I tried to see which OBJ member in the library they are belong to, I found that they all belong to the same OBJ file (an import library) that have only one version, which is _printf , and this is the

Creating shared object from static library whose object files were linked with -fPIC

删除回忆录丶 提交于 2019-12-24 14:30:18
问题 For a project we are trying to create a shared object file that exports a set of functions specified in libname.exports . Of course we know that the object files from which the .so file gets linked have to be created using -fPIC , so that has been taken care of. We then combined the object files into an archive named libname.a . This should now be the basis for the .so file to be created - or so was the idea. We're passing libname.exports to --retain-symbols-file , so the expected behavior

How to use the Microsoft Linker /Export parameter

吃可爱长大的小学妹 提交于 2019-12-24 13:52:36
问题 I would like to export functions from my object files manually with the Microsoft Linker. It works fine when I use the parameter for every function like this: /Export:ExportedFunction1$qqsv /Export:ExportedFunction2$qqsv and so on... The linker then automatically assigns the ords properly. However in the export table the actuall export name is " ExportedFunction1$qqsv/ExportedFunction2$qqsv/etc.. " I tried the parameter doing like this: /Export:ExportedFunction1$qqsv,1,ExportedFunction1

Solve ld linker issues for building R source

梦想的初衷 提交于 2019-12-24 13:28:34
问题 While trying to install R from source, I ran into linker issues, in particular: undefined reference to 'u_getVersion_58 I found limited information on this error (eg, this post on the RStudio forum). Despite running apt-get build-dep , these issues persisted. It is apparent from these comments by Dirk Eddenbuettel that it relates to libicu versions. I have libicu version 60, while R 3.6.0 and similar recent versions seem to require version 58. 回答1: We can install a previous version of libicu

N-Dependency injection in C - better way than linker-defined arrays?

你。 提交于 2019-12-24 13:04:03
问题 Given a library module , in the following called Runner , which resides as a reusable component (no recompilation required, i.e. static link library) in the app partition of the architecture, not the main partition . Note that it only contains main() for demo purposes. Given a set (order irrelevant) of other modules / objects called Callable s, i.e. Callable1 , Callable2 and Callable3 , which also reside as reusable components in the app partition . Runner has a runtime dependency on the

Using ARPACK++ on Windows with Visual Studio

主宰稳场 提交于 2019-12-24 12:58:24
问题 in my quest to solve eigenvector problems of symmetric, real matrices quickly (I only need the first N eigenvalues and vectors, where "first" refers to the one with largest (real) value), I'm trying to get ARPack++ running on Windows. I use MSVS 2010 for development. I'm currently in linker hell. I'm also not a 99 years C++ professional who eats bits for breakfast. First, ARPACK++ is a header-only library, that's good! It depends on ARPACK, and ARPACK again has required dependencies on BLAS

Multiple problems linking mysqlpp_d.lib

喜夏-厌秋 提交于 2019-12-24 12:46:26
问题 Today I added a class which manages the connection to a MySQL Server. It will be multi-threaded, so I want to use mysql++. I downloaded the newest version and compiled it in debug mode without any errors. Once I added the compiled mysqlpp_d.lib to my solutions, and of course the other requirements too (mysql 5.0 include and lib), I got some linker errors. Error 17 error LNK1169: one or more multiply defined symbols found C:\Users\root\Documents\Visual Studio 2010\Projects\C++\xxxx\binaries