B
Brian J. Ackermann
Hi everybody,
I'm new to c++, and I'm working on this simple little application,
which ought to compile just fine, but I'm missing something. The
program has 4 file, 2 headers, and 2 cpp files. All files exist in
the same directory. The files compile fine, but when linking, I get
all these undefined references. The routines exist in
AboutDialog.cpp, and are declared in AboutDialog.h. Main.h references
AboutDialog.h, and Main.cpp references Main.h...
I can't see why it thinks the class is undefined, or whatever...I'm
sure its quite simple....
project1_main.o(.text+0x1166): In function
`ZN7MyFrame7OnAboutER14wxCommandEvent':
C:/WORK/P2/main.cpp:88: undefined reference to
`AboutDialog::AboutDialog(wxWindow*)'
project1_main.o(.text+0x11d7):C:/WORK/P2/main.cpp:89: undefined
reference to `AboutDialog::SetText(wxString const&)'
project1_main.o(.text+0x122e):C:/WORK/P2/main.cpp:90: undefined
reference to `AboutDialog::SetText2(wxString const&)'
make: *** [project1.exe] Error 1
Can anybody offer a suggestion? Thanks
Brian
I'm new to c++, and I'm working on this simple little application,
which ought to compile just fine, but I'm missing something. The
program has 4 file, 2 headers, and 2 cpp files. All files exist in
the same directory. The files compile fine, but when linking, I get
all these undefined references. The routines exist in
AboutDialog.cpp, and are declared in AboutDialog.h. Main.h references
AboutDialog.h, and Main.cpp references Main.h...
I can't see why it thinks the class is undefined, or whatever...I'm
sure its quite simple....
project1_main.o(.text+0x1166): In function
`ZN7MyFrame7OnAboutER14wxCommandEvent':
C:/WORK/P2/main.cpp:88: undefined reference to
`AboutDialog::AboutDialog(wxWindow*)'
project1_main.o(.text+0x11d7):C:/WORK/P2/main.cpp:89: undefined
reference to `AboutDialog::SetText(wxString const&)'
project1_main.o(.text+0x122e):C:/WORK/P2/main.cpp:90: undefined
reference to `AboutDialog::SetText2(wxString const&)'
make: *** [project1.exe] Error 1
Can anybody offer a suggestion? Thanks
Brian