C ++ error RC2104 trying to compile PuTTY-PSCP (for Windows) in Visual Studio 6.0

I was going to use the Windows PuTTY Development source code to build my own client application (here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html ), but how I tried to compile the PSCP project ( SCP Client), I got the following error:

C: \ work \ 2015 \ Putty \ windows \ version.rc2 (18): RC2104 error: undefined keyword or key name: BINARY_VERSION

I went through various posts related to this error but didn't find anything that works:

error RC2104: undefined keyword or key name: DS_SETFONT :

In this post, I noticed that the MSVC version was uplifted, so I thought that maybe something needs to be done to get PuTTY to work on VC 6.0?

Also I tried to add #include <windows.h>

in version.rc2 (the .rc2 version is used to include in all .rc files) and pscp.rc, none worked.

I'll answer quickly if you need information (project properties, source code ...)

USING Visual Studio 6.0 Service Pack 6 (SP6) on Windows 8.1

+3


source to share


3 answers


Perhaps wrong version.h

. That's right, the file version.h

in the project folder should be seen.

Try to change version.rc2

:

#include "version.h"

      



to

#include "..\\..\\..\\version.h"

      

At least the resource compiler will succeed.

+5


source


If you browse the PuTTY source files, you will notice that it BINARY_VERSION

is defined in version.h

and used in windows/version.rc2

which #include

version.h

.



Since your version .rc2 doesn't see version.h, try to figure out why: Is version.h still present and still contains BINARY_VERSION

? Are your tracks included correctly? Is there another version of .h somewhere else in your include path that gets caught by mistake?

+3


source


What source code are you using?

I tested the latest version (0.64) "Windows Source Code".

direct link

http://the.earth.li/~sgtatham/putty/latest/putty-src.zip

I tried to compile with VC ++ 6.0 Professional with SP6 on my PC running Windows XP SP3.

After extracting putty-src.zip somewhere with the structure folder saved, did you open "putty.dsw" correctly in the "putty-src \ windows \ MSVC" folder?

You should find 7 projects under the "FileView" workspace in Visual Studio 6.0.

You can switch the active project to "pscp" using the context menu via right click on the pscp project.

With the modified version of version.rc2, the resource compiler exited successfully. But two source files (sshshare.c, winsftp.c) C failed to compile with 20 errors. in the pscp project.

Compilation errors for 'winsftp.c' are caused by 'TIME_POSIX_TO_WIN' and 'TIME_WIN_TO_POSIX'.

'ull (unsigned long long) is a 64-bit integer suffix recently defined in C99. Since the C99 standard does not support VC6, it throws errors.

I changed temporarily

11644473600ull ------> ((ULONGLONG) 11644473600)

10000000ull ---------> ((ULONGLONG) 10000000)

and confirmed errors will be deleted. (Sorry, without checking if the code was generated correctly)

3 errors while compiling 'sshshare.c' also caused by another macro.

I can't figure out why you have 116 errors.

+1


source







All Articles