Board index » delphi » Compiler Error
David
![]() Delphi Developer |
David
![]() Delphi Developer |
Compiler Error2003-07-09 01:38:38 AM delphi114 I just reloaded delphi7 on my reformatted hard drive and am now experiencing some compiler errors such as, [Error] Unit1.pas(638): Undeclared identifier: 'SaveToFile', even though "classes" is in my uses list. When I compile previous source code that uses the same function, everything works fine. Any suggetsions? Thanks |
Ignacio Vazquez
![]() Delphi Developer |
2003-07-09 01:49:16 AM
Re:Compiler Error
"David" <XXXX@XXXXX.COM>writes
QuoteI just reloaded delphi7 on my reformatted hard drive and am now Ignacio |
David
![]() Delphi Developer |
2003-07-09 06:25:01 AM
Re:Compiler Error
Your questions resolved my problem.
I was trying to use a method of TStrings class like a function by itself without an object. Thanks for getting back to me. David Eidsness "Finn Tolderlund" <XXXX@XXXXX.COM>writes QuoteSaveToFile is not a function, it is usually a method of an object. |
andrew
![]() Delphi Developer |
2003-07-11 05:26:44 AM
Re:Compiler Error
"WorkBook.java": Error #: 482 : duplicate definition of class com.merck.ushh.icomm.ssl.prod.officedocumentautomation.excel.Workbook, defined in M:\Steiandr_view\USHH_icommpro_content\productsites\java\src\com\merck\ushh\icomm\ssl\prod\officedocumentautomation\excel\WorkBook.java and also defined in M:\Steiandr_view\USHH_icommpro_content\productsites\java\src\com\merck\ushh\icomm\ssl\prod\officedocumentautomation\excel\Workbook.java
It is pointing to the same file which only has one class declaration in it. I did rename the file at one point; there is still only one file defining the class. Any ideas how to fix this? |
Lori Olson (TeamB)
![]() Delphi Developer |
2003-07-11 06:06:21 AM
Re:Compiler Error
andrew writes:
Quote"WorkBook.java": Error #: 482 : duplicate definition of class com.merck.ushh.icomm.ssl.prod.officedocumentautomation.excel.Workbook, defined in M:\Steiandr_view\USHH_icommpro_content\productsites\java\src\com\merck\ushh\icomm\ssl\prod\officedocumentautomation\excel\WorkBook.java and also defined in M:\Steiandr_view\USHH_icommpro_content\productsites\java\src\com\merck\ushh\icomm\ssl\prod\officedocumentautomation\excel\Workbook.java Regards, Lori Olson (TeamB) ------------ Save yourself, and everyone else, some time and search the newsgroups and the FAQ-O-Matic before posting your next question. Google Advanced Newsgroup Search www.google.ca/advanced_group_search Other Newsgroup Searches: www.borland.com/newsgroups/ngsearch.html Joi Ellis's FAQ-O-Matic: www.visi.com/~gyles19/fom-serve/cache/1.html |
William Miller
![]() Delphi Developer |
2003-08-24 03:40:44 AM
Re:Compiler Error
Attached is a simple linear programming program using pascal code from the
Numerical Recipes library. When compiling under Delphi Professional Version 5.0, I get an error which I am told to report to the Inprise Developers. Unfortunately, I can't find an email address to report it. If you have any advise regarding the problem or getting help, I'd appreciate it. Bill Miller |
Seb
![]() Delphi Developer |
2003-10-23 03:50:48 PM
Re:Compiler Error
Hello,
I did the next programm : #include <iostream> using namespace std; class A { public: virtual void f() { cout << "Méthode A"<< endl; } }; class B : public A { public: static void f() { cout << "Méthode B"<< endl; } }; class C : public B { public: void f() { cout << "Méthode C"<< endl; } }; int main(int, char**) { A* x; A a; B b; C c; a.f(); b.f(); c.f(); x = &a; x->f(); x = &b; x->f(); x = &c; x->f(); } Compilation : Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland test.cpp: Warning W8022 test.cpp 15: 'B::f()' hides virtual function 'A::f()' Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Result : C:\test>test MÚthode A MÚthode B MÚthode C MÚthode A MÚthode A MÚthode A (copy paste from my console). Unfortunately, compilers have to reject this overriden of virtual function : "Interesting example. You are trying to override a virtual with a static. That's not allowed and the compilers should reject the program." (B. Stroustrup). Sebastien. |
Darío Alejandro Guzik
![]() Delphi Developer |
2004-12-03 04:27:01 AM
Re:Compiler Error
Hi
I'm getting this error: Internal compiler error at 0x936bfe with base 0x890000 If I press ctrl-F9 again, it goes on -- Darío Alejandro Guzik (El Tío Borracho) tioborracho.tripod.com e-mail: XXXX@XXXXX.COM ICQ : 8389493 |
Chris Uzdavinis
![]() Delphi Developer |
2004-12-03 04:34:15 AM
Re:Compiler Error
Darío Alejandro Guzik <XXXX@XXXXX.COM>writes:
QuoteHi -- Chris (TeamB); |
Huebi
![]() Delphi Developer |
2005-10-05 09:47:22 PM
Re:Compiler Error
Hi everybody
I'm getting the following error when using DBGrid and TExcel components in the same Form. [C++ Error] ComCtrls.hpp(2638): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows' Is there a way to avoid this? regargs Robert W. |
chrism2
![]() Delphi Developer |
2005-10-29 10:59:49 AM
Re:Compiler Error
Hello All,
I've tried to debug the code below, but can not figure out what is causing the errors. I appreciate if anyone of you could give me a hand on that. Follows the code and the error messages. TIA, -Chris File "restaurant.h" struct restaurant { char *name; char *address; int average_cost; char *food_type; }; typedef struct restaurant DINER; /********** Preprocessor ***********************************************/ #define MAX 3 #include <stdlib.h> #include <stdio.h> #include <string.h> #include "restaurant.h" /********** Functions ***************************************************/ int fill_out(DINER); int print_out(DINER); int compare_cost(const void *, const void *); int print_rest(DINER,char *); /********** main *******************************************************/ int main() { DINER chain[MAX]; char *type[10]; fill_out(chain[MAX]); printf("\n%s", "Enter the type of food desired: "); scanf("%s",type); printf("\n%s\n",type); print_rest(chain[MAX],type); print_out(chain[MAX]); return 0; } /************************************************************************ * * fill_out: Assign values to each array member (structure). * ************************************************************************/ int fill_out(chain) DINER chain[]; { int i; for (i = 0; i < MAX; ++i){ printf("Enter name: "); scanf("%s",&chain[i].name); printf("\n%s","Enter address: "); scanf("%s",&chain[i].address); printf("\n%s","Enter avg cost: "); scanf("%d",&chain[i].average_cost); printf("\n%s","Enter type of food: "); scanf("%s",&chain[i].food_type); printf("\n"); } return 0; } /************************************************************************ * * compare_cost: Compare two array members when qsorting. * ************************************************************************/ int compare_cost(const void *ell1, const void *ell2) { DINER *el1 = (DINER*)ell1; DINER *el2 = (DINER*)ell2; if (el1 ->average_cost == el2->average_cost) return 0; else if (el1->average_cost < el2->average_cost) return -1; else return 1; } /************************************************************************ * * print_rest: Print list of restaurants in ascending cost order * ************************************************************************/ int print_rest(chain,type) DINER chain[]; char *type; { int i; printf("\n%s\n","Got in!!!"); qsort(&chain,MAX,sizeof(chain[1]),compare_cost); for (i=0; i<MAX; i++) if (strcmp(type,chain[i].food_type)) printf("%s\n",chain[i].name); return 0; } Errors: Quotebcc32 -v- -w -O1 13_4.c Warning W8075 13_4.c 33: Suspicious pointer conversion in function main Error E2342 13_4.c 47: Type mismatch in parameter 'chain' (wanted 'restaurant', got 'undefined') in function fill_out Error E2342 13_4.c 72: Type mismatch in parameter 'chain' (wanted 'restaurant', got 'undefined') in function print_out Error E2342 13_4.c 110: Type mismatch in parameter 'chain' (wanted 'restaurant', got 'undefined') in function print_rest *** 3 errors in Compile *** QuoteExit code: 1 |
pamela ewings
![]() Delphi Developer |
2005-12-23 08:42:17 PM
Re:Compiler Error
Is it me or does this compiler like ALWAYS find 26 errors....regardless of the number of *actual* errors in source code. It spots the first error and then generates lots of other errors elsewhere in the code while trying to parse.
e.g. for (int i=0; i<10; i2++) // error 1, i2 undefined { std::g_string str = "IDE sucks"; // err #2 g_string not defined } // error #3 missing ";" std::cout << "there's like problems everywhere " << endl Now borland, in all its wisdom reports 26 errors before I fix anything.... there are precisely 3. Then I fix error #1 and recompile. Hey presto... 26 errors. I fix error 2.... boom 26 errors again. this compiler is SOOOOOOOOOOOOOOOOO brainy and smart that it tells me I have 26 compiler errors regardless of how many there actually are. This problem is just not present with all other compilers I have used. Not much longer in any case, this app is going to c# soon and while I will miss C++ I will NOT miss the IDE! |
Andrue Cope [TeamB]
![]() Delphi Developer |
2005-12-23 10:04:16 PM
Re:Compiler Error
pamela ewings writes:
QuoteIs it me or does this compiler like ALWAYS find 26 long after an error has been found. it is just one of those things they do. There might even be a good reason for it. Most of the time they just get thoroughly confused but BCB does seem to be the champion of total confusion. Secondly IIRC BCB stops after 26 errors by default. Whatever. Most of the time the best way to look at the compiler error output is to read the first error message and ignore the rest. Sometimes the second message might help give a clue but anything after that is usually best ignored. -- Andrue Cope [TeamB] [Bicester, Uk] info.borland.com/newsgroups/guide.html |
Bruce Salzman
![]() Delphi Developer |
2005-12-24 12:55:05 AM
Re:Compiler Error
"pamela ewings" <XXXX@XXXXX.COM>writes
Quote
QuoteNow borland, in all its wisdom reports 26 errors before I fix -- Bruce |
Steven
![]() Delphi Developer |
2006-02-16 06:40:31 AM
Re:Compiler Error
How would I proceed in fixing this error?
[C++ Error] DownloadThread.cpp(46): E2285 Could not find a match for 'TThread::Synchronize(void)' The code is only: Synchronize(DoRelayProgress); BDS2006 - It compiled under bcb6 before.... Steven |