linker-errors

Swift linker error in release build fixable by adding code

穿精又带淫゛_ 提交于 2019-12-22 17:39:15
问题 In Xcode 8, a Swift project of mine works in Debug mode but fails to link in Release mode: Undefined symbols for architecture x86_64: "Swift.UnsafeMutableBufferPointer.(subscript.materializeForSet : (Swift.Int) -> A).(closure #1)" I can fix the error by changing this line: let nextPeriod = currentSchedule.periods.filter({ $0.startDate > now }).sorted(by: { $0.startDate < $1.startDate }).first to: let nextPeriod = currentSchedule.periods.filter({ $0.startDate > now }).first but that obviously

OCMock 3.0.2 linker error with .mm test file

断了今生、忘了曾经 提交于 2019-12-22 08:23:51
问题 I am using OCMock 3.0.2, which I've installed through cocoapods for my test target: platform :ios, '7.0' xcodeproj 'myProject.xcodeproj' target :myTestTarget do pod 'OCMock', '~> 3.0.2' end link_with "myTestTarget" In my test file (myTest.mm), I've included OCMock and want to try out the new verify-in-place strategy, like so: - (void) test_myTest { MyObject *obj = [MyObject new]; id robotMock = OCMPartialMock(obj); [obj testMethod]; // some asserts OCMVerify([obj _internalMethodToBeCalled]);

Link Errors in Unmodified Visual Studio 2012 MFC Template when Statically Linking MFC

◇◆丶佛笑我妖孽 提交于 2019-12-22 06:57:47
问题 When creating a new MFC application of the simplest kind in Visual Studio 2012, and setting it to link statically to MFC, linking fails. Here's a gallery of 7 screenshots starting from the creation of the project via the wizard, up to the building (resulting in the linker error). No source editing was done in-between. The error logs state: 1>------ Build started: Project: Test, Configuration: Debug Win32 ------ 1> stdafx.cpp 1> TestDlg.cpp 1> Test.cpp 1> Generating Code... 1>uafxcwd.lib

No changes in testflight libraries and Xcode 5 now says “ld: library not found for -lTestFlight”

ぐ巨炮叔叔 提交于 2019-12-22 06:06:11
问题 I've been creating some app for some months, and suddently Xcode 5 doesn't want to build it. It just complains with the following error. Ld build/Debug-iphonesimulator/appname.app/appname normal i386 cd /Users/myname/proyectos/appname/dev/iOS/appname setenv IPHONEOS_DEPLOYMENT_TARGET 5.1 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications

How can I link my C code with the PCRE library? (Linker errors currently being thrown.)

旧时模样 提交于 2019-12-22 05:51:14
问题 The Problem Note: I originally had this problem in a much larger project; so I pared the code down to the test case you see below. I cannot figure out how to get the following test code to compile. Specifically, it appears as if the linker cannot find the PCRE library (see below for how PCRE was configured). And this despite the explicit -L/usr/local/lib -lpcre being passed to the linker (PCRE is installed in the /usr/local directory structure). What am I doing wrong? :-( The console output

FIRApp Linker Error [“_OBJC_CLASS_$_FIRApp”]

浪尽此生 提交于 2019-12-22 04:26:31
问题 I have scoured SO and Google but can't find an answer that works. I have used the new Firebase Cocoapod on multiple projects but now, when adding it to a different project I am getting the following error. I am using Xcode 7.3.1 with cocoapods 1.0.1. Here is my podfile: Any help is greatly appreciated! 回答1: Go to Build Settings > Other Linker Flags > on a new line $(inherited) . Do a Cmd+Ctrl+K for a clean, and then build. 回答2: Uncomment this line to define a global platform for your project

Whole program optimization failing in VC2008

家住魔仙堡 提交于 2019-12-22 04:09:15
问题 I have a reasonably large C++ program (~11mb exe) compiled under VS2008 and was interested to see if whole program optimization would significantly affect its performance. However, turning on whole program optimization and link time code generation causes the link to fail as follows; 1>c:\cpp\Win32\Atlas\tin\TINDoc.Cpp : fatal error C1083: Cannot open compiler intermediate file: '.\releaseopt\TINDoc.obj': Not enough space 1>LINK : fatal error LNK1257: code generation failed Looking at task

unable to link to fftw3 library

有些话、适合烂在心里 提交于 2019-12-21 13:03:06
问题 I am compiling a test program to test the fftw3 (ver3.3.4). Since it is not installed with root previlidge the command I used is: gcc -lm -L/home/my_name/opt/fftw-3.3.4/lib/ -I/home/my_name/opt/fftw-3.3.4/include/ fftwtest.c where the library is installed in /home/my_name/opt/fftw-3.3.4/ My code is the 1st tutorial on fftw3's website: #include <stdio.h> #include <fftw3.h> int main(){ int n = 10; fftw_complex *in, *out; fftw_plan p; in = (fftw_complex*) fftw_malloc(n*sizeof(fftw_complex)); out

Is there a way to detect inline function ODR violations?

我只是一个虾纸丫 提交于 2019-12-21 07:14:16
问题 So I have this code in 2 separate translation units: // a.cpp #include <stdio.h> inline int func() { return 5; } int proxy(); int main() { printf("%d", func() + proxy()); } // b.cpp inline int func() { return 6; } int proxy() { return func(); } When compiled normally the result is 10 . When compiled with -O3 (inlining on) I get 11 . I have clearly done an ODR violation for func() . It showed up when I started merging sources of different dll's into fewer dll's. I have tried: GCC 5.1 -Wodr

Cannot link Boost regex

霸气de小男生 提交于 2019-12-21 03:43:06
问题 I am currently trying to compile a Contraction Hierachies implementation by KIT which requires Boost::Regex. The supplied Makefile already makes sure (and I have also double-checked this manually) that g++ is supplied with the -lboost_regex switch. If the library is not installed, g++ will complain. So I installed the library from my package sources and tried compiling again. This time I am getting a huge load of linker errors regarding Boost::Regex. Here is a short excerpt: main.o: In