wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.85k stars 1.71k forks source link

undefined reference to `wxNumberEntryDialog virtual table' #19433

Closed wxtrac closed 2 years ago

wxtrac commented 23 years ago

Issue migrated from trac ticket # 68

priority: normal

2000-10-26 04:29:56: timmann created the issue


I downloaded wxGTK-2.2.2 and built it on Red Hat 7.0 Intel. Trying to link any application in the demos or samples directory produced the error: undefined reference to `wxNumberEntryDialog virtual table'

$ g++ -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.0)

After a little scouting around, I found out that commenting out the interface and implementation pragmas in numdlgg.cpp (as shown below) makes the error go away. I don't have any experience with g++, though I've used cxx on Tru64 Unix quite a bit for C++ development, but from the description in the g++ man page, this code looks like a misuse of the interface/implementation pragmas. However, similar apparent misuses appear in other wxGTK files and don't seem to cause a problem, so I don't claim to know what's going on.

ifdef __GNUG___!! This looks wrong --tpm

_!! #pragma interface "numdlgg.cpp" //!! #pragma implementation "numdlgg.cpp"

endif

wxtrac commented 23 years ago

2000-11-25 23:22:58: @vadz commented


This bug has been fixed in the current version of wxWindows, please upgrade to it and reopen the bug report if the bug doesn't disappear. Thank you.