Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Ошибка компиляции модуля kol.pas [Delphi]


Димитрий ©   (2005-04-07 21:09:00) 

Установил последнюю версию библиотеки KOL. При компиляции проекта в Delphi 5. Выдаются две ошибки:
Identifier redeclared: 'ComboboxDropDown'
и
Undeclared identifier: 'DropDownCount'.
В Delphi 7 компилируется нормально. Как заставить KOL компилироваться  в Delphi 5?


Thaddy   (2005-06-28 03:58:00) [1]

Add koladd.pas to the uses part, just after kol itself


Ax   (2005-06-28 03:35:00) [2]

Cкачал сначал update208, говорит нет у вас файла KOL и ERR
После их просматриваю, они становятся пустыми.
Опять ставил оригинальный KOL,  в нём , по выше предложенному совету, перемещал строку, и всё компилировалось.
После последнего поста, скачал 209, Update прошёл без проблем,
но при попытке скомпилировать приложение, получаю новую ошибку

[Error] MCKfakeClasses.inc(66): Undeclared identifier: 'PActionList'
[Error] MCKfakeClasses.inc(67): Undeclared identifier: 'PAction'
[Fatal Error] test.dpr(6): Could not compile used unit 'Unit1.pas'

Что делать?


ECM   (2005-06-22 12:02:00) [3]

>Что я делаю не правильно?
ВСЁ! ... :) (шутка)

Для начала прочитай внимательновсе посты выше твоего...
...там есть ответ на твой вопрос...
эти ошибки выскакивают на версии 2.0... (она как раз и находится в полном
архиве)
скачай и установи последнее обновление:
http://bonanzas.rinet.ru/upd/kolmck200to209.zip
...для этого нужен Updater:
http://bonanzas.rinet.ru/e_tools.htm#Updater


ax   (2005-06-22 04:42:00) [4]

Здравствуйте!

Я скачал архивы  KOL.PAS и MCK, распаковал всё в одну дерикторию
попытался скомпилировать в Delphi 5
получаю ошибку

[Error] kol.pas(31904): Identifier redeclared: 'ComboboxDropDown'
[Error] kol.pas(31914): Undeclared identifier: 'DropDownCount'
[Fatal Error] dclusr50.dpk(43): Could not compile used unit

Что я делаю не правильно?


ECM   (2005-04-08 14:16:00) [5]

http://bonanzas.rinet.ru/kol.zip- v2.0
http://bonanzas.rinet.ru/upd/kolmck200to208.zip- update to 2.08


Тульский   (2005-04-08 13:27:00) [6]


> ECM ©   (08.04.05 12:11) [10]

Скачивал отсюда: http://bonanzas.rinet.ru/e_downloads.htm


ECM   (2005-04-08 12:11:00) [7]

>Сделал так. Перенёс {$ENDIF ASM_VERSION} перед {$ELSE newcode}
У тебя устаревшая версия KOL...
В KOL (в 2.08) уже так и есть... :)


Тульский   (2005-04-08 10:07:00) [8]


> {$ENDIF ASM_VERSION}
> ...
> {$ELSE newcode}
> procedure ComboboxDropDown( Sender: PObj );

Сделал так. Перенёс {$ENDIF ASM_VERSION} перед {$ELSE newcode} - теперь компилируется и на D5


ECM   (2005-04-08 09:44:00) [9]

>SPeller ©   (08.04.05 08:50) [6]
>По-моему, этой строки в коде быть не должно:
Это в данном случае не принципиально...
Здесь наверное что-то с обработкой вложеных блоков условной
крмпиляции...

//[FUNCTION ComboboxDropDown]
{$IFNDEF USE_DROPDOWNCOUNT}
{$IFDEF ASM_VERSION}
procedure ComboboxDropDown( Sender: PObj );
asm
...
{$ELSE ASM_VERSION} //Pascal
procedure ComboboxDropDown( Sender: PObj );
var
 CB: PControl;
 IC: Integer;
begin
{$ENDIF ASM_VERSION}
...
{$ELSE newcode}
procedure ComboboxDropDown( Sender: PObj );
var
 CB: PControl;
 Count: Integer;
 DropDownCount: Integer;
 ItemHeight: Integer;
begin
...
{$ENDIF USE_DROPDOWNCOUNT}
//[END ComboboxDropDown]


Ошибку Undeclared identifier: 'DropDownCount' мне удалось получить прописав руками {$DEFINE USE_DROPDOWNCOUNT} непосредственно перед обьявлением ComboboxDropDown. Потому
как обьявление DropDownCount в этом случае не попадает в
компилятор по условию...
При задании в опциях проекта USE_DROPDOWNCOUNT - все ОК...
У меня D6...

2Тульский:
Проверь ситуацию с USE_DROPDOWNCOUNT


Тульский   (2005-04-08 08:57:00) [10]


> ECM ©   (08.04.05 07:04) [3]
> Компилятор так и выдает - "Ошибки здесь"?
> Приведи полный текст того что выдает компилятор...:)

см. внимательно

> Выдаются две ошибки:
> Identifier redeclared: 'ComboboxDropDown'
> и
> Undeclared identifier: 'DropDownCount'


P.S. Да, действительно, есть такое дело. Только почему компилятор D7 этого не замечает?


SPeller   (2005-04-08 08:50:00) [11]

По-моему, этой строки в коде быть не должно:
DropDownCount := 8;
Она была для отладки. ПО-моему я писал об этом Владимиру, но у него руки так и не дошли.


thaddy   (2005-04-08 08:49:00) [12]

What might be the case - but I can't tell without more code - is simply that you are using an option that needs a newer version of windows.pas or messages.pas than that of delphi 5. Try the versions supplied with delphi 6 or 7 (They compile with delphi 5 too, with minor changes) or use the JCL win32api instead, (Available from my website). Again: kol.pas is NOT to blame :)


thaddy   (2005-04-08 08:48:00) [13]

What might be the case - but I can't tell without more code - is simply that you are using an option that needs a newer version of windows.pas or messages.pas than that of delphi 5. Try the versions supplied with delphi 6 or 7 (They compile with delphi 5 too, with minor changes) or use the JCL win32api instead, (Available from my website). Again: kol.pas is NOT to blame :)


ECM   (2005-04-08 07:04:00) [14]

Компилятор так и выдает - "Ошибки здесь"?
Приведи полный текст того что выдает компилятор...:)


Димитрий   (2005-04-07 22:09:00) [15]


> thaddy   (07.04.05 21:20) [1]
> You must have some other settings wrong:
> I can compile anything under 4,5,7
> Check your paths...


Ошибки здесь:
{$ELSE newcode}
procedure ComboboxDropDown( Sender: PObj );
var
 CB: PControl;
 Count: Integer;
 DropDownCount: Integer;
 ItemHeight: Integer;
begin
 CB := PControl(Sender);

 Count := CB.Count;
 DropDownCount := CB.DropDownCount;
 DropDownCount := 8;
 if (Count > DropDownCount) then
   Count := DropDownCount;
 if (Count < 1) then
   Count := 1;
 ItemHeight := CB.Perform(CB_GETITEMHEIGHT, 0, 0);
 SetWindowPos(
   CB.Handle, 0, 0, 0, CB.Width, ItemHeight * Count + CB.Height + 2,
   SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_NOREDRAW or SWP_HIDEWINDOW);
 SetWindowPos(
   CB.Handle, 0, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or
   SWP_NOACTIVATE or SWP_NOREDRAW or SWP_SHOWWINDOW);

 if Assigned(CB.fOnDropDown) then
   CB.fOnDropDown(CB);
end;

Если этот фрагмент закомментировать, то компилируется нормально.


thaddy   (2005-04-07 21:20:00) [16]

You must have some other settings wrong:
I can compile anything under 4,5,7
Check your paths...


Наверх

Титульная страница Поиск, карта сайта Написать письмо