I am new to makefile concept. So please can anyone give me example to overcome the problem of linking too many make files. Because I am getting error "fatal error U1095:" in my make file.
Assuming windows (since on windows, the command line is limited to 128 characters (?! really - sic?!))
I suggest you use #response files for LINK.EXE and or CL.exe etc.
LINK.EXE #response.tmp
You can store all commandline parameters in the text file without any limit.
Update MSDN calls them Command Files
Related
We are using Visual Studio (2017) in a project (one solution) with two different configuration types: DynamicLinkLibrary and Makefile. The Makefile configuration is controlled by the maekfile of a third party compiler (Greenhills for Embedded Applications), DynamicLinkLibrary of course runs Visual Studio internally. The Makefile configuration uses the elements of the Visual Studio NMake template, for the compiler call itself there are these command lines, in which a batch file is called with transfer parameters
$(ProjectDir)..\mm.bat PLL02#$(MSBuildProjectName) bin_comp 3 LIBYES 2 /F DIAGNO
mm.bat is the batch control with seven parameters for the Greenhills compiler.
In case of a compiler error in our source code, detected by the third-party compiler, we would now like to activate a comfortable ErrorParser, which loads the corresponding source code file by double-clicking on the erroneous line in the VisualStudio output window into the source code editor window of Visual Stuido and automatically places the cursor there on the erroneous line of code. If Eclipse is used as our second IDE for our Makefile project, this works very well via a Regex control ('Regex Error Parser'). However, this does not work in Visual Studio. Is it even possible to do this directly from the output window? Does anyone have any advice here? Roughly speaking, is it at all possible to trigger an action from the Visual Studio output window by double-clicking (in the sense that the clicked line is 'read' by the output window for further processing; the further processing should ultimately display the erroneous source code line).
Best Regards, Roger
P.S.
Here is shown, what I like to know:
Situation in error case
I don't believe that you can make VSS understand other formats than its own.
But there is another way that works.
Format the error output of your compiler into the VSS format and put it out in the output window off VSS.
The VSS Error format ist:
d:\MyProg\main\Sourcefiles\myModul\src\myFile.c(2426): error C2039:
Maybe you have a format like this from your compiler to change to the VSS format:
d:\/MyProg\main\Sourcefiles/myModul/src/myFile.c", line 2426: error #136:
struct "_Ts_braketest" has no field "braketest_stepx"
S_btest.braketest_stepx = 2520;
^
The stream editor sed does a good job for such a task.
For a simple way you can format step by step with a command file for sed.
command file socToVss.sed:
s,\\/,\\,g #replace \/ to \ (delimiter , to prevent escaping slash)
s,\/,\\,g #replace / to \ (delimiter , to prevent escaping slash)
s/\"//g #replace " to nothing
s/c,[[:space:]]line[[:space:]]/c(/g #formating line number
s/\(([0-9]*\):/\1):/g #formating line number
s/\(error[[:space:]]\)#\([0-9]*\)/\1C\2/g #formating error number
Example for your makefile to use the sed command file to format the errors from errors.txt to errorsVssFormat.txt and type ist out:
make 2> errors.txt
sed -f socToVss.sed errors.txt > errorsVssFormat.txt
type errorsVssFormat.txt
You can use the Open Source GNU utilities for Win32
[http://unxutils.sourceforge.net/]
Good luck with your job ;-)
Is it possible to tell ASDF that it should produce only one fas(l) file for entire system? This file should be concatenation (in right order) of all compiled files of the system, including all files of systems on which target system depends.
Yes, with compile-bundle-op (ASDF 3.1): http://common-lisp.net/project/asdf/asdf/Predefined-operations-of-ASDF.html
edit: Actually, monolithic-compile-bundle-op seemes to be asked for (as shown in other answers).
If you have to predict the extension, use uiop:compile-file-type.
And/or you can just call (asdf:output-files 'asdf:monolithic-compile-bundle-op :my-system) to figure out what is actually used.
Option monolithic-compile-bundle-op will create single compiled file which includes all dependencies, while compile-bundle-op creates a file for every system.
Example of use:
(asdf:operate 'asdf:monolithic-compile-bundle-op :my-system)
This command will create file my-system--all-systems.fas(l) in output directory of target project, as well as "bundle" files for every system, named like my-system--system.fas(l).
I want to extract a specific directory form a huge zip file (>5GB) that is somewhat corrupted because of an inevitable bad maintained build system that creates the zip.
The tools such as winrar/7Zip GUI apps have no issues extracting the files, but some command line tools such as mks unzip and 7za fails to extract from the corrupted archive.
After a lot of digging around and trying out many such command line utilities I found out that IZARC successfully extracts files from the archive.
I am running the following command:
IZARCe.exe -e -d -o D:\aHugeZipFile.zip -pD:\temp #"source.txt"
The listing file source.txt contains just one entry:
source/lib/*
which is the only directory in the archive, from where the contents are to be extracted.
But, it is resulting in:
IZArc Command Line Extraction Add-On Version 1.1 (Build: 130)
Copyright(c) 2007 Ivan Zahariev, All Rights Reserved.
http://www.izarc.org contact#izarc.org
Archive File: aHugeZipFile.zip
WARNING: Nothing to do!
I have tried specifying:
/source/lib/*
source/lib/*
source/lib/
source/lib
*source/lib/*
in the listing file, all to no avail! :(
Any pointers on where the error is occurring, and how to fix the issue will be of great help. Thank you in advance!
Using relative or absolute paths for listfiles doesn't appear to work with IZArc. Try using wildcards such as ., *.doc, etc instead of paths in the listfile. Be aware that there appears to be a limitation for the folder depth that IZArc will extract to as well as a tendency to generate CRC errors when files with the same name are present in the same archive, even if they are in different directories.
I would suggest using 7-Zip command-line instead. It can recurse deeply through a file structure without error and can use relative directories and wildcards in its listfiles.
The following 7-Zip command was tested and worked perfectly.
7za x somearchive.zip -o"C:\Documents and Settings\me\desktop\temp_folder\test2" -ir#source.txt -aoa -scsWIN
the source.txt file may contain contain a combination of relative paths and/or wildcards on separate lines such as:
Output/, Folder2/, *, or *.doc.
In the command above: x (extract with full paths), -ir (include filenames, recurse subdirectories), -aoa (overide existing files without prompt), -scsWIN (set charset for list files). You may need to adjust these commands for your situation.
So I am trying to compile Pascal programs and everything is find; however, I would like to put the generated files after each compilation is a separated folder. I am looking of something like this: fpc "Destination Folder" "program.pas".
Thanks
From Alphabetical listing of command line options
-FE<x> Set exe/unit output path to <x>
-FU<x> Set unit output path to <x>, overrides -FE
So something like fpc program.pas -FEc:\output should work. I don't have fpc installed so I cannot verify. If you try it and get errors that you can't work through post them.
This one works for me:
fpc hello.pas -o"Web/hello.cgi"
I was using ubuntu, notice there is no space between the argument -o and the beginning of the path "Web/..."
I read through the docs and used the commands outlined however for some reason I dont seem to be getting any symbols, just a series of "unknowns" in the function column of the summary table for everything except the topmost set of the app I was trying to debug.... I set the enviromental variable to the microsoft server and the direcories containg the pdb's for the app. I also made sure to select the "Load Symbols" item before bringing up the summary table.
Arcording to the info I was reading it should take some time for the tabl to display while it loads the symbols, however for me the table displayed almost instantly and only the top most items in sprite.exe->sprite.exe had function names, the othe rows for function were either blank or "unknown"
Im using Vista SP1.
This is the batch file I used. Did I do anything that would prevent the sybols being loaded?
REM start profiler
xperf -on PROC_THREAD+LOADER+INTERRUPT+DPC+PROFILE^
-stackwalk profile -minbuffers 16 -maxbuffers 1024 -flushtimer 0^
-f tmp.etl
REM run the app we want to profile
sprite.exe
REM stop
xperf -d profile.etl
REM set symbol path
set _NT_SYMBOL_PATH = ^
C:\Projects\C++\fl lib\bin;^ REM dlls
C:\Projects\C++\fl lib\samples\bin;^ REM main exe
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
REM display profile
xperf profile.etl
What version of dbghelp.dll is it using? I've had trouble getting PDB symbols working with kernrate and other utilities when using the version of dbghelp.dll that is installed in %SystemRoot%\system32.
You may need to copy dbghelp.dll and symsrv.dll from a recent version of Debugging Tools for Windows into a directory where XPerf can find it.
Also, you need to remove the space before the '=', or else you're defining the "_NT_SYMBOL_PATH " variable (including the trailing space in the name).
Including comments at the end of a line is not going to work either. A line continuation character such as '^' typically needs to be the last character on the line. When I ran that statement (on XP), I ended up with "_NT_SYMBOL_PATH " equal to " C:\Projects\C++\fl lib\bin; REM dlls" and an error about the next line.
Try setting the
TRACE_FORMAT_SEARCH_PATH
environment variable. If that doesn't work, you may have to manually extract the TMF files from your PDBs using TracePdb.exe (or at least use a regular path instead of a SYM* path). This is by far the most annoying part of using ETL traces / XPerf