I'm using xcode 4.02, iOSSDK4.3, YAJL 0.2.24.
I copied the YAJL.framework folder over to the iPhoneOS4.3sdk frameworks dir and then added the framework to my xcode project (Build Phases - Link Binary with Libraries)
Build settings - Other linker flags I added -ObjC -load_all to both Debug and Release.
Under Framework SearchPaths I added YAJLiOS.framework to both Debug and Release.
I try to compile my project and the header file is not found?
I'm missing something...
whoops.. the Frameworks Search Paths should be set to parent dir of the framework.. for example /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks
Related
I am using xcode 12.4 and In a macOS/OSX project I am getting a linking error Library not found.
The mac os app is using a C++ library that is being successfully built in the xcode workspace, but the linker fails to find it
I have added that dependency Cpp library in the "Link binary with Libraries" (Build phases)
I think my Library search paths setting in Build Settings is not correct, linker search hardcoded path which was set on different machine where project was first built.
The output of workspace which includes the C++ library is in the Derived data, how can I specify derived data or Build path as variable and use it to point to C++ library folder , so that even on different machine project is built without searching any hard coded library paths ?
Thanks,
Ahmed
When CMake is used to generate an Xcode project, the CMakeLists.txt file is included in the Project Navigator window so it is easy to click on and edit. I have written a CMake file that includes some utility functions in CMakeUtils.txt and is then included with INCLUDE(../CMakeUtils.txt). How can I make this file appear below the main cmake file in the Project Navigator?
If I add this file as a RESOURCE it will be included with the executable, and that's not right. How do I add a compile-time resource to be listed in Project Navigator but not included with the code?
For example, the following CMakeLists.txt file would contain the cmake file but not its includes. The associated test.cpp and CMakeUtils.txt files can be empty:
INCLUDE(CMakeUtils.txt)
CMAKE_MINIMUM_REQUIRED (VERSION 3.17.2)
PROJECT(demo_include)
ADD_LIBRARY(test test.cpp)
I updated my xamarin.android packages to the latest version and make the target framework is AndroidQ
but now I can't build the project when used Linker properties "SDK Assemblies only"
how I can exclude monkeyCache.SqlLite from linking assemblies
You can exclude assemblies from linking
editing .csproj file :
<PropertyGroup><AndroidLinkSkip>MvvmCross;MvvmCross.Plugin.Messenger</AndroidLinkSkip>
via project properties -> Android Options
I am trying to use CMake to build a library (which in turn links to other libraries built via CMake). I am having a couple of issues with this process and would love to have some guidance.
For the library, I have a CMakeLists.txt which essentially has
set(SRC srcfile1.cpp srcfile2.cpp)
set(HEADERS srcfile1.h srcfile2.h)
add_library(myLib ${SRC} ${HEADERS})
INSTALL(FILES ${HEADERS} DESTINATION “include/myLib”)
For a “Unix Makefiles” generator, with cmake command
cmake -DCMAKE_INSTALL_PREFIX=. -DCMAKE_BUILD_TYPE=debug -G “Unix Makefiles” ..
I get an appropriate debug library libMyLib.a in build/src. For a release build type, a release build of libMyLib.a is placed in build/src
However, for an Xcode generator, the library is placed in src/Debug. The issues I am facing here are
a. Doing an Archive in Xcode doesn’t seem to have any effect. I don’t see a corresponding Release library being created anywhere
b. I also have a myLibTests target (which uses googles gtest) which is defined in it’s CMakeLists.txt as
set(SRC myTest.cpp)
add_executable(myLibTests ${SRC})
add_dependencies(myLibTests myLib gtest)
set(gTestLib External/src/gTestLib)
target_link_libraries(myLibTests myLib gTestLib)
When the cmake generator is “Unix Makefiles” myLibTests build, links and runs fine. gTestLib is placed in External/src/gtest-build/. But, when it is “Xcode”, it can’t find the gTest libraries. because, the library is placed in External/src/gTestLib/Debug(or Release) as the case may be (and the above path set in CMakeLists.txt is no longer valid). I am not sure how to set it’s path appropriately in the above set statement.
Since, debug/release is controlled in Xcode (and the configure process in CMake is unaware of this), I assume there isn’t a way to separate the release/debug builds of the gTestLib and also have CMake configure Xcode to pick up the appropriate version while building myLib i.e if I do a debug build of myLib it also does a debug build of gTest and links to it (similar for release builds)? Alternatively, is it possible to configure Xcode to place both the Debug and Release builds in the same location (and then hardcode it’s path above)? What would be the best way of configuring this?
Thanks
I am using Eclipse to build Android App that contains 3 sub projects:
Structure of the application is below:
MyApp (Android Application, dependency is set to JNIWrapper)
|___ JNIWrapper (JNI wrapper for SharedLib, dependency set to SharedLib)
|____ SharedLib (contains native c/c++ API's, originally developed for Windows)
Application builds OK with with release (striped) version of the shared lib from libs/$APP_ABI folder.
How do I force Eclipse to include objects from obj/local/$APP_ABI folder instead in the APK file?
I've set the project dependencies and final the APK seems to have everything I need for a release build.
My main issue is, I am unable to set break points in JNIWrapper and in SharedLib code.
Thanks in advance for the help.
- NK
EDIT --
I've built release objects with debug symbols (with APP_OPTIM := debug and APP_CFLAGS += -g -ggdb -O0 -DDEBUG) . Now I can set break points in JNI and .so files.
But binaries in obj/local/x86 are substantially bigger (800KB Vs 1.5MB) than binaries in libs/x86; I am not sure what extra debugging info I am missing in libs/x86 folder.
EDIT2 --
I've added APP_CPPFLAGS += -ggdb3 -O0 -gdwarf-2 -Wall -DDEBUG; now I can step through and see variable values during debugging in native code.
Issue closed...
For what it's worth, the NDK tools have some level of debug support built-in, without shipping your symbolized shared libs. Have a look at docs for ndk-gdb.