LONDON (AP) _ Polish President Lech Walesa on Wednesday night urged the West not to let trade barriers replace the ideological barriers that his country's break with hard-line Communist rule helped eliminate.

Walesa, the first Polish head of state accorded a full state visit to Britain since the Communists took over Poland at the end of World War II, told a banquet in his honor that ideological barriers had divided Europe for 40 years.

''We do not want them replaced by economic barriers,'' he said.

''The political Iron Curtain should not be substituted by a silver curtain of indifference. Prosperity in Europe should not be limited by frontiers,'' he said.

The banquet was held at the Guildhall, the historic city hall in the City, London's business district.

Walesa told the business community guests that the years of Communism after World War II had destroyed Poland's middle class, which traditionally had produced the nation's businessmen, entrepreneurs and bankers.

He said Poland offered good conditions for exporters and investors but added: ''The Polish economy gravely suffers from a lack of capital. Without this it is hard to speak about speeding up modernization by the introduction of modern technologies.''

At a reception in the Guildhall library before the banquet, the former shipyard electrician and Solidarity trade union leader sat sightly pigeon-toed on a large red velvet chair.

As a welcoming speech was read, much of it devoted to recollections of cooperation between Polish exiles and the British during World War II, Walesa sometimes looked uncomfortable in his tuxedo and tugged at the collar.

Earlier Wednesday, Walesa met with Prime Minister John Major at Major's Downing Street office for talks on economic cooperation and Warsaw's relations with the 12-nation European Community.

The one-hour meeting, described as ''warm and friendly,'' began with the two leaders signing an Anglo-Polish declaration on cooperation.

Walesa and his wife began the four-day visit on Tuesday.