Using a static library in Qt Creator
LIBS += -L[path to lib] -l[name of lib] Note! that filename of lib: lib[nameOfLib].a and you have to pass only original part -l[nameOfLib]
LIBS += -L[path to lib] -l[name of lib] Note! that filename of lib: lib[nameOfLib].a and you have to pass only original part -l[nameOfLib]
I ran into a similar problem myself. @graver‘s solution is definitely valid. The issue was that the library was being built for armv7 instead of armv7s. You can verify this yourself by using lipo <path/to/lib.a> -info. Setting the Build Active Architectures Only option to No fixes the issue. Hope this helps.
For anyone still having this issue, doing this solved it for me. Add this to your test target build settings. HEADER_SEARCH_PATHS = “${SRCROOT}/Pods/Firebase/CoreOnly/Sources” Full discussion can be found on firebase GitHub issues. you can find HEADER_SEARCH_PATHS in Test Target > Build Settings > Search Paths > Header Search paths. Just incase you cant find HEADER_SEARCH_PATHS … Read more
But everything works well with other C programs linking this library. Did you notice that C and C++ compilation create different symbol names on object file level? It’s called ‘name mangling’. The (C++) linker would show undefined references as demangled symbols in the error message, which might confuse you. If you inspect your test.o file … Read more
Sascha’s answer got me on the right track. Merging a compiled .mom file from a static library into the .mom file from a host project was relatively simple. Here’s a trivial example: Create a new XCode Static Library project called MyStaticLibrary Create an .xcdatamodel file in MyStaticLibrary called MyStaticLibraryModels.xcdatamodel, add some Entitys, then generate the … Read more
For XCode 5. These answers seem a bit out of date. You can see the main steps here http://www.raywenderlich.com/41377/creating-a-status-library-in-ios-tutorial . But Xcode 5 does a lot more work for you and now works nearly as you want it to. 1.Create new Static Library App in Xcode 2.You can delete any files it creates and add … Read more
As said in similar question iOS Static Library as a Subproject of a Project That Has Custom Build Configurations?, the fix is to add this line $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME) to your target’s Framework Search Paths, Header Search Paths and/or Library Search Paths
UPDATE: Volley is now official and is available through the JCenter. Here’s how to import it: implementation ‘com.android.volley:volley:1.1.1’ DEPRICATED WAY: Late to the party, but was able to import it by adding this to the build.gradle file: dependencies { compile ‘com.mcxiaoke.volley:library:1.0.19’ } Here is the link to unofficial Maven repo NOTE: Volley v1.0.19 is current … Read more
When you build the library normally, with ENABLE_BITCODE=YES, Xcode adds the build flag -fembed-bitcode-marker to any clang invocation, placing an “empty” bitcode in the final o file. So, if you look to the compile action in the build phase, it will look something like: CompileC {build_path}/StaticBitcode/StaticLogger.o StaticBitcode/StaticLogger.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd {path}/StaticBitcode export LANG=en_US.US-ASCII … Read more
Use dumpbin /headers The machine type is almost the first line you’ll get. It will be 14c for x86 and 8664 for x64 n:>dumpbin lib642.lib /headers Microsoft (R) COFF/PE Dumper Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file lib642.lib File Type: LIBRARY FILE HEADER VALUES 8664 machine (x64 Or n:>dumpbin Lib32.lib … Read more