Thread: Help with dlg

Help with dlg

From
Jasmin Dizdarevic
Date:
Hi, 

I'd like to work on this item "Ability to search a database for objects with a specific name.".
I've took frmReport.cpp as template for the Search Object UI. I've created
frm/frmSearchObject.cpp
include/frm/frmSearchObject.h
ui/frmSearchObject.xrc
added #include "frm/frmSearchObject.h" to include/precomp.h

I'm getting this error when building the project.

Error 2 error LNK2019: unresolved external symbol "private: void __thiscall frmSearchObject::OnChange(class wxCommandEvent &)" (?OnChange@frmSearchObject@@AAEXAAVwxCommandEvent@@@Z) referenced in function "void __cdecl `dynamic initializer for 'private: static struct wxEventTableEntry const * const frmSearchObject::sm_eventTableEntries''(void)" (??__E?sm_eventTableEntries@frmSearchObject@@0QBUwxEventTableEntry@@B@@YAXXZ) C:\development\pgadmin3\pgadmin\frmSearchObject.obj pgAdmin3

Is there another step to take when adding forms to the project?

Regards,
Jasmin

Re: Help with dlg

From
Dave Page
Date:
On Sat, May 28, 2011 at 10:09 AM, Jasmin Dizdarevic
<jasmin.dizdarevic@gmail.com> wrote:
> Hi,
> I'd like to work on this item "Ability to search a database for objects with
> a specific name.".
> I've took frmReport.cpp as template for the Search Object UI. I've created
> frm/frmSearchObject.cpp
> include/frm/frmSearchObject.h
> ui/frmSearchObject.xrc
> added #include "frm/frmSearchObject.h" to include/precomp.h
> I'm getting this error when building the project.
> Error 2 error LNK2019: unresolved external symbol "private: void __thiscall
> frmSearchObject::OnChange(class wxCommandEvent &)"
> (?OnChange@frmSearchObject@@AAEXAAVwxCommandEvent@@@Z) referenced in
> function "void __cdecl `dynamic initializer for 'private: static struct
> wxEventTableEntry const * const
> frmSearchObject::sm_eventTableEntries''(void)"
> (??__E?sm_eventTableEntries@frmSearchObject@@0QBUwxEventTableEntry@@B@@YAXXZ)
> C:\development\pgadmin3\pgadmin\frmSearchObject.obj pgAdmin3
> Is there another step to take when adding forms to the project?

I assume you added all the files to the project? If so, I'd double
check your function signatures, particularly
frmSearchObject::OnChange(class wxCommandEvent &). Make sure they
match what's in the header, and that you remembered to change the
class name in the implementation if you copied anything from
frmReport.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Help with dlg

From
Jasmin Dizdarevic
Date:
Thanks!
I've forgotten to implement frmSearchObject::OnChange() in frmSearchObject.cpp.

2011/5/28 Dave Page <dpage@pgadmin.org>
On Sat, May 28, 2011 at 10:09 AM, Jasmin Dizdarevic
<jasmin.dizdarevic@gmail.com> wrote:
> Hi,
> I'd like to work on this item "Ability to search a database for objects with
> a specific name.".
> I've took frmReport.cpp as template for the Search Object UI. I've created
> frm/frmSearchObject.cpp
> include/frm/frmSearchObject.h
> ui/frmSearchObject.xrc
> added #include "frm/frmSearchObject.h" to include/precomp.h
> I'm getting this error when building the project.
> Error 2 error LNK2019: unresolved external symbol "private: void __thiscall
> frmSearchObject::OnChange(class wxCommandEvent &)"
> (?OnChange@frmSearchObject@@AAEXAAVwxCommandEvent@@@Z) referenced in
> function "void __cdecl `dynamic initializer for 'private: static struct
> wxEventTableEntry const * const
> frmSearchObject::sm_eventTableEntries''(void)"
> (??__E?sm_eventTableEntries@frmSearchObject@@0QBUwxEventTableEntry@@B@@YAXXZ)
> C:\development\pgadmin3\pgadmin\frmSearchObject.obj pgAdmin3
> Is there another step to take when adding forms to the project?

I assume you added all the files to the project? If so, I'd double
check your function signatures, particularly
frmSearchObject::OnChange(class wxCommandEvent &). Make sure they
match what's in the header, and that you remembered to change the
class name in the implementation if you copied anything from
frmReport.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company