We have static lib project, and other "sample" project.
I added static lib project as a subproject to "sample" project and also to target dependancy.
When I run "sample" brakepoints work properly, but not in subproject (static lib).
Is it possible somehow to debug my subproject, or it's impossible if it's static lib?
UPDATED
Fixed:
For some reasons "Generate Debugging symbols" flag was set to NO
Create one workspace and put it as separate projects. Now You need to add static lib in sample project. So add library from sub project product folder (where your lib get created) as reference. It will work also for debugging and whenever you will build for static lib that changes will reflect in sample project also.
Related
Is there a way to configure an eclipse-java-project that way, that it uses the same class-path-configuration than an other project.
This project will contain test-classes that should work in the same environment than the 'original'.
Make your test project depend on your product project. Then in the product project's build path properties page, make sure that all build path entries are exported. This will make them visible to the test project.
I'm trying to share code between multiple Xcode projects. I've followed Apple's notes on creating a static library subproject within a project:
http://developer.apple.com/library/ios/technotes/iOSStaticLibraries/iOSStaticLibraries.pdf
This works great! However, when I follow the same instructions using my own project, I find that the header files I make public in the static library can not be found by code within my app.
This is because my project uses custom build configurations. I have one for Ad Hoc builds, App Store builds, etc.
For example: when I build the project using a build config called "Ad Hoc", the static library subproject builds the Release configuration and copies its public headers to a folder called "Release". The main project then fails to build, complaining that it can't find headers that I'm importing from the static library. The errors appear in the Issue Navigator as: Lexical or Preprocessor Issue
So my question is: how do you set up a static library as a subproject of a project that has build configurations that the library doesn't?
I came across this issue when making my custom project templates.
Add "$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)" to the "Header Search Paths" and "User Header Search Paths" for any build configurations you use Archive with and make sure it is set to be "recursive" as opposed to "non-recursive". This will tell your app to search the "Release" directory in your build directory for header files.
The problem is that for Debug builds ALL header files are copied to a single directory under derived data. But when you archive the files are copied to a folder named after the build configuration. So when you do a "Ad Hoc" build all your files get copied to the "Ad Hoc" folder but your static libraries files get copied to the "Release" folder. These folders sit side by side beside one another and unless told to do so the header files will only be searched for under the "Ad Hoc" folder.
Here is the GitHub commit for my project templates where I fixed the problem
https://github.com/reidmain/Xcode-5-Project-Templates/commit/e465aa3d5c82118cc0d5af3a7f6f094d86b1ec63
So, I'm working on a project and can't get my XCode 4 workspace to behave. I have the main application as one project in the workspace. I then add the static library project into the workspace. It seems like everything is working okay. I can import files from the other project. It builds, but when I run it, I get this:
dyld: Symbol not found: _OBJC_CLASS_$_iGBC
Referenced from: /var/mobile/Applications/CD00CC83-28E4-4467-96C0-0D1777E21FDA/GBA4iOS.app/GBA4iOS
Expected in: flat namespace
in /var/mobile/Applications/CD00CC83-28E4-4467-96C0-0D1777E21FDA/GBA4iOS.app/GBA4iOS
And crashes. It appears that although Xcode believes the library has been linked, and it builds and runs, the app doesn't actually have the library. But in the derived data folder, it looks like everything that should be there... is there.
I'm going insane with XCode and all it's nuances in settings. Are there sanity checks I can go through to ensure this is working properly? What else can I do?
Edit:
Project settings are valid, and I've already linked the libraries.
Edit 2:
My workspace is setup so the libraries are also in the workspace:
I have removed the lib.a file from the main project and removed it from the Build Phase section, and added it back numerous times. There is no "copy library into destination folder" option when adding it in this way, so I can't do that.
try clean your build, if it don't work, remove the library in build phase and your project folder. When adding the lib to your project, check "copy item to destination if needed", the add that lib in build phase.
I am building an iOS, code scanner project using ZBar SDK. I am trying to build my project directly from the source of ZBar, rather than including the libzbar.a static library.
I have downloaded the ZBar source which includes the XCode project to build libzbar.a. I tried copying all source files from the project but it didn't work. I keep on getting undefined symbol errors.
What source files should be included, considering that I need to support only iOS?
Should the folder structure be strictly followed to build the project?
Would there be any need of build settings if I direcly include the source files?
EDIT:
I followed the same folder structure and build settings used in the XCode project of libzbar. I have managed to build the library but it's still failing while linking. I get the error: ld: duplicate symbol _OBJC_METACLASS for all the source files. I have double checked, there are no references to the original libzbar.a static library in the project or more than one occurrence of these source files. If I remove the references for them, the project builds fine, but then fails whenever any symbol from the library is referenced. I think I am still missing something!!
I have solved this problem finally. Here are the steps that I did:
1) Copied the source files of the project to my project.
2) Removed the dependency of libzbar.a from my project.
3) Added the path to the folder containing the source and headers to the Header Search Paths build setting of the project.
4)Added the following user defined build setting to the project:
EXCLUDE_SOURCE_FILE_NAMES
GCC_MODEL_TUNING
PREBINDING and
USE_HEADERMAP
You should create the static library your self from the source code then add the output static library to your project, or link the projects together and force a build of the static library before your project is build.
After downloading the zip file from the default Mercurial repository and opening the file in xCode, click on the "EmbedReader" part of the target selection drop down box and switch to "zBarSDK"
Once you switch to the zBarSDK, just build from the product menu and you should have your static library file....
I used ZXing lib before and it integrated well. It was included as a project and main project has target dependency to build it before main project. I edited it's sources for my needs and have no problems working with it.
I used this tutorial. It can be helpful for your needs too.
I have a project which builds into a single JAR in Netbeans.
However, to implement a basic auto update feature, I would like to move at least one of the packages (the HTTPClient package) to a separate JAR, as well as build a new JAR with a second Main Class in a different package.
That way both the current Mainclass and the Updater Mainclass can use the same HTTPClient package.
But... HOW?
Something to do with the build-impl.xml file. But where? What to change?
You could create a separate project for your HTTPClient package which creates a single jar file.
Your main project then uses this project (and the created jar). You can use "Add project..." at the libraries of your main project and select the HTTPClient project.