From: <msz...@ya...> - 2007-02-08 07:56:16
|
Hi wxCoders! I hope you can help me. This might be a more c++ related question but I fee= l=20 that you are the only ones that can help me. HELP!!! :( I'm tryng to comile my component (wxActiveRecordGenerator: activerecord mod= ule=20 in wxCode CVS). I'm in Kubuntu using wx2.8 and gcc 4.1 and DatabaseLayer 1.6. I'm having=20 linking errors when doing a "make -f GNUmakefile". Hope you can help... Regards Mat=EDas. This is the output: btw: referencia a `vtable for xxxx' sin definir =3D undefined reference to= =20 `vtable for xxxx' All the methods are defined so I really don'tget the error messages...and = I=20 have no virtual functions. I should be getting linker errors against=20 DatabaseLayer because I haven't compiled it yet. gnu/wxActiveRecordGenerator_DatabaseConnectionDlg.o: In function=20 `DatabaseConnectionDlg::DatabaseConnectionDlg(wxWindow*, int, wxString=20 const&, wxPoint const&, wxSize const&, long)': DatabaseConnectionDlg.cpp:(.text+0x27af): referencia a `vtable for=20 DatabaseConnectionDlg' sin definir gnu/wxActiveRecordGenerator_DatabaseConnectionDlg.o: In function=20 `DatabaseConnectionDlg::DatabaseConnectionDlg(wxWindow*, int, wxString=20 const&, wxPoint const&, wxSize const&, long)': DatabaseConnectionDlg.cpp:(.text+0x2827): referencia a `vtable for=20 DatabaseConnectionDlg' sin definir gnu/wxActiveRecordGenerator_DatabaseConnectionDlg.o: In function=20 `DatabaseConnectionDlg::DatabaseConnectionDlg()': DatabaseConnectionDlg.cpp:(.text+0x289e): referencia a `vtable for=20 DatabaseConnectionDlg' sin definir gnu/wxActiveRecordGenerator_DatabaseConnectionDlg.o: In function=20 `DatabaseConnectionDlg::DatabaseConnectionDlg()': DatabaseConnectionDlg.cpp:(.text+0x290e): referencia a `vtable for=20 DatabaseConnectionDlg' sin definir gnu/wxActiveRecordGenerator_RelationPropertiesDlg.o: In function=20 `RelationPropertiesDlg::RelationPropertiesDlg(wxWindow*, int, wxString=20 const&, wxPoint const&, wxSize const&, long)': RelationPropertiesDlg.cpp:(.text+0x2223): referencia a `vtable for=20 RelationPropertiesDlg' sin definir gnu/wxActiveRecordGenerator_RelationPropertiesDlg.o: In function=20 `RelationPropertiesDlg::RelationPropertiesDlg(wxWindow*, int, wxString=20 const&, wxPoint const&, wxSize const&, long)': RelationPropertiesDlg.cpp:(.text+0x22e7): referencia a `vtable for=20 RelationPropertiesDlg' sin definir gnu/wxActiveRecordGenerator_RelationPropertiesDlg.o: In function=20 `RelationPropertiesDlg::RelationPropertiesDlg()': RelationPropertiesDlg.cpp:(.text+0x23aa): referencia a `vtable for=20 RelationPropertiesDlg' sin definir gnu/wxActiveRecordGenerator_RelationPropertiesDlg.o: In function=20 `RelationPropertiesDlg::RelationPropertiesDlg()': RelationPropertiesDlg.cpp:(.text+0x2446): referencia a `vtable for=20 RelationPropertiesDlg' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::OnLoadClick(wxCommandEvent&)': wxActiveRecordGeneratorFrm.cpp:(.text+0x56a5): referencia a=20 `DatabaseConnectionDlg::GetActiveRecordGen() const' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::OnAboutClick(wxCommandEvent&)': wxActiveRecordGeneratorFrm.cpp:(.text+0x593e): referencia a=20 `wxActiveRecordGeneratorFrm::GetVersion() const' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::OnNewdatabaseClick(wxCommandEvent&)': wxActiveRecordGeneratorFrm.cpp:(.text+0x8de0): referencia a=20 `DatabaseConnectionDlg::GetActiveRecordGen() const' sin definir wxActiveRecordGeneratorFrm.cpp:(.text+0x8dfd): referencia a=20 `wxActiveRecordGeneratorFrm::GetVersion() const' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::wxActiveRecordGeneratorFrm(wxWindow*, int,=20 wxString const&, wxPoint const&, wxSize const&, long)': wxActiveRecordGeneratorFrm.cpp:(.text+0xe693): referencia a `vtable for=20 wxActiveRecordGeneratorFrm' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::wxActiveRecordGeneratorFrm(wxWindow*, int,=20 wxString const&, wxPoint const&, wxSize const&, long)': wxActiveRecordGeneratorFrm.cpp:(.text+0xe7e3): referencia a `vtable for=20 wxActiveRecordGeneratorFrm' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::wxActiveRecordGeneratorFrm()': wxActiveRecordGeneratorFrm.cpp:(.text+0xe933): referencia a `vtable for=20 wxActiveRecordGeneratorFrm' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `wxActiveRecordGeneratorFrm::wxActiveRecordGeneratorFrm()': wxActiveRecordGeneratorFrm.cpp:(.text+0xea1b): referencia a `vtable for=20 wxActiveRecordGeneratorFrm' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGeneratorFrm.o: In function=20 `RelationPropertiesDlg::~RelationPropertiesDlg()': wxActiveRecordGeneratorFrm.cpp: (.text._ZN21RelationPropertiesDlgD1Ev[RelationPropertiesDlg::~RelationPrope= rtiesDlg()]+0x7):=20 referencia a `vtable for RelationPropertiesDlg' sin definir gnu/wxActiveRecordGenerator_wxActiveRecordGuiApp.o: In function=20 `WxActiveRecordGuiApp::OnInit()': wxActiveRecordGuiApp.cpp:(.text+0x3c3): referencia a=20 `wxActiveRecordGeneratorFrm::SetVersion(wxString)' sin definir collect2: ld returned 1 exit status __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas |
From: John L. <jla...@gm...> - 2007-02-08 15:27:12
|
On 2/8/07, Mat=EDas Szeftel <msz...@ya...> wrote: > > Hi wxCoders! > I hope you can help me. This might be a more c++ related question but I f= eel > that you are the only ones that can help me. HELP!!! :( > > I'm tryng to comile my component (wxActiveRecordGenerator: activerecord m= odule > in wxCode CVS). > > I'm in Kubuntu using wx2.8 and gcc 4.1 and DatabaseLayer 1.6. I'm having > linking errors when doing a "make -f GNUmakefile". > > Hope you can help... > > Regards Mat=EDas. > > This is the output: > > btw: referencia a `vtable for xxxx' sin definir =3D undefined reference t= o > `vtable for xxxx' > All the methods are defined so I really don'tget the error messages...an= d I > have no virtual functions. I should be getting linker errors against > DatabaseLayer because I haven't compiled it yet. > > gnu/wxActiveRecordGenerator_DatabaseConnectionDlg.o: In function > `DatabaseConnectionDlg::DatabaseConnectionDlg(wxWindow*, int, wxString > const&, wxPoint const&, wxSize const&, long)': > DatabaseConnectionDlg.cpp:(.text+0x27af): referencia a `vtable for > DatabaseConnectionDlg' sin definir > gnu/wxActiveRecordGenerator_RelationPropertiesDlg.o: In function > `RelationPropertiesDlg::RelationPropertiesDlg(wxWindow*, int, wxString > const&, wxPoint const&, wxSize const&, long)': > RelationPropertiesDlg.cpp:(.text+0x2223): referencia a `vtable for > RelationPropertiesDlg' sin definir For starters you may want to try adding virtual destructors for these classes, just an empty one like this. I think I've seen error messages like these before and I'm guessing that they are from the base class having a vtable, but your subclassed class doesn't explicitly have one. in DatabaseConnectionDlg.h add virtual ~DatabaseConnectionDlg() {} Hope this helps, John Labenski |
From: <msz...@ya...> - 2007-02-08 20:35:05
|
El Jueves, 8 de Febrero de 2007 12:27, John Labenski escribi=F3: > On 2/8/07, Mat=EDas Szeftel <msz...@ya...> wrote: > > Hi wxCoders! > > I hope you can help me. This might be a more c++ related question but I > > feel that you are the only ones that can help me. HELP!!! :( > > > > I'm tryng to comile my component (wxActiveRecordGenerator: activerecord > > module in wxCode CVS). > > > > I'm in Kubuntu using wx2.8 and gcc 4.1 and DatabaseLayer 1.6. I'm having > > linking errors when doing a "make -f GNUmakefile". > > > > Hope you can help... > > > > Regards Mat=EDas. > > > > This is the output: > > > > btw: referencia a `vtable for xxxx' sin definir =3D undefined reference= to > > `vtable for xxxx' > > All the methods are defined so I really don'tget the error > > messages...and I have no virtual functions. I should be getting linker > > errors against DatabaseLayer because I haven't compiled it yet. > > > > gnu/wxActiveRecordGenerator_DatabaseConnectionDlg.o: In function > > `DatabaseConnectionDlg::DatabaseConnectionDlg(wxWindow*, int, wxString > > const&, wxPoint const&, wxSize const&, long)': > > DatabaseConnectionDlg.cpp:(.text+0x27af): referencia a `vtable for > > DatabaseConnectionDlg' sin definir > > > > > > gnu/wxActiveRecordGenerator_RelationPropertiesDlg.o: In function > > `RelationPropertiesDlg::RelationPropertiesDlg(wxWindow*, int, wxString > > const&, wxPoint const&, wxSize const&, long)': > > RelationPropertiesDlg.cpp:(.text+0x2223): referencia a `vtable for > > RelationPropertiesDlg' sin definir > > For starters you may want to try adding virtual destructors for these > classes, just an empty one like this. I think I've seen error messages > like these before and I'm guessing that they are from the base class > having a vtable, but your subclassed class doesn't explicitly have > one. > > in DatabaseConnectionDlg.h add > virtual ~DatabaseConnectionDlg() {} I did this John. But I made it a non-inline virtual destructor. Because I'= ve=20 read that the vtable shall be alocated in the first non-inline virtual=20 function. Anyway now I'm getting undefined reference to vtable for the destructors. = :( =2E.. plus the previous errors. I do think you are pointing the right way here, but I don't know what to=20 do... Thanks,=20 Matias Szeftel __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas |
From: Klaas H. <db...@nl...> - 2007-02-08 15:35:34
|
Another reason might be mixing up Debug wxWidgest with non debug applicat= ion code. ( flags like __WXDEBUG__ and such ) Klaas John Labenski wrote: > On 2/8/07, Mat=EDas Szeftel <msz...@ya...> wrote: >=20 > For starters you may want to try adding virtual destructors for these > classes, just an empty one like this. I think I've seen error messages > like these before and I'm guessing that they are from the base class > having a vtable, but your subclassed class doesn't explicitly have > one. >=20 --=20 Unclassified |
From: <msz...@ya...> - 2007-02-08 20:37:27
|
El Jueves, 8 de Febrero de 2007 12:33, Klaas Holwerda escribi=F3: > Another reason might be mixing up Debug wxWidgest with non debug > application code. ( flags like __WXDEBUG__ and such ) > Hi Klaas, I'm not using such flags in my code.=20 And I'm using the bakefile generated GNUmakefile. Thanks, Mat=EDas Szeftel __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas |
From: Francesco M. <f18...@ya...> - 2007-02-08 18:01:51
|
yet another source of problems maybe the library order: since it compiles with MSVC (where lib order doesn't care) but doesn't under Linux I suggest you to check that all libraries are orderered in this way: A B C where A is the lib which depends on B and C, B is the one which depends from C and so on (i.e. a library X may only depend from libs listed _after_ X). Another suggestion is to change (from console and temporarily) your locale to be "en_us" (american english) and then copy&paste your error message to google removing the name of your specific function :D HTH, Francesco Klaas Holwerda ha scritto: > Another reason might be mixing up Debug wxWidgest with non debug application code. > ( flags like __WXDEBUG__ and such ) > > Klaas > > John Labenski wrote: >> On 2/8/07, Matías Szeftel <msz...@ya...> wrote: >> > >> For starters you may want to try adding virtual destructors for these >> classes, just an empty one like this. I think I've seen error messages >> like these before and I'm guessing that they are from the base class >> having a vtable, but your subclassed class doesn't explicitly have >> one. >> > |
From: <msz...@ya...> - 2007-02-08 20:46:59
|
El Jueves, 8 de Febrero de 2007 15:01, Francesco Montorsi escribi=F3: > yet another source of problems maybe the library order: since it compiles > with MSVC (where lib order doesn't care) but doesn't under Linux I suggest > you to check that all libraries are orderered in this way: A B C where A > is the lib which depends on B and C, B is the one which depends from C and > so on (i.e. a library X may only depend from libs listed _after_ X). Hi Francesco, this is what I have in my bakefile currently: <wx-lib>xml</wx-lib> <wx-lib>core</wx-lib> <wx-lib>base</wx-lib> <!-- base must be last wx-lib --> > Another suggestion is to change (from console and temporarily) your locale > to be "en_us" (american english) and then copy&paste your error message to > google removing the name of your specific function :D I've already did. Not much information except the one about the vtable bein= g=20 put at the first non-inline virtual function. But, I use NO virtual functions in this table. Thanks, Mat=EDas Szeftel __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas |
From: klaas.holwerda <kho...@xs...> - 2007-02-09 01:34:50
|
Mat=EDas Szeftel wrote: > btw: referencia a `vtable for xxxx' sin definir =3D undefined reference= to=20 > `vtable for xxxx' > =20 Hi Matias, Now i have the same for wxArt2D, never seen it before, but after=20 updating to fedora6, its there. If i find it i let you know :-) Klaas |
From: <msz...@ya...> - 2007-02-09 04:51:54
|
El Jueves, 8 de Febrero de 2007 22:34, klaas.holwerda escribi=F3: > Mat=EDas Szeftel wrote: > > btw: referencia a `vtable for xxxx' sin definir =3D undefined reference= to > > `vtable for xxxx' > > Hi Matias, > > Now i have the same for wxArt2D, never seen it before, but after > updating to fedora6, its there. > If i find it i let you know :-) > > Klaas Damn, tough luck! Did you changed of gcc version? I'm using 4.1 and that's when the problem=20 started. And I've updated to wx2.8 but i don't think that is it. Good luck with that, Mat=EDas __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas |
From: <msz...@ya...> - 2007-02-10 01:01:01
|
Matías Szeftel escribió: > El Jueves, 8 de Febrero de 2007 22:34, klaas.holwerda escribió: > >> Matías Szeftel wrote: >> >>> btw: referencia a `vtable for xxxx' sin definir = undefined reference to >>> `vtable for xxxx' >>> >> Hi Matias, >> >> Now i have the same for wxArt2D, never seen it before, but after >> updating to fedora6, its there. >> If i find it i let you know :-) >> >> Klaas >> > > Damn, tough luck! > > Did you changed of gcc version? I'm using 4.1 and that's when the problem > started. And I've updated to wx2.8 but i don't think that is it. > > Good luck with that, Matías > > Well, I finally got it working. But I don't know what it was. I just used brute force: regenerated the GUI skeleton and copying the code from the old source piece by piece and compiling every change. Nothing happened, it all went smoothly and there weren't any undefined methods at the end...so...no idea why it didn't worked before. All I can guess is that it had something to do with the order of declaration/definition of the methods. Sorry for not finding the problem/solution. Regards, Matías __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas |
From: Klaas H. <db...@nl...> - 2007-02-12 09:24:52
|
Matías Szeftel wrote: > Well, I finally got it working. And in my case it were really missing implementations of declared virtual members in the base class. This is because of a newer gcc, since the code compiled already a long time on Unix. Klaas -- Unclassified |