I have been using the Jove editor by Jonathan Payne for many years.
 If You are not familiar with Jove - Jove stands for Jonathans own 
 version of EMACS. I love using it. In the 80s I had my own version
 of jove with a lot of my own personal additions. I used this until
 1996 when I lost all of my Jove source code when I returned to the
 USA from Mexico.  Recently I obtained a copy of it, and I have been
 using the executable on Windows, but I would like to add back some
 of my own features. All of the code compiled as expected without
 error except for jove.c and scandir.c. These call in the headers file
 windows.h, this in turn calls in basetsd.h and error are generated:


grace@LOWTHUNDER /c/jove/jovedoss
$ nmake makefile.msc

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Making paths.h
        cl -AL -J -Zp -G0  -nologo -Ox -D_NDEBUG /c jove.c scandir.c
cl : Command line warning D9002 : ignoring unknown option '-AL'
cl : Command line warning D9002 : ignoring unknown option '-G0'
jove.c
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(422) :
 error C2628:  'LONG_PTR' followed by 'int' is illegal (did you forget
 a ';'?)
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(422) :
 error C2059:  syntax error : ','
scandir.c
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(422) :
 error C2628:  'LONG_PTR' followed by 'int' is illegal (did you forget
 a ';'?)
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(422) :
 error C2059:  syntax error : ','
Generating Code...
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual
 Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.

It does not look like the problem lies in the Jove C sources, but
more with the environment I have looked at the include files (could
it have something to do with environmental variables), but it is not
obvious to me. I am using a mingw32 environment with windows 7 on a
64 bit AMD phenom processor. Before I finish pulling out all of my
hair I thought that someone more experianced with visual studio cl
compiler using nmake in the mingw32 might find the problem obvious
and quickly spot what it is that I am doing wrong.

Any suggestions would be greatly appreciated. Thank You in advance for
Any help that You may have to offer.

73
-Grace
NNNN
z

Recommended Answers

All 9 Replies

Have you tried using a more modern version of visual studio compiler? Like VC++ 2010 Express (free) or just-released VC++ 2012 Express (also free)? Neither of those versions of vc++ need or use the windows SDK.

Ancient Dragon,

I have both versions 2008 and 2010 but my build environment (which is set up for
Mozilla Firefox build is using C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
files. I tried adding !include <win32.mak> to the makefile.msc file, but that did
not help. Perhaps I need a setenv.bat file of some kind?

Thanks For Your Help!

73
-Grace
NNNN
z

you need to run vcvars32.bat found in the compiler's bin folder, similar to this (for vc++ 2012):

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin

If you are using Windows 7 then I suspect you are trying to use an outdated SDK. Get this one. But in most cases you don't need the SDK because the compiler includes most, if not all, the windows headers and libraries that are needed. You should try to compile without reference to the SDK to see if your program will compile.

Ancient Dragon,

Thanks again for Your help. the SDK you referered to is the one I have. I have tried using
vcvars32.bat from both vs2008 and vs2010. All with identical results. Does not seem to matter
if basetsd.h is found in v6.0A or v7.0A includes. In either case when windows.h is included
the same error occurs. What vcars32.bat would use v5.0 includes? maybe I should try that.
The documentation for the Jove build simply says to use "nmake makefile.msc" for visual studio.
I assume that the build worked fine at one time or another. Only the two files that call in
windows.h fail to compile.

73
-Grace
NNNN
z

vcvars32.bat doesn't know anything about the folder(s) where the SDK is installed. you will have to create another batch file that adds those paths to the environment variables or use /I<path> on the cl command line.

If you zip up the project files and email or PM them to me I'll try to compile it. (I just sent you a PM)

Thanks, check your PM messages.
73
-Grace
NNNN
z

Open the Visual Studio Command Prompt as Administrator and resolve the gnerated syntax errors. The key is to open the VS console as Administrator.

Okay, I tried the compile from the VS 2010 command prompt (started as Administrator) and
I had the same results. I emailed You a .JPG file showing what I see. This is teh same as
what I have been seeing all along.

73
-Grace
NNNN
z

Ancient Dragon,

I was able to succsesfully compile the two files - jove.c and scandir.c. Now
I am left with about 20 unresolved functions when it trys to link. I think
I will be able to solve these with prototype functions in the jove.h file.
Anyway, thank You. You have been a great help. Moving the include windows.h
to the top of theses two files solved that problem.

Problem Solved.

73
-Grace
NNNN
z

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.