I have to try to use dlib for my project.
However, when I try to build it, I receive a message about:
"_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives"
For solving this issue
I tried to add it new project
I deleted every existing path or data
I tried to build it on "Release mode"
I have still receive a message:
"_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives"
Please, solve my curiosity!
You can check the link for dlib integration. Also check the following things for configuration.
1.Header search path for the lib folder. for e.g. $(PROJECT_DIR)/lib where lib folder contains libdlib.a and dlib header files.
2.Check the Preprocessor macros in build setting whether properly
set or not.
3.Create the Objective c++(change .m to .mm extension) wrapper class which can execute both c++ and objective c code.
*Note import dlib header files in wrapper class not in the main.m or app-delegate otherwise it will gives error.
Also check the Reference.
Related
I already finished my project, it works and runs perfectly on the simulator or in my own device. When I select to Archive the project to upload de build to Itunes Connect, I get all these compile errors
"Use of undeclared type MBProgressHUD"
"Use of unresolved identifier MPProgressHUD"
And so on..
NOTE: I'm using CocoaPods for this library
What solved it for me was adding import MBProgressHUD in the classes where I use this library, not only in the Bridge-Header.h
Navigate to your project build settings and find the “Swift Compiler – Code Generation” section (You may find it faster to type in “Swift Compiler” into the search box to narrow down the results)
Next to “Objective-C Bridging Header” you will need to add the name/path of your header file. If your file resides in your project’s root folder simply put the name of the header file there. Examples: “ProjectName/ProjectName-Bridging-Header.h” or simply “ProjectName-Bridging-Header.h”.
Refer this link http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/
Welcome to Cocoapods Hell (a.k.a. : where the magic ends), where one must dive into his project build settings and make sense of what went wrong...
It's very hard to answer to you, as any number of reasons might be causing that.
Do you use the same target for Build / Run & Archive ? It might be because your libPods.a isn't copied into your Archive target
Have you installed Pods using pod install , have you tried playing that command again. (yes, faced with magic going wrong, one can sometimes rely on magic to save him again)
'Build' and 'Archive' product often differ in the build configuration they use (Build most of the time uses 'debug' configuration, while Archive uses 'release' configuration... ). Check your Pods configuration files (debug/release) and make sure they both include your MBProgressHud. Also, in your Project 'Info', check which pods Xcode configuration files are selected for 'debug' and 'release'
Good luck !
(PS : as MBProgressHud is a single file, and one you can often change, another solution is to get rid of Cocoapods and just copy/paste it)
I am getting familiar myself to LLVM, and my goal is to implement a back-end for my custom processor.
Before I jump into my back-end implementation, I first try to learn how a build procedure works, so I first copy lib/Target/MSP430 to lib/Target/myproc, and build llvm targeting "myproc" (even though it actually is a back-end for MSP430, I did this just to learn how I can add a new target to LLVM).
When I configure/make llvm, I got the following error message.
...
/bin/cp: cannot stat `/mydir/build/lib/Target/myproc/Debug+Asserts/MSP430GenRegisterInfo.inc.tmp': No such file or directory
...
I checked /lib/Target/myproc, and saw there was only one file, Makefile, copied from /lib/Target/myproc.
Here is what I have done before I configure and make.
In my LLVM source directory, copy lib/Target/MSP430 to lib/Target/myproc.
Modify configure and projects/sample/configure to add "myproc".
Go to lib/Target/myproc and change "MSP430" to "myproc" in MSP430.td, LLVMBuild.txt, and Makefile (I also modify the files in subdirectories).
As the LLVM compile works for other targets on my machine, I believe it's not the problem of machine of tools that I am using, but the problem of my modification.
Am I missing something? Are there any further modifications that I am supposed to make?
There's a decent tutorial for writing backends here:
http://llvm.org/docs/WritingAnLLVMBackend.html
There's also this tutorial from a dev meeting:
http://llvm.org/devmtg/2012-04-12/Slides/Workshops/Anton_Korobeynikov.pdf
*GenRegisterInfo.inc comes from running tblgen on the target .td file. The .inc output file name depends on what the .td files are named in the myproc/ target directory.
It would be helpful to see more of your make log but my guess is that you're getting a tblgen error when processing .td files in myproc/. That tblgen error is the real problem you need to diagnose and address.
In Processing, I have the following error :
No library found for bezierVertex
Libraries must be installed in a folder named 'libraries' inside the 'sketchbook'
I am trying to run "exemplePPhys2D_geeknessrain.pde", that can be found at
https://projets.pingbase.net/libro/projects/hub/repository/revisions/7/entry/EXEMPLES/pphys2d/examples/exemplePPhys2D_geeknessrain/exemplePPhys2D_geeknessrain.pde
The error is puzzling, since I did install the bezierVertex.jar library in
.\pphys2d\examples\exemplePPhys2D_geeknessrain\libraries, under
.\pphys2d\examples\exemplePPhys2D_geeknessrain (which is what Processing shows as the sketch folder)
I searched the net (a lot), and I saw that some of the proposed solutions included other paths (see Wiki), like :
C:\Users\.........\Documents\Processing\libraries
C:\Users\.........\Documents\Processing\libraries\libraries
I now have the bezierVertex.jar library in all of the above.
However, Processing is still not finding it, and there's no way to just browse to the jar file from within Processing. The import library option does not seem to be able point to local folders (this would make things easier).
What am I missing ?
Thanks for your advice !
You have to copy bezierVertex.jar in the libraries folder within your sketchbook.
On Windows:
C:\Documents\Processing\libraries\bezierVertex\library\bezierVertex.jar
On Mac OS X / Linux:
~/Documents/Processing/libraries/bezierVertex/library/bezierVertex.jar
If you just want to use the library for one project you can copy the jar-file into a code-folder within your sketch directory, i.e. ~/Documents/Processing/MySuperSketch/code/bezierVertex.jar
So frustrated with XCode right now. I can build and run from code perfectly fine. However, trying to archive is a disaster.
I created a project, then dragged the .xcodeproj into XCode on the project navigator. Shows up fine, cool. Parent project build settings:
Other linker flags: -all_load, -ObjC
Target Dependencies : CocoaLibSpotify (subproject I'm incorporating)
Link Binary with Libraries : libCocoaLibSpotify.a
When I build my project, the following lines work
#import "CocoaLibSpotify.h"
#import <CocoaLibSpotify.h>
However, when I archive, my project fails to find these files. It's worth noting that the subproject files aren't in the same directory as the parent project. However, isn't that the point of the target dependency/link binary with library? Why is it failing to archive? This seems like it should be a lot easier than it's being.
Thanks.
Edit: Errors from compiling
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/AppDelegate.m:12:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/GUI/ViewControllers/LoginViewControll er.h:9:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/GUI/BaseViewController.h:10:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/Managers/Managers.h:9:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/Managers/AppLogicManager.h:11:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/CoreData/CoreDataObjects.h:13:
/Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/CoreData/Track.h:13:9: fatal error: 'CocoaLibSpotify.h' file not found
#import <CocoaLibSpotify.h>
^
1 error generated.`
Archive uses a different directory structure when building, which can be a pain. I've found success by adding the following to the User Header Search Paths build setting of your application's target:
"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include" (including the quotes).
Also, make sure Always Search User Paths is set to Yes.
In addition, I have $CONFIGURATION_BUILD_DIR/include in my Header Search Paths setting, but I don't think that'll help archiving.
I'm using bison parser generator in my Xcode 4 project. I've written custom build rule for generating C++-source file from *.y grammar file:
/usr/local/bin/bison
--defines="${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.hpp"
--output="${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.cpp"
--verbose "${INPUT_FILE_PATH}"
As you can see, Xcode places generated files in $DERIVED_FILES_DIR folder. Now I need to export generated header file grammar.hpp with object files as library.
The problem is that Xcode doesn't allow export files, that aren't included in project.
The first solution, as it seems, is to create a group with absolute path set to $DERIVED_FILES_DIR. Well, it actually works until I change my build settings to build Release configuration, since $DERIVED_FILES_DIR is dependent on build settings.
The second solution is somehow set group path to literally variable, i.e.
path = $DERIVED_FILES_DIR
So far I've found two possible ways to do it: How to reference files with environment variables? and File references relative to DERIVED_FILE_DIR in Xcode. Either way doesn't work for me.
Maybe someone knows better way to add generated files to project?
Your best options are:
Generate the files in your SRCROOT
Generate the files in BUILT_PRODUCTS_DIR
These both have "Relative to..." options that should allow you to add the files to your project.
I ended up generating files in ${SRCROOT} directory with custom make build target using Makefile that handles regenerating derived files. I just added these generated files to project, and made all actual build target depend on this make target.