Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.02.19;
Скачать: CL | DM;

Вниз

Ошибка компиляции модуля kol.pas   Найти похожие ветки 

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

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


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

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


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


> 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;

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


 
ECM ©   (2005-04-08 07:04) [3]

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


 
thaddy   (2005-04-08 08:48) [4]

What might be the case - but I can&#39;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:49) [5]

What might be the case - but I can&#39;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 :)


 
SPeller ©   (2005-04-08 08:50) [6]

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


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


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

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

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


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


 
ECM ©   (2005-04-08 09:44) [8]

>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 10:07) [9]


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

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


 
ECM ©   (2005-04-08 12:11) [10]

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


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


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

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


 
ECM ©   (2005-04-08 14:16) [12]

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


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

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

Я скачал архивы  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-06-22 12:02) [14]

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

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


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

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"

Что делать?


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

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



Страницы: 1 вся ветка

Текущий архив: 2006.02.19;
Скачать: CL | DM;

Наверх




Память: 0.51 MB
Время: 0.028 c
11-1119933735
Василий
2005-06-28 08:42
2006.02.19
Сдвиг элементов TreeView меньше system-defined minimum


9-1125311577
Chel
2005-08-29 14:32
2006.02.19
Вопрос по OpenGL


2-1138336340
Demonenok
2006-01-27 07:32
2006.02.19
Ping


1-1137572125
Ega23
2006-01-18 11:15
2006.02.19
Раскрашивание DBGridEh


2-1139007283
Змей
2006-02-04 01:54
2006.02.19
WebBrowser