nmake

nmake, visualstudio, and .mak files

I was given a C++ project that was compiled using MS Visual Studio .net 2003 C++ compiler, and a .mak file that was used to compile it. I am able to build it from the command line using nmake project.mak, but the compiler complains that afxres.h was not found. I did a little searching around and the afxres.h is in the Visual Studio dir...

does nmake have build tasks ?

Using ant I could unzip an archive before proceeding with the build per-se ... Is this possible using nmake ? Could I call an external application ? Or even a batch script ? ...

Convert nmake makefile into Visual Studio 2005 project

We have some old C code here that's built with nmake. Is there an automated way to pull the Makefile into Visual Studio 2005 and create a project? Some searching on MSDN indicates VS6 could do this, but it looks like VS7/8 dropped the feature. If necessary I can build the project from scratch using the project.mak file as a reference, ...

Using nmake with wildcards in the makefile

I am attempting to set up an nmake makefile to export our balsamiq mockup files to png files automatically, but I'm afraid I can't make heads nor tails of how to make a generic rule for doing so, without explicitly listing all the files I want exported. This page details the command line syntax for exporting the files, and this page con...

Exporting DLL C++ Class , question about .def file

I want to use implicit linking in my project , and nmake really wants a .def file . The problem is , that this is a class , and I don't know what to write in the exports section . Could anyone point me in the right direction ? The error message is the following : NMAKE : U1073: don't know how to make 'DLLCLASS.def' P.S: I'm trying to...

How to organize the project tree for a C++ project using nmake?

There seems to be two major conventions for organizing project files and then many variations. Convention 1: High-level type directories, project sub-directories For example, the wxWidgets project uses this style /solution /bin /prj1 /prj2 /include /prj1 /prj2 /lib /prj1 /prj2 /src ...

Handling nmake errorlevel/return codes

Hi all, I have an nmake-based project which in turn calls the asp compiler, which can throw an error, which nmake seems to recognize: NMAKE : fatal error U1077: 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe' : return code '0x1' However, when I call nmake from within a batch file, the environment variable %ERRORLEV...

Why library name gets an additional 0 in its name?

I have this tiny Qt project with a project file like this: TEMPLATE = lib TARGET = record32 VERSION = 0.0.1 DEPENDPATH += . INCLUDEPATH += . CONFIG += shared SOURCES += recorder.cpp HEADERS += recorder.h When I compile a library from it by qmake && nmake, it results into files record32.obj record320.lib record320.dll ... Why is th...

All .cpp files depend on two .h files?

In a makefile, I have the following line: helper.cpp: dtds.h Which ensures that helper.cpp is rebuilt whenever dtds.h is changed. However, I want ALL files in the project to be rebuilt if either of two other header files change, kind like this: *.cpp: h1.h h2.h Obviously that won't work, but I don't know the right way to get nmake ...

How can I use this makefile in Microsoft VC?

In the program below, there are two things that I don't understand. How can I use this makefile in Microsoft VC? Why there is a '?' before '='? Program: ifeq ($(TARGET_COMPILER),ms) include ../makefile.ms.config DBG?= /Zi OPT= /Ox CXXFLAGS += $(COMMON_FLAGS) $(OPT) $(DBG) EEXT = $(EXT).dll ifeq ($(GZ...

How do I utilise all the cores for nmake?

I just got a new quad core computer and noticed that nmake is only using 1 process. I used to use make which had the switch -j4 for launching 4 processes. What is the nmake equivalent? [edit] Based on the information below I have been able to add a command to my qmake project file: QMAKE_CXXFLAGS += /MP Which effectively did it for ...

How do I create a directory in a makefile

I'm using Visual Studio 2005 nmake, and I have a test makefile like this: sometarget: -mkdir c:\testdir I want to always create the directory, without having to specify 'sometarget'. For example, I can do this: !if [if not exist c:\testdir\$(null) mkdir c:\testdir] !endif But that requires two lines, where I really only want to...

What am I missing from my environment variables for my linker to fail with LNK1181?

I have a Qt project which I have had a debug console displayed whilst I am developing, I am about to ship the product to I removed the qmake console command: CONFIG += console However when I do that I get the following error: link /LIBPATH:"c:\Qt\4.5.0\lib" /NOLOGO /INCREMENTAL:NO /LTCG /MANIFEST /MANIFESTFILE:"./_obj/win32\Lynx.interm...

what is NMAKE?

Hi all I am wondering what is NMAKE and how to use it? Is there any good tutorial with NMAKE thanks in advance ...

nmake - simple question about escaping

Hi I'd like to make below nmake code to produce check.mak file with the following contents: $(A) instead I get the following error: "NMAKE : fatal error U1040: internal error : macro expansion" Any suggestions? My nmake version is 9.00.30729.01 (VC 2008). OPTION = A FILE = check.mak all : @echo "$$($(OPTION))" > $(FILE) ...

nmake - how to force echo command to output the tab character?

Hi How to force echo command to output a tab character in MS nmake makefile? Verbatim tabs inserted right into a string after echo command are removed by nmake and don't show up in the output file. all : @echo I WANT TO OUTPUT THE <TAB> CHARACTER HERE! > output.txt ...

nmake - how to forward macros between nmake invocations?

Hi How can I forward macros between nmake invocations? Let's say we have --- a.mak --- some_variable = value all: nmake -f b.mak --- END --- --- b.mak --- all: @echo some_variable = WHAT TO PUT HERE TO GET VALUE OF some_variable? --- END --- I was trying different things like using set and setx commands but value of vari...

How can I forward macros between nmake invocations from callee to caller?

How can I forward macros between nmake invocations from callee to caller? It's the reverse of what I was asking here: nmake - how to forward macros between nmake invocations? ...

nmake - simulating eval function

I'd like to get value of variable named $(MYVAR)_SOME_SUFFIX in the b.mak makefile. Instead I get "b.mak(2) : fatal error U1001: syntax error : illegal character '$' in macro" # ---- a.mak ---- all : set MYVAR=SOME_PREFIX nmake -f b.mak #--- END --- # ---- b.mak ---- all: @echo $($(MYVAR)_SOME_SUFFIX) #--- END --- ...

MS nmake equivalent of $(MAKECMDGOALS)

I'm using a (somewhat outdated) Microsoft version of nmake, which is usually packaged with visual studio 6.0. (If there's a relevant answer for newer nmake - do let me know, I might consider upgrading). I wish to alter existing makefile, so that it would not include the dependency list if it is ran with the nmake dpndfull goal, which sh...