Discussion:
Problem with wxEmail and 3.0.1 (GTK)
Fulvio Senore
2014-09-08 14:49:04 UTC
Permalink
I am porting a large program from wxWidgets 2.9.4 to 3.0.1 and I am
having a problem.

Everything works well under Windows but under Linux I get the following
errors:

/media/disco2/wxEMail-1.0-Beta-2/lib/3.0.1/libwxcode_gtk2u_email-3.0.a(wxEMail_lib_wxemail.o):
In function
`wxNavigationEnabled<wxNonOwnedWindow>::AddChild(wxWindowBase*)':
wxemail.cpp:(.text._ZN19wxNavigationEnabledI16wxNonOwnedWindowE8AddChildEP12wxWindowBase[wxNavigationEnabled<wxNonOwnedWindow>::AddChild(wxWindowBase*)]+0x23):
undefined reference to `wxControlContainerBase::SetCanFocus(bool)'
/media/disco2/wxEMail-1.0-Beta-2/lib/3.0.1/libwxcode_gtk2u_email-3.0.a(wxEMail_lib_wxemail.o):
In function
`wxNavigationEnabled<wxNonOwnedWindow>::RemoveChild(wxWindowBase*)':
wxemail.cpp:(.text._ZN19wxNavigationEnabledI16wxNonOwnedWindowE11RemoveChildEP12wxWindowBase[wxNavigationEnabled<wxNonOwnedWindow>::RemoveChild(wxWindowBase*)]+0x23):
undefined reference to `wxControlContainerBase::SetCanFocus(bool)'
/media/disco2/wxEMail-1.0-Beta-2/lib/3.0.1/libwxcode_gtk2u_email-3.0.a(wxEMail_lib_wxSSLSocketClient.o):
In function
`wxSSLSocketClient::OpenSslInitialisator::LoadSymbol(wxDynamicLibrary&,
wxString const&, wxString const&)':
wxSSLSocketClient.cpp:(.text+0xc45): undefined reference to
`wxTranslations::GetString(wxString const&, wxString const&) const'

Some time ago I tested under Mac/Carbon and I am reasonably sure that I
got the same errors with 3.0.1 (at the moment I cannot verify).

This is strange since I am sure that I have been able to build the
program under previous versions (2.9.5 or maybe 3.0.0).

Does anybody have a suggestion about the possible cause of this problem?

Thanks in advance.

Fulvio Senore
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-09-08 17:38:52 UTC
Permalink
On Mon, 08 Sep 2014 16:49:04 +0200 Fulvio Senore wrote:

FS> I am porting a large program from wxWidgets 2.9.4 to 3.0.1 and I am
FS> having a problem.
FS>
FS> Everything works well under Windows but under Linux I get the following
FS> errors:
FS>
FS> /media/disco2/wxEMail-1.0-Beta-2/lib/3.0.1/libwxcode_gtk2u_email-3.0.a(wxEMail_lib_wxemail.o):
FS> In function
FS> `wxNavigationEnabled<wxNonOwnedWindow>::AddChild(wxWindowBase*)':
FS> wxemail.cpp:(.text._ZN19wxNavigationEnabledI16wxNonOwnedWindowE8AddChildEP12wxWindowBase[wxNavigationEnabled<wxNonOwnedWindow>::AddChild(wxWindowBase*)]+0x23):
FS> undefined reference to `wxControlContainerBase::SetCanFocus(bool)'
FS> /media/disco2/wxEMail-1.0-Beta-2/lib/3.0.1/libwxcode_gtk2u_email-3.0.a(wxEMail_lib_wxemail.o):
FS> In function
FS> `wxNavigationEnabled<wxNonOwnedWindow>::RemoveChild(wxWindowBase*)':
FS> wxemail.cpp:(.text._ZN19wxNavigationEnabledI16wxNonOwnedWindowE11RemoveChildEP12wxWindowBase[wxNavigationEnabled<wxNonOwnedWindow>::RemoveChild(wxWindowBase*)]+0x23):
FS> undefined reference to `wxControlContainerBase::SetCanFocus(bool)'
FS> /media/disco2/wxEMail-1.0-Beta-2/lib/3.0.1/libwxcode_gtk2u_email-3.0.a(wxEMail_lib_wxSSLSocketClient.o):
FS> In function
FS> `wxSSLSocketClient::OpenSslInitialisator::LoadSymbol(wxDynamicLibrary&,
FS> wxString const&, wxString const&)':
FS> wxSSLSocketClient.cpp:(.text+0xc45): undefined reference to
FS> `wxTranslations::GetString(wxString const&, wxString const&) const'
FS>
FS> Some time ago I tested under Mac/Carbon and I am reasonably sure that I
FS> got the same errors with 3.0.1 (at the moment I cannot verify).
FS>
FS> This is strange since I am sure that I have been able to build the
FS> program under previous versions (2.9.5 or maybe 3.0.0).
FS>
FS> Does anybody have a suggestion about the possible cause of this problem?

A wild guess would be that you have a wrong library order. When using
static libraries, their order on the linker command line does matter and
if the library A uses symbols from the library B, A must come before B.

In any case, I don't think it's anything to do with wxEmail per se, these
symbols definitely exist, so you're just not linking correctly (or not
linking with the correct libraries).

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Fulvio Senore
2014-09-09 15:26:07 UTC
Permalink
Post by Vadim Zeitlin
A wild guess would be that you have a wrong library order. When using
static libraries, their order on the linker command line does matter and
if the library A uses symbols from the library B, A must come before B.
In any case, I don't think it's anything to do with wxEmail per se, these
symbols definitely exist, so you're just not linking correctly (or not
linking with the correct libraries).
I checked and library order was OK. Building is handled by CMake and
2.9.4 worked correctly, so this was expected.

You are right, it was a sort of linking error. I built wxEmail against
3.0.1 in the same folder previously used to build against 2.9.4. I ran
configure again but I probably forgot to make clean. Now I ran make
clean and I was able to build the program.

Thank you for your hint about a linking error, it was very helpful.

Fulvio Senore
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...