01-05-2006 01:40 AM
name=name_of_c_file_without_the_extension
type=CIN
cinlibraries=Kernel32.lib
CINTOOLSDIR=path_to_cintools_directory (in MS-DOS formatc:\progra~1\nation~1\Labvie~1\cintools\)
!include <$(CINTOOLSDIR)\ntlvsb.mak>
01-05-2006 09:24 AM - edited 01-05-2006 09:24 AM
You need to tell Visual C where it should find your header files.
@HighTechie wrote:Hello,I try to compile .lsb file via VC++6 accorrding to the instrunction below:1.Create a makefile (using Notepad or something equivalent) with the following lines:name=name_of_c_file_without_the_extension
type=CIN
cinlibraries=Kernel32.lib
CINTOOLSDIR=path_to_cintools_directory (in MS-DOS formatc:\progra~1\nation~1\Labvie~1\cintools\)
!include <$(CINTOOLSDIR)\ntlvsb.mak>
Save this file with the filename "name_of_c_file.mak" and save it in the
same directory as the C file.
2. launch VC++.
Choose File -> Open (NOT Open Workspace)
Open the makefile that you just created.
get a dialog that says that the makefile was not created with VC++ (choose to proceed)
Now, another dialog that will ask what kind of platform to use (choose Win32)
Now, the makefile is loaded and the CIN is ready to be built. Choose Build.But I got the follwoing error:
fatal error C1083: Cannot open include file: 'extcode.h': No such file or directory
Error executing cl.exe.Can any body tell me why?
Message Edited by rolfk on 01-05-2006 04:31 PM
01-05-2006 09:25 PM
01-05-2006 09:25 PM - edited 01-05-2006 09:25 PM
帖子被HighTechie在01-05-2006 09:35 PM时编辑过了
01-05-2006 09:25 PM
01-05-2006 10:37 PM
01-06-2006 12:57 AM
You don't (must) have to! But nowadays there are people who don't know anymore that even Windows has a command shell and if they see one they run away screaming because they think their computer got a virus or such. So I guess whoever wrote that turorial didn't like command shells or wanted to avoid having people to explain what that is and how it works, as well as how you actually can get at it.
@HighTechie wrote:Hello,Can any body tell me why I must use last step(open .mak file with VC IDE) but not nmake /f .mak??
01-06-2006 01:08 AM
The problem is that you are using the abbreviated form of the long Windows name. Windows creates short form names for all directory entries that are longer than 8 + 3 characters. However this obviously can lead to naming conflicts so Windows does create a new name according to the pattern <first 6 chars of name>~<a digit, starting with 1>.<ending limited to 3 chars>. What digit Windows uses for a particular directory depends on a number of things such as if there are other names with the same first 6 characters in that directory.
@HighTechie wrote:
Hello Rolf,Thanks a lot for your reply!your solution works fine!But I found that the DOS format path some times works not so good. when I use the path(c:\progra~1\nation~1\Labvie~1\cintools), there are error happens during the build procedure. later I copy the whole cintools dir to d:\ and use d:\cintools in the IDE or makefile, it works fine. so I think this DOS format path sometimes got trouble.帖子被HighTechie在01-05-2006 09:35 PM时编辑过了
01-06-2006 09:51 AM
01-06-2006 02:09 PM
Sorry, you are right. There is something else you need to do after installation of Visual C for the command line tool to work. In your Visual C installation inside the bin folder you will find a batch file VCVARS32.BAT. This must be run to add the necessary settings to your environment for the command line tools to be able to find all the different tools, include files, etc. At the end of the installation you should have gotten a message about this.
@HighTechie wrote:hello rolf;Thanks a lot for your reply! But I do not agree what your opion about why I must use last step via VC IDE. I tried alreay to execute "nmake /f [Name_of_Makefile]"directly from a command line instead of open make file via VC IDE, but I got error messages reads that something "fatal error: can not found ntwin32", but when I use VC IDE convert the make file and build the project, everything works fine? Could you please tell me why or you successful experence? thX!Best RegardsTechie