Thread: makefile exported by vc 6.0 doesn't work

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    42

    makefile exported by vc 6.0 doesn't work

    Hi there,

    When a make file is exported with VC 6.0 "Export Makefile..." function, and executed from command line, it doesn't work. The error is
    Code:
    D:\iis>NMAKE /f "iis.mak"
    
    Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
    Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
    
    No configuration specified. Defaulting to iis - Win32 Debug.
    NMAKE : fatal error U1073: don't know how to make '"c:\program files\microsoft v
    isual studio\vc98\include\basetsd.h"'
    Stop.
    The VC 6.0 is installed at "e:\...", but "c:\...". How to correct the makefile exported by VC 6.0 to make it work?

    Thanks,

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Did you run vcvars.bat/vsvars.bat (might call itself something like 'visual c++ command prompt' in its shortcut) before invoking nmake?
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    42
    No, I can not find them, no matter it is vcvars.bat or vsvars.bat. Where are they?

    Thanks,

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    If you've properly installed vc6 then it should be one of the shortcuts in the program group under visual c++ with a name something like 'visual c++ command prompt', as I've previously described. This runs vcvars.bat ('vsvars.bat' with visual studio, I think) which sets various environment variables such as include, lib and compiler etc. paths. Do a search in your vc6 installation directory for 'vcvars.bat' and open it with a text editor if you want more specific information about it.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    42
    It's VCVARS32.BAT. But even it is executed, and

    set MSVCDir=E:\Program Files\Microsoft Visual Studio\VC98

    the problem is still there.

    Thanks,

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>VCVARS32.BAT<<

    Close enough.

    >>the problem is still there.<<

    Post the makefile - if it's huge it might be a better idea to zip it up and attach it rather than post it. Post any errors, too.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #7
    Registered User
    Join Date
    Oct 2005
    Posts
    42
    Thanks your response. below is the makefile:

    Code:
    # Microsoft Developer Studio Generated NMAKE File, Based on iis.dsp
    !IF "$(CFG)" == ""
    CFG=iis - Win32 Debug
    !MESSAGE No configuration specified. Defaulting to iis - Win32 Debug.
    !ENDIF 
    
    !IF "$(CFG)" != "iis - Win32 Release" && "$(CFG)" != "iis - Win32 Debug"
    !MESSAGE Invalid configuration "$(CFG)" specified.
    !MESSAGE You can specify a configuration when running NMAKE
    !MESSAGE by defining the macro CFG on the command line. For example:
    !MESSAGE 
    !MESSAGE NMAKE /f "iis.mak" CFG="iis - Win32 Debug"
    !MESSAGE 
    !MESSAGE Possible choices for configuration are:
    !MESSAGE 
    !MESSAGE "iis - Win32 Release" (based on "Win32 (x86) Application")
    !MESSAGE "iis - Win32 Debug" (based on "Win32 (x86) Application")
    !MESSAGE 
    !ERROR An invalid configuration is specified.
    !ENDIF 
    
    !IF "$(OS)" == "Windows_NT"
    NULL=
    !ELSE 
    NULL=nul
    !ENDIF 
    
    !IF  "$(CFG)" == "iis - Win32 Release"
    
    OUTDIR=.\Release
    INTDIR=.\Release
    # Begin Custom Macros
    OutDir=.\Release
    # End Custom Macros
    
    ALL : "$(OUTDIR)\iis.exe"
    
    
    CLEAN :
    	-@erase "$(INTDIR)\builddict.obj"
    	-@erase "$(INTDIR)\iis.obj"
    	-@erase "$(INTDIR)\iis.pch"
    	-@erase "$(INTDIR)\iis.res"
    	-@erase "$(INTDIR)\StdAfx.obj"
    	-@erase "$(INTDIR)\vc60.idb"
    	-@erase "$(OUTDIR)\iis.exe"
    
    "$(OUTDIR)" :
        if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
    
    CPP=cl.exe
    CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\iis.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
    
    .c{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cpp{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cxx{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .c{$(INTDIR)}.sbr::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cpp{$(INTDIR)}.sbr::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cxx{$(INTDIR)}.sbr::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    MTL=midl.exe
    MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
    RSC=rc.exe
    RSC_PROJ=/l 0x409 /fo"$(INTDIR)\iis.res" /d "NDEBUG" 
    BSC32=bscmake.exe
    BSC32_FLAGS=/nologo /o"$(OUTDIR)\iis.bsc" 
    BSC32_SBRS= \
    	
    LINK32=link.exe
    LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\iis.pdb" /machine:I386 /out:"$(OUTDIR)\iis.exe" 
    LINK32_OBJS= \
    	"$(INTDIR)\builddict.obj" \
    	"$(INTDIR)\iis.obj" \
    	"$(INTDIR)\StdAfx.obj" \
    	"$(INTDIR)\iis.res"
    
    "$(OUTDIR)\iis.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
        $(LINK32) @<<
      $(LINK32_FLAGS) $(LINK32_OBJS)
    <<
    
    !ELSEIF  "$(CFG)" == "iis - Win32 Debug"
    
    OUTDIR=.\Debug
    INTDIR=.\Debug
    # Begin Custom Macros
    OutDir=.\Debug
    # End Custom Macros
    
    ALL : "$(OUTDIR)\iis.exe"
    
    
    CLEAN :
    	-@erase "$(INTDIR)\builddict.obj"
    	-@erase "$(INTDIR)\iis.obj"
    	-@erase "$(INTDIR)\iis.pch"
    	-@erase "$(INTDIR)\iis.res"
    	-@erase "$(INTDIR)\StdAfx.obj"
    	-@erase "$(INTDIR)\vc60.idb"
    	-@erase "$(INTDIR)\vc60.pdb"
    	-@erase "$(OUTDIR)\iis.exe"
    	-@erase "$(OUTDIR)\iis.ilk"
    	-@erase "$(OUTDIR)\iis.pdb"
    
    "$(OUTDIR)" :
        if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
    
    CPP=cl.exe
    CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\iis.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
    
    .c{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cpp{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cxx{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .c{$(INTDIR)}.sbr::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cpp{$(INTDIR)}.sbr::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    .cxx{$(INTDIR)}.sbr::
       $(CPP) @<<
       $(CPP_PROJ) $< 
    <<
    
    MTL=midl.exe
    MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
    RSC=rc.exe
    RSC_PROJ=/l 0x409 /fo"$(INTDIR)\iis.res" /d "_DEBUG" 
    BSC32=bscmake.exe
    BSC32_FLAGS=/nologo /o"$(OUTDIR)\iis.bsc" 
    BSC32_SBRS= \
    	
    LINK32=link.exe
    LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\iis.pdb" /debug /machine:I386 /out:"$(OUTDIR)\iis.exe" /pdbtype:sept 
    LINK32_OBJS= \
    	"$(INTDIR)\builddict.obj" \
    	"$(INTDIR)\iis.obj" \
    	"$(INTDIR)\StdAfx.obj" \
    	"$(INTDIR)\iis.res"
    
    "$(OUTDIR)\iis.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
        $(LINK32) @<<
      $(LINK32_FLAGS) $(LINK32_OBJS)
    <<
    
    !ENDIF 
    
    
    !IF "$(NO_EXTERNAL_DEPS)" != "1"
    !IF EXISTS("iis.dep")
    !INCLUDE "iis.dep"
    !ELSE 
    !MESSAGE Warning: cannot find "iis.dep"
    !ENDIF 
    !ENDIF 
    
    
    !IF "$(CFG)" == "iis - Win32 Release" || "$(CFG)" == "iis - Win32 Debug"
    SOURCE=.\builddict.c
    
    !IF  "$(CFG)" == "iis - Win32 Release"
    
    CPP_SWITCHES=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\iis.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
    
    "$(INTDIR)\builddict.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\iis.pch"
    	$(CPP) @<<
      $(CPP_SWITCHES) $(SOURCE)
    <<
    
    
    !ELSEIF  "$(CFG)" == "iis - Win32 Debug"
    
    CPP_SWITCHES=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
    
    "$(INTDIR)\builddict.obj" : $(SOURCE) "$(INTDIR)"
    	$(CPP) @<<
      $(CPP_SWITCHES) $(SOURCE)
    <<
    
    
    !ENDIF 
    
    SOURCE=.\iis.cpp
    
    "$(INTDIR)\iis.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\iis.pch"
    
    
    SOURCE=.\iis.rc
    
    "$(INTDIR)\iis.res" : $(SOURCE) "$(INTDIR)"
    	$(RSC) $(RSC_PROJ) $(SOURCE)
    
    
    SOURCE=.\StdAfx.cpp
    
    !IF  "$(CFG)" == "iis - Win32 Release"
    
    CPP_SWITCHES=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\iis.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
    
    "$(INTDIR)\StdAfx.obj"	"$(INTDIR)\iis.pch" : $(SOURCE) "$(INTDIR)"
    	$(CPP) @<<
      $(CPP_SWITCHES) $(SOURCE)
    <<
    
    
    !ELSEIF  "$(CFG)" == "iis - Win32 Debug"
    
    CPP_SWITCHES=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\iis.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
    
    "$(INTDIR)\StdAfx.obj"	"$(INTDIR)\iis.pch" : $(SOURCE) "$(INTDIR)"
    	$(CPP) @<<
      $(CPP_SWITCHES) $(SOURCE)
    <<
    
    
    !ENDIF 
    
    
    !ENDIF

  8. #8
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    The makefile looks okay to me. Do you actually have the 'basetsd.h', referred to in your original error message, in your vc6 'include' directory. If I recall correctly, it was not included in the default vc++ 6.0 installation but was a part of later sdks. Have you applied any psdk updates since you installed vc6? If not, you should, although I suspect you'll have to dig a little on microsoft's downloads site to find a version compatible with vc6. The latest version can be downloaded from here but I'm not sure it will be fully comptible with vc6.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile Problem: None rule to make target
    By chris24300 in forum Linux Programming
    Replies: 25
    Last Post: 06-17-2009, 09:45 AM
  2. unix makefile won't work but works in Dev C++
    By jk1998 in forum C++ Programming
    Replies: 1
    Last Post: 06-09-2007, 03:54 PM
  3. The Bludstayne Open Works License
    By frenchfry164 in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-26-2003, 11:05 AM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. VC 6.0 compiled error
    By alan4100 in forum Windows Programming
    Replies: 4
    Last Post: 09-17-2001, 03:10 PM