Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by AshtonC1 »

I'm trying to simply move a simple C++ demo app from my desktop pc to a notebook pc.
Every app works except one with wxSQLite3.
I can find where the lib and header files are located, but I must not be satisfying a search location.

Would this be only involving the header:

Code: Select all

#include <wx/wxsqlite3.h>
?

Any advice appreciated.
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by doublemax »

wxSQLite3 is not part of wxWidgets, you have to install and build it separately:
https://github.com/utelle/wxsqlite3
Use the source, Luke!
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by AshtonC1 »

Thanks Doublemax.

So this sounds as if wxSQLite3 isn't installed doesn't it?

I have built and installed wxSQLite3 in this case using (../configure, make, make install). Correct?
I did install SQLite3 first...
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by doublemax »

Did you add the wxSQLite libraries to your project in the linker settings?
Use the source, Luke!
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by AshtonC1 »

Did you add the wxSQLite libraries to your project in the linker settings?
This may be it.

In the working app this linker library exists: /usr/local/lib/libwxcode_gtk2u_wxsqlite3-3.0.so.0
(Was Blank in non-working app.)

In the the non-working PC, I can not find this exact file, or any .so.0 files, only .a files.

What does that say? Improper install?
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by doublemax »

That sounds like a Linux problem, which i unfortunately can't help with.
Use the source, Luke!
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Undefined reference to `wxSQLite3Database'. wxWidgets,Code::Blocks, Linux

Post by AshtonC1 »

Problem solved.
Yes, a very Linux issue, I'm still learning.

I had to install the wxSQLite3 package using these http://thelinuxfaq.com/ubuntu/ubuntu-17 ... e3-3.0-dbg Terminal instructions, which created a Debian Package.

Which created the needed libwxsqlite3-3.0.so.0 file.

Thanks for your time.
Post Reply