In Xcode I added MailCore as a subproject, and target dependency. It works great on my machine. Sadly when I share the project with another collaborator, he's unable to get the header file to show up.
Somehow his search paths have my folder names hardcoded in (as in andrewjl), is there a way to fix this in order to point to an analogous directory on his machine?
Instead of using an absolute search path, use a relative one.
"$(SRCROOT)" is where your projectfile is located.
"$(SRCROOT)/AnotherFolder" for AnotherFolder is a peer of your project file
once add this variable, to the search path (after double tapping on the searchpaths line), you can add "$(SRCROOT)/Products/MyReceipt.........." and once you dismiss the add/remove searchPath popover, you'll see where the search path is pointing to.
Your search paths are absolute paths. Write them as relative paths (relative to the project).
Related
I want to use the Go plugin facility, and if I call plugin.Open("…") with an absolute path, this works fine. Still, the original docs give the example plugin.Open("plugin_name.so"), thus, it should also work with the simple filename.
However, the docs fail to say what is the search path for these plugins. Do the same rules apply as for any shared library? FWIW, copying my plugin to /usr/lib and calling ldconfig was not sufficient.
If an absolute path is not provided in the plugin path, it is treated as a relative path and as such is always resolved against the current, working directory. So if you pass "plugin_name.so", it must be in the working directory. Normally it is the same folder where the executable binary is, unless the binary was launched from another folder, or the working directory was changed after that.
I have recently started to learn on Android application programming using Android Studio. I have my recent projects in C:/.
However, every time I want to copy or move these projects into another folder, Windows complains that the destination path is too long (the folders name are color and drawable).
So, how can I move these folder from C:/ to somewhere else?
You'll have to move them to a path where the longest path length, with file name, is less than 255 characters. There is no other solution.
I fixed this problem by moving the project via AndroidStudio Refactoring.
Open the project that you want to move.
Change to Project view.
From there you can Refactor, Move your project to your desired directory.
AndroidStudio will take care of this path to long problem.
I run under Max OSX.
I've installed Poedit in /Applications.
The website I have to translate is located in /Dropbox/Sites/mywebsite.
In Poedit preferences I've got to set up the base path and the path of the website. I tried many combinations and each time Poedit tells me something like "no code has been found"...
Do you know how to set up the right path ?
For the benefit of others that may stumble upon this question, the correct solution is to set it up as follows:
The "base path" should be a path relative to the PO file location, e.g. ".." or ".". If you must, and don't care about portability to other computers, use an absolute path there, but not elsewhere.
The other paths in PO file properties, must be relative to the base path and should be under the base path in the tree (i.e. the base path should be the "root").
For example, you could save PO files under languages/ and have basepath=".." and "src" and "includes" paths.
EDIT: In modern versions of Poedit (1.8 and up), you don’t have to worry about this. Just drag the paths you want to the source paths window and Poedit will generate correct settings automatically.
Ok, I found the solution.
Base path should be : "."
Website path should be : "/Users/USERNAME/Dropbox/Sites/mywebsite"
That's it! ;-)
Personally, I had a folder Catalogue->Properties->Sources Paths->Path, but this folder did not existed physically (was deleted).
It was the folder CRON/ in the picture. Simply removing the CRON/ folder in the Paths solved the issue (see picture).
Obviously, you can add back the CRON/ folder also.
Is it a bad or a good idea to set XCode Library Search Path to "$(SRCROOT)" recursive instead of few concert paths? Why?
Specifying the path (e.g., */Users/username/MyProject/Frameworks*) will work only if you are sure that it will stay the same no matter what. But if you change the location of your dependency, you'll have to manually update the path each time. It can happen if you e. g., want to build a project on another machine (build machine, teammate's machine, etc.)—most probably the dependency will have another path.
In order to have a dynamic path relative to the target's path, we use SRCROOT. As stated in XCode Help:
SRCROOT
Identifies the directory containing the target’s source files.
This means that by placing the dependency relative to the target's path (e. g., *$(SRCROOT)/Frameworks*), we won't need to update the path all the time.
Responding directly to your question: I'd say that if the dependency's path is relative to the target's then it's beneficial to have such dynamic path identification.
As for recursive: This just means that subfolders will be checked recursively for the path you specified; you can actually set recursive or non-recursive for any path.
My xcode project links to the TestFlight library (libTestFlight.a) and the project is also under git (locally) which I then push up to bitbucket.
I then pull the project down to my macbook pro. However the first build fails because its trying to find the libTestFlight.a file using a path that is relative to my iMac. I can change the project settings and all is OK, but I'd like to avoid this happening on every refresh between machines.
I can't seem to find a way to make the linker find the file relative to the xcode project directory.
If your bundle contains the static library, then in Build Settings you can put the value
"$SOURCE_ROOT"
No matter which machine your code runs in, it will always point to the correct root folder.
The same can be given for Header Search Paths.