<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nmake Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/nmake/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/nmake/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:52:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>C++ basic for Build and Release Engineers</title>
		<link>https://www.scmgalaxy.com/tutorials/c-basic-for-build-and-release-engineers/</link>
					<comments>https://www.scmgalaxy.com/tutorials/c-basic-for-build-and-release-engineers/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 08:57:55 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Build and Release Engineers]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[C++ basic for Build and Release]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[DEVENV]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Linker]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Nmake]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4617</guid>

					<description><![CDATA[<p>The compiler Compiler is the software that translates the syntactically correct statements of a program into objectcode or can also [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/c-basic-for-build-and-release-engineers/">C++ basic for Build and Release Engineers</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>The compiler</strong><br />
Compiler is the software that translates the syntactically correct statements of a program into objectcode or can also produce an executable using a linker and the object code produced. An object codecan&#8217;t be run directly on a machine since it contains information about the object module in addition tothe machine instructions.</p>
<p><strong>The linker</strong><br />
A linker is another program which is invoked upon compiled object files. A linker just identifies thestructure of the object files, resolves the functions and object linkages and creates an executable</p>
<p>To understand linkers, it helps to first understand what happens &#8220;under the hood&#8221; when you convert a source file (such as a C or C++ file) into an executable file (a file that can be executed on your machine or someone else&#8217;s machine running the same architecture).</p>
<p>Under the hood, when a program is compiled, the compiler converts the source file into object byte code. This byte code (sometimes called object code) is mnemonic instructions that only your computer architecture understands. Traditionally, these files have an .OBJ extension.</p>
<p>After the object file is created, the linker comes into play. More often then not, a real program that does anything useful will need to reference other files. In C, for example, a simple program to print your name to the screen would consist of:<br />
printf(&#8220;Hello Nick!\n&#8221;);</p>
<p>When the compiler compiled your program into an obj file, it simply put a reference to the printf function. The linker resolves this reference. Most programming languages have a standard library of routines to cover the basic stuff expected from that language. The linker links your OBJ file with this standard library. The linker can also link your OBJ file with other OBJ files. You can create other OBJ files that have functions that can be called by another OBJ file. The linker works, almost like a word processor&#8217;s copy and paste. It &#8220;copies&#8221; out all the necessary functions your program references and creates a single executable. Sometimes other libraries that are copied out are dependent on yet other OBJ or library files. Sometimes a linker has to get pretty recursive to do its job.</p>
<p>Note that not all operating systems create a single executable. Windows, for example, uses DLL&#8217;s that keep all these functions together in a single file. This reduces the size of your executable, but makes your executable dependant on these specific DLLs. DOS used to use things called Overlays (.OVL files). This had many purposes, but one was to keep commonly used functions together in 1 file (another purpose it served, in case you&#8217;re wondering, was to be able to fit large programs into memory. DOS has a limitation in memory and overlays could be &#8220;unloaded&#8221; from memory and other overlays could be &#8220;loaded&#8221; on top of that memory, hence the name, &#8220;overlays&#8221;). Linux has shared libraries, which is basically the same idea as DLL&#8217;s (hard core linux guys I know would tell me there are MANY BIG differences).</p>
<p>The procedure for compiling a C++ program is the same as for a C program, but uses the command g++ instead of gcc. Both compilers are part of the GNU Compiler Collection.</p>
<p><strong>Sample C++ Program 1</strong><br />
======================</p>
<p>#include &lt;iostream&gt;<br />
int main()<br />
{<br />
using namespace std;<br />
cout &lt;&lt; &#8220;Hello world!&#8221; &lt;&lt; endl;<br />
return 0;<br />
}</p>
<p>The program can be compiled with the following command line:<br />
g++ -Wall hello.cc -o hello</p>
<p>The resulting executable can be run in exactly same way as the C version, simply by typing its filename:<br />
$ ./hello Hello, world!</p>
<p><strong>Sample C++ Program 2</strong><br />
======================</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;cmath&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
int x = 0;<br />
while(x &lt; 10) {<br />
double y = sqrt((double)x);<br />
cout &lt;&lt; &#8220;The square root of &#8221; &lt;&lt; x &lt;&lt; &#8221; is &#8221; &lt;&lt; y &lt;&lt; endl;<br />
x++;<br />
}<br />
return 0;<br />
}</p>
<p><strong>Building on the Command Line</strong></p>
<p><strong>CL</strong><br />
Use the compiler (cl.exe) to compile and link source code files.</p>
<p>The compilers produce Common Object File Format (COFF) object (.obj) files. The linker produces executable (.exe) files or dynamic-link libraries (DLLs).</p>
<p><strong>Link</strong><br />
Use the linker (link.exe) to link compiled object files.</p>
<p><strong>MSBuild (Visual C++)</strong><br />
Use MSBuild to build Visual C++ projects and Visual Studio solutions from the command line. Invoking this utility is equivalent to running the Build project or Build Solution command in the Visual Studio integrated development environment.</p>
<p>The build process is controlled by the information in a project file (.vcxproj) that you can create and edit. The project file specifies build options based on build stages, conditions, and events.</p>
<p><strong>DEVENV</strong><br />
Use DEVENV combined with a command line switch, such as /Build or /Clean, to perform certain build commands without displaying the Visual Studio IDE.</p>
<p>Devenv lets you set various options for the integrated development environment (IDE), and also build, debug, and deploy projects, from the command line. Use these switches to run the IDE from a script or a .bat file, for example, a nightly build script, or to start the IDE in a particular configuration.<br />
For example, the command devenv /build myproject1.vbproj</p>
<p><strong>NMake</strong><br />
Use NMake to automate tasks that build Visual C++ projects. The Microsoft Program Maintenance Utility (NMAKE.EXE) is a tool that builds projects based on commands contained in a description file.</p>
<p><strong>Reference</strong><br />
<a href="http://msdn.microsoft.com/en-us/library/f35ctcxw.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/f35ctcxw.aspx</a></p>
<p><strong>Header file vs Library</strong></p>
<p>Generally, a header file notifies the compiler of certain things (mostly their existence or declarations) so that the compiler can correctly build a single translation unit (such as a single C file).</p>
<p>A library file is the actual executable code that does the work as specified in that header file. This is linked in by the linker to provide the actual functionality (the _definitions rather than just the declarations).</p>
<p><strong>Header Files:</strong> These are the files that are included at the top of any program. If we use any function inside a program, then the header file containing declaration or definition of that function ,has to be included.Like printf() is defined in stdio.h.So, we must include it (by #include in order to use printf().</p>
<p><strong>Library Files:</strong> These are the files which the compiler uses in order to define the functions which have been used in the program and had been declared inside the header file.Like, printf() has its complete definition ,like how it will work etc. in an I/O library! So, the compiler uses that library to get the machine code for printf.</p>
<p><strong>Difference:</strong><br />
Header files are TEXT files while library files are BINARY. This means, we can read and modify the header file but not the library!<br />
Header file is in C language while the library is in machine language!<br />
Header file has to be included by the programmer while the compiler automatically relates the library file(s) with the program!</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/c-basic-for-build-and-release-engineers/">C++ basic for Build and Release Engineers</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/c-basic-for-build-and-release-engineers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Make for Windows: NMake &#124; What is Nmake?</title>
		<link>https://www.scmgalaxy.com/tutorials/make-for-windows-nmake/</link>
					<comments>https://www.scmgalaxy.com/tutorials/make-for-windows-nmake/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 24 May 2012 00:00:00 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[About Nmake]]></category>
		<category><![CDATA[Namke Guide]]></category>
		<category><![CDATA[Namke Tutorial]]></category>
		<category><![CDATA[Nmake]]></category>
		<category><![CDATA[Nmake Introduction]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is Nmake]]></category>
		<category><![CDATA[Windows NMake]]></category>
		<category><![CDATA[Windows NMake Instruction]]></category>
		<category><![CDATA[Windows NMake Introduction]]></category>
		<category><![CDATA[Windows NMake Overview]]></category>
		<category><![CDATA[Windows NMake references]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2012/05/24/make-for-windows-nmake/</guid>

					<description><![CDATA[<p>Make for Windows: NMake What is Nmake? NMAKE is Microsoft&#8217;s implementation of the make tool. The Microsoft Program Maintenance Utility [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/make-for-windows-nmake/">Make for Windows: NMake | What is Nmake?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="size-full wp-image-3796 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2012/05/windows-nmake.png" alt="windows-nmake" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2012/05/windows-nmake.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2012/05/windows-nmake-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><strong>Make for Windows: NMake</strong></p>
<p><strong>What is Nmake?</strong><br />
NMAKE is Microsoft&#8217;s implementation of the make tool. The Microsoft Program Maintenance Utility (NMAKE.EXE) is a 32-bit tool that builds projects based on commands contained in a description file.</p>
<p><strong>Another definition found on web as well</strong><br />
nmake is the &#8220;make&#8221; program for Visual Studio. A &#8220;make&#8221; program builds (makes) an executable and/or package by reading a set of &#8220;make&#8221; files. These files are essentially scripts that specify what is to be made, what files (header, source code, resource) are needed for each output file, etc. So nmake can be used to completely automate the process.</p>
<p>A frequently asked question: &#8220;<strong>Where can I find make for Windows?</strong>&#8220;. The answer is: &#8220;<strong>Download and use NMake</strong>&#8220;.</p>
<p><strong>Downloading NMake</strong><br />
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084" target="_blank" rel="noopener">http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084</a></p>
<p><strong>Direct Downloan Link of Nmake</strong><br />
<a href="http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe" target="_blank" rel="noopener">http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe</a></p>
<p><strong>Installing NMake</strong></p>
<p>Run the downloaded executable to extract the files. Copy both the NMAKE.EXE and the NMAKE.ERR file to your Perl bin directory, normally C:\Perl\bin. Make sure that you copy the NMAKE.ERR file as well.</p>
<p>1. Download nmake15.exe</p>
<p>2. Double click on nmake15.exe. It will generate 3 files: nmake.exe, nmake.err and readme.txt.</p>
<p>3. Copy nmake.exe and nmake.err to \perl\bin, which is where ActivePerl executable files are located.</p>
<p>4. Now try the nmake command in a command window. If you see the following message, NMake 1.5 is installed correctly:</p>
<pre>&gt;nmake</pre>
<pre>Microsoft (R) Program Maintenance Utility   Version 1.50    Copyright (c) Microsoft Corp 1988-94. All rights reserved.</pre>
<pre>NMAKE : fatal error U1064: MAKEFILE not found and no target specified    Stop.</pre>
<p><strong>Example of an NMake session</strong></p>
<p>Normally building Perl modules and installing them consist of the following steps:</p>
<p>perl Makefile.pl<br />
make<br />
make test<br />
make install</p>
<p><strong>Reference:</strong><br />
<a href="http://msdn.microsoft.com/en-us/library/dd9y37ha%28v=vs.71%29.aspx" target="_blank" rel="noopener">http://msdn.microsoft.com/en-us/library/dd9y37ha%28v=vs.71%29.aspx</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/make-for-windows-nmake/">Make for Windows: NMake | What is Nmake?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/make-for-windows-nmake/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
