Home > nmake error > nmake error u1065

Nmake Error U1065

Languages , Windows Desktop Development > Visual C++ Question 0 Sign in to vote I am very new to Microsoft Visual Studio, and have just installed Visual Studio 2005. I was trying to build an application with "makefile". I opened the Visual Studio 2005 Command Prompt. Changed directory to my source code, entered   nmake /f makefile.x   It came right back to me with:   Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1065: invalid option '-' Stop.   I had checked the path. The "C:\Program Files\Microsoft Visual Studio 8\VC\BIN" is there, and "nmake.exe" is under it. Please advice if there are something that I have to configure in order to make this "nmake.exe" works. It will be very much appreciated.     Andrew  Wednesday, September 05, 2007 5:43 PM Reply | Quote Answers 1 Sign in to vote The problem here isn't with nmake.exe - it is running correctly - the problem is with the command-line options you are passing to it. nmake.exe thinks you are passing an option like '--' or '/-' which is why it is giving the U1065 error.   Is the command-line you show above the exact command-line you are using? Is MAKEFLAGS set to anything? Wednesday, September 05, 2007 6:17 PM Reply | Quote Moderator 0 Sign in to vote This is not a valid nmake.exe option - it is compiler option. If you want to pass this option to the compiler then you should do the following:   set INCLUDE=C:/QNX630/target/qnx6/usr/include Wednesday, September 05, 2007 6:40 PM Reply | Quote Moderator All replies 1 Sign in to vote The problem here isn't with nmake.exe - it is running correctly - the problem is with the command-line options you are passing to it. nmake.exe thinks you are passing an option like '--' or '/-' which is why it is giving the U1065 error.   Is the command-line you show above the exact command-line you are using? Is MAKEFLAGS set to anything? Wednesday, September 05, 2007 6:17 PM Reply | Quote Moderator 1 Sign in to vote Many thanks for your prompt response.   I entered the nmake command line as shown. My MAKEFLAGS setti

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a https://social.msdn.microsoft.com/Forums/vstudio/en-US/ed1069b2-8237-4e57-b69b-eb859e6de268/desparate-running-nmake-gets-fatal-error-u1065?forum=vcgeneral minute: Sign up nmake.exe keeps complaining about flags I'm not giving it. (U1065) up vote 4 down vote favorite When I run nmake.exe from make I get this error: Microsoft (R) Program Maintenance Utility Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1065: invalid option '-' But I'm not passing in '-' as an option anyplace. If http://stackoverflow.com/questions/1975240/nmake-exe-keeps-complaining-about-flags-im-not-giving-it-u1065 I run the same command from outside of make it works correctly. windows makefile nmake share|improve this question asked Dec 29 '09 at 15:38 The Doctor What 6,85443742 add a comment| 2 Answers 2 active oldest votes up vote 7 down vote accepted The problem is that the environment variables MAKE and MAKEFLAGS are set by make. These are confusing nmake.exe. To fix this, just prefix your call to nmake.exe with env -u MAKE -u MAKEFLAGS Example: some-make-target: env -u MAKE -u MAKEFLAGS nmake.exe /a /l share|improve this answer answered Dec 29 '09 at 15:38 The Doctor What 6,85443742 What is this env command? It doesn't seem to be a standard cmd command. Are you using another shell for Make on Windows? –Wolfgang Ulmer Oct 20 '15 at 12:50 1 It isn't a windows tool. It's a unix tool that I was using. I'm not sure what the equivalent Windows command would be. env -u MAKE -u MAKEFLAGS is unsetting MAKE and MAKEFLAGS environment variables for that one command only. –The Doctor What Oct 21 '15 at 17:45 add a comme

'-' http://public.kitware.com/pipermail/cmake/2004-July/005272.html Technote (FAQ) Question I get the following error: NMAKE : fatal error U1065: invalid option '-' Answer Problem: I get the following error when building any application within nmake error Rhapsody: Building ------------ helloworld.exe ------------ Executing: "C:\Rhapsody\Share\etc\msmake.bat" helloworld.mak build Setting environment for using Microsoft Visual C++ tools. Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. NMAKE : fatal error nmake error u1065 U1065: invalid option '-' Stop. Build Done Solution/Tip: Run "set" at the command line and check to see if your environmental variable 'MAKEFLAGS' is being set. If this is causing the problem, add the following line to the msmake.bat (before the nmake call): set MAKEFLAGS= 1328AnswerProduct versionPartner ContentInternal ContentCategoryReference ID Historical Number 10335 Document information More support for: Rational Rhapsody General Information Software version: Version Independent Operating system(s): Platform Independent Reference #: 1323645 Modified date: 27 October 2010 Site availability Site assistance Contact and feedback Need support? Submit feedback to IBM Support 1-800-IBM-7378 (USA) Directory of worldwide contacts Contact Privacy Terms of use Accessibility

[ date ] [ thread ] [ subject ] [ author ] Hi, Thanks a lot for the link. It worked after setting certain env's and running vcvars32.bat under cygwin shell with cmakesetup.exe and cmake with interactive mode. Thanks again!!! -Karthik. -----Original Message----- From: William A. Hoffman [mailto:billlist at nycap.rr.com] Sent: Tuesday, July 06, 2004 11:41 PM To: Rajagopalan, Karthik; cmake at www.cmake.org Subject: Re: [Cmake] nmake generator not working with cmake Please see this post: http://public.kitware.com/pipermail/cmake/2004-March/004831.html Are you sure cl, and nmake are working from the command line? Also, what version of cmake are you using? -Bill At 02:04 PM 7/6/2004, Rajagopalan, Karthik wrote: >Hi Cmake members, > >I downloaded Cmake for Windows to build VTK product.During the building >process, I face problems when trying to use "nmake" generator with >cmake interactive mode under cygwin shell. Here is the error i am >getting : > > >The C compiler "cl" is not able to compile a simple test program. >It fails with the following output: > >Microsoft (R) Program Maintenance Utility Version 7.00.9466 >Copyright (C) Microsoft Corporation. All rights reserved. > >NMAKE : fatal error U1065: invalid option 'M' >Stop. > >CMake will not be able to correctly generate this project. > > > >After this, I get various options to configure and cmake finally >processes "CMakeLists.txt" files without generating any valid Makefile >as a final output. Should it not produce a "Makefile" under this process >to run using nmake??? > >Can anyone enlighten the problem happening here? To add to the above >issue, I use .NET c compiler. > > >Regards, >Karthik. >_______________________________________________ >Cmake mailing list >Cmake at www.cmake.org >http://www.cmake.org/mailman/listinfo/cmake Previous message: [Cmake] Cleaning cache by cmake Next message: [Cmake] Cleaning cache by cmake Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the Cmake mailing list

 

Related content

nmake error u1034

Nmake Error U table id toc tbody tr td div id toctitle Contents div ul li a href Nmake Syntax a li li a href Gnu Make For Windows a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups relatedl TechRewards Events Community Magazine Forums Blogs Channel Documentation nmake u separator missing APIs and reference Dev centers Samples Retired content We re sorry The p h id Nmake Syntax p content you requested has been removed You ll be auto redirected in second C

nmake error u1095

Nmake Error U p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site relatedl About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up expanded command line too long up vote down