How to change the destination folder for .exe files generated by bcc32c compiler?
For example, the following command:
"bcc32c C:\Users\mvolodin\Documents\BCC32\Hello_World.c"
emits the .exe file in:
C:\Users\mvolodin
not in the folder containing the .c file.
The executable file was emitted in the working directory of the Command Prompt which, in my case, was the user folder:
C:\Users\mvolodin
Related
I'm trying to set up Xcode to build generated .c files just like it does for files generated by yacc (*.y) and lex (*.l) files.
Say I have input files with a *.corn extension that are meant to be processed by a tool of mine to create C source files. I then want these C source files to be compiled and linked using the rest of Xcode's mechanisms.
This is exactly what happens to my .y and .l files for yacc and lex. The project target contains only the .y and .l files and the rest happens automatically. Generated .c files get put in the derived files directory and those get compiled and linked automatically.
Here's what I've tried so far:
-If I just add a .corn file to my target, Xcode copies it into the bundle at build time presuming it is a resource. Okay, whatever.
-I then create a custom build rule to handle
Source files with names matching: *.corn
Using Custom Script:
#!/bin/sh
cp "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.c"
I have to give it an output file so:
OutputFiles:
${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.c
Note in this case I'm just copying the file as I rename it with .c extension. (As I'm playing around, the .corn file just contains C source.)
So now before the bundle directory even gets created I get the following warning:
unexpected C compiler invocation with specified outputs: 'blahblahblah/Build/Products/Debug-iphonesimulator/MyApp.app/foo.c' (for input: 'blahblahblah/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/DerivedSources/foo.c')
Then after the link phase (sheesh!), the script above runs and I do end up with my foo.c in DERIVED_FILES_DIR. It doesn't get compiled however and notably, foo.corn didn't get copied into the bundle anymore so there's hope.
I've tried a bunch of other stuff, but this is the cleanest I can describe that others can try. Please what is the magic incantation to make this work?!
Note that I've also tried using DERIVED_SOURCES_DIR instead of DERIVED_FILES_DIR.
So I missed two things:
I needed to add the .corn files to the "Compile Sources" build phase.
By adding .corn files to the project/target before the adding the custom build rule, Xcode added the .corn files to the "Copy Bundle Resources" build phase which broke the build.
Why compiler looking for file only in project folder, and no in subfolder.
ERROR: Can't find /Users/kukodajanos/Workspace L/PFB2/crossfeed_connecting.png
Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng failed with exit code 1
This is the project folder: /Users/kukodajanos/Workspace L/PFB2
but file is not in root but in /Users/kukodajanos/Workspace L/PFB2/PFB/
I am after a merge. Why Xcode is not enough smart to look for file in subdirectory? Anyway all class files .h, .m, resources are stored there.
I have TFS Build set up, which worked fine until yesterday. Since then I get the following error from one project:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" because it
was not found.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" because
it was not found. C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_glass_55_fbf9ee_1x400.png" because
it was not found.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_glass_65_ffffff_1x400.png" because
it was not found. C:\Program Files
...and about 10 more...
The files mentioned by the error are nowhere to be found, not in the project nor in any folder of the project.
Does anyone know how to get rid of this error?
At Ln 182 of the .target file is the following:
<Copy SourceFiles="#(Content)" Condition="'%(Content.Link)' == ''"
DestinationFolder="$(WebProjectOutputDir)\%(Content.RelativeDir)"
SkipUnchangedFiles="true"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
I also have a second project in the solution which is nearly the same and builds fine.
Grep/Search the entire source tree for those filenames - something must be referencing them.
Adding the missing files to source control solved the problem for me.
I searched for this error online and here. Online it shows me results in a different language then english nice Google. Here it has one post and a guy that never really answered the guys question.
I have my xcode project folder on my desktop. Inside the project folder I have an en.lproj folder that has both iPad and iPhone storyboards inside along with a localization.plist file. However when I launch the project in Xcode this en.lproj folder is nowhere to be found. So this might be the problem?
With the project folder on my desktop I launch terminal type in: cd
then drag my project folder into Terminal and it gives me the path. I then paste this line of code into the Terminal
find . -name *.m | xargs genstrings -o en.lproj
I get this error message in the Terminal:
genstrings: couldn't connect to output directory en.lproj
it prints this line multiple times and then says my project is a path to a directory?
No .strings file is made. Any thoughts on what I am doing wrong? I got UILabels that I dragged and dropped from inside Storyboards, but I also I strings that are coded with
NSLocalizedString(#"First Level Passed", #"This is a message displayed on screen to allow the user to know they have passed the first level!");
So the above Terminal code snippet should be finding those NSLocalizedStrings right? I think it isn't even getting to find the en.lproj folder in the first place but I don't know?
Any help would be great.
Better late then never,
you are creating a file (localizable.strings) in the folder projectroot/en.lproj.
If this folder doesn't exist you get this error message. Simply create the folder en.lproj in the root and the command should work.
I got the same error, while execute the following command as per the tutorials.
genstrings -o en.lproj *.swift
Above command gives me following error:
genstrings: couldn't connect to output directory en.lproj
My issue:
I try to implement above command on my own directory(i.e. subdirectory of root project directory) where all the ".lproj" directory is there. - that gives me above error.
Then i have removed old “Localizable.strings” on sub-folder "Localization". and created new “Localizable.strings” in root directory. - here i got no errors but nothing is happen as per "genstrings" command.
Solution:
On command line move to the Root directory of project where you can get the all the ".lproj" directories.
Add the path of file, where you listed all the "NSLocalizedString("TEXT", comment: "COMMENT")" - in my case i have listed everything on "Constants.swift" file.
So, i have execute the following command and its work like charm.
genstrings -o en.lproj/ #ProjectPath#/Constants/Constants.swift
Note:
File path will be easily get via just drag file from the Xcode and drop to the terminal.
Solution is to manually create the folder en.lproj, then run genstring command
cd {project folder}
mkdir Localization
cd Localization
mkdir en.lproj
genstrings -o en.lproj/ ../*.swift
repeat for every language (ie: fr.lproj ) for French etc..
I have been struggling to get the MSBuild to successfully build my .dproj file for the last few days on a build machine.
First, I needed the EnvOptions.proj file from the developer's machine, which got me clear of the missing system.pas file, but now I am getting a compile error for a missing .dcu
C:\Program Files\CodeGear\RAD Studio\6.0\Bin\CodeGear.Delphi.Targets(123,3):
error : myproject.dpr(17) Fatal: F1026 File not found: 'mymissing.dcu'
Now the path to "mymissing.dcu" is included in the Win32BrowsingPath of the EnvOptions.proj file, and I tried adding the path to the command prompt PATH which also does not work.
If I copy the .dcu directly into the working directory it can be found - but this is not much of a long term solution, as there are many other .dcu files that I would need to copy into the working directory.
Any ideas?
Try <DCC_UnitSearchPath> in your .dproj file.
Make sure that all the environment variables referenced in library search paths, e.g. $(BDS), are actually present in the environment of the command prompt.