0

I am building WinSCP from source.

When compiling source, following error occurs:

[bcc32 Error] Jcl.cpp(9): E2040 Declaration terminated incorrectly

The IDE is indicating at following source.

// ---------------------------------------------------------------------------
# include<System.hpp>
# pragma hdrstop
# pragma package(smart_init)
// ---------------------------------------------------------------------------
// Package source.
// ---------------------------------------------------------------------------
#pragma argsused extern " C " int _libmain(unsigned long reason)
{
  return 1;
}
// ---------------------------------------------------------------------------

Could anybody please tell me what is wrong and how to correct.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
pmverma
  • 1,653
  • 13
  • 27

1 Answers1

1

The actual WinSCP code is:

#pragma argsused
extern "C" int _libmain(unsigned long reason)
{
  return 1;
}

See Jcl.cpp in WinSCP Git repository.

You must have corrupted the code yourself.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • Thanks @Prikryl, I even did not know how the file was mistakenly corrupted. But I managed according to Joachim Pileborg comment. :) – pmverma May 19 '15 at 07:54