pmverma
pmverma

Reputation: 1703

E2040 Declaration terminated incorrectly

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.

Upvotes: 0

Views: 2165

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202474

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.

Upvotes: 1

Related Questions