static-libraries

Build errors C++ with Poco and Qt Creator

一曲冷凌霜 提交于 2019-12-10 10:39:35
问题 I am getting build errors in Qt Creator when trying to build a sample in the Poco library. I used these instructions to build poco with MinGW. This is the sample I am trying to use: // httpget.cpp // // $Id: //poco/1.4/Net/samples/httpget/src/httpget.cpp#3 $ // // This sample demonstrates the HTTPClientSession and the HTTPCredentials classes. // // Copyright (c) 2005-2012, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge,

Symbol not found when static linking on MacOSX

半城伤御伤魂 提交于 2019-12-10 10:33:48
问题 I am trying to create a static library and link it on MacOS X (several versions): File foo.c : char foo[111]; File bar.c : #include <string.h> extern char foo[]; int bar(char *src) { strcpy(foo, src); return strlen(foo); } Create a library: $ cc -c foo.c bar.c $ ar r libfoobar.a foo.o bar.o ar: creating archive libfoobar.a $ ranlib libfoobar.a $ nm libfoobar.a libfoobar.a(foo.o): 000000000000006f C _foo libfoobar.a(bar.o): U ___strcpy_chk 0000000000000000 T _bar U _foo U _strlen Create a

Does gnu ld link in whole object files or only the needed functions?

十年热恋 提交于 2019-12-10 09:26:11
问题 We have a library and an executable, that is to be statically linked to the lib. We want to minimize the program space of the final executable. According to avr-libc's documentation: the linker links in THE ENTIRE OBJECT MODULE in which the function is located On the other hand, my colleagues are unanimous on the point that at some pass, the linker throws away any unused functions. So who is correct or am I misunderstanding something? Is the answer consistent throughout gcc or are we talking

Ambiguous reference and namespace (clash of definitions from the two external libraries)

浪子不回头ぞ 提交于 2019-12-10 05:02:17
问题 I experience the collapse of definitions i can't make sense of. Schematically the problem is as follows: The main project file has two includes: include <lib1.h> include <lib2.h> The first header includes couple of other headers from the library, in one of those there is a direct (not covered with a name-space) definition: template<typename T> class SparseMatrix; The lib2.h has the following inside namespace lib2 { using namespace lib3; class ... { ... SparseMatrix<double> ... ... } } Inside

Weakly link static library via -weak_library

拜拜、爱过 提交于 2019-12-10 03:17:09
问题 Question: Is it possible to weakly link a static library (Obj-C)? Short Details I do want my custom static framework ( MyFramework.framework ) to weakly link my other custom static library ( libMyLibrary.a ). The functionality behind libMyLibrary.a is optional and can be omitted if there is NO libMyLibrary.a being linked by any 3rd party application that uses MyFramework.framework . I am using -weak_library. My test application complains that static linker is unable to find MyLibrary 's

Link error: “Cannot find -ltinfo” on Ubuntu 12.04 on a 32-bit arm processor

谁都会走 提交于 2019-12-10 01:27:02
问题 I get the following link error when I'm compiling a small function using ncurses for an Ubuntu 12.04 running on arm. The error is arm-linux-gnueabihf/bin/ld: cannot find -ltinfo A lot of hints are floating around on what to install, but I can't seem to find any packages that does the trick for my arm box. I have done sudo apt-get install libncurses5-dev And this does not contain the tinfo library. Other suggestions usually result in the library is "not available but referred by another

Using Objective-C code in iOS Cocoa Static Library project with Swift code in iOS Application project

人走茶凉 提交于 2019-12-09 23:02:38
问题 I am looking for a simple procedure for combining an Objective-C code from a shared library project with Swift code from an application project but have had no success so far with this sequence: start Xcode 6.1.1 create workspace Test create iOS Cocoa Touch Static Library project TestLibrary and add it to workspace create iOS Single View Application project Test (language: Swift) and add it to workspace add import TestLibrary to ViewController.swift If I now build Test, I receive this error

Create and use static library on OS X

眉间皱痕 提交于 2019-12-09 19:12:18
问题 OK, I'm trying to create a Cocoa Library (static) and use, but I keep getting errors. I created a super-basic static Library ( TSXLib ) with just one additional class in it. #import <Foundation/Foundation.h> @interface ClassOne : NSObject - (void)doIt; @end #import "ClassOne.h" @implementation ClassOne - (void)doIt { NSLog(@"Oops... I did it again!"); } @end Then, I set the Dynamic Library Install Name (in Build Settings) to : @executable_path/../Frameworks/libTSXLib.a Now in my Test Project

How can we control bass of music in iPhone sdk? [closed]

℡╲_俬逩灬. 提交于 2019-12-09 17:54:15
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I want to control the bass of song played by user from iPod music library. I've searched on Google and got some AudioMixer samples which were of no help, but now I have got bass library i.e. libbass.a from http:/

The .NET equivalent of static libraries?

自作多情 提交于 2019-12-09 13:15:22
问题 I'm building a tool in managed code (mostly C++/CLI) in two versions, a 'normal user' version and a 'pro' version. The fact that the core code is identical between the two versions has caused me a little trouble as I want to package the resulting tool as a single assembly (DLL) and I don't want to have to include the .cpp files for the common code in the projects of the two versions of the tools. I'd rather have a project for the common code and a project for each version of the tool and have