wxsqlite3-3.5.8 linux problem

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.
eetnev
In need of some credit
In need of some credit
Posts: 6
Joined: Sun Dec 17, 2017 9:36 pm

wxsqlite3-3.5.8 linux problem

Postby eetnev » Wed Dec 27, 2017 9:17 pm

Hi,

I have installed wxWidgets-3.0.3 on Ubuntu 16.04.2 LTS and have run minimal sample with success. Now I'm trying to get wxsqlite3-3.5.8 working but I'm almost clueless how to do this. I followed instructions in readme.md (see attachment) but could not get wxsqlite minimal sample running. There's a following warning in configure output

Code: Select all

Warning: No config found to match: /usr/local/bin/wx-config --static --libs adv,base,core,xml in /usr/local/lib/wx/config


and I have a feeling I didn't configure wxWidgets right (see below).

Code: Select all

../configure --enable-monolithic --enable-unicode --enable-debug


Here's the result when trying to run wxsqlite minimal sample.

Code: Select all

./minimal: error while loading shared libraries: libwx_gtk2u-3.0.so.0: cannot open shared object file: No such file or directory


Any help would be appreciated.
Attachments
wxsqlite3-3.5_ubuntu.txt
(11.01 KiB) Downloaded 35 times

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2626
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxsqlite3-3.5.8 linux problem

Postby ONEEYEMAN » Wed Dec 27, 2017 10:47 pm

Hi,
Did you compile the library yourself or installed it from the repository?

In the former case you probably need to run "ldconfig" as suggested by "make install" output" in order to update the library cache.
In the latter case - how did you configure wxSQLite?

Thank you.

DavidHart
Site Admin
Site Admin
Posts: 3764
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxsqlite3-3.5.8 linux problem

Postby DavidHart » Wed Dec 27, 2017 10:53 pm

Hi,
I have a feeling I didn't configure wxWidgets right

I've zero wxsqlite3 experience, but I suspect your feeling is correct.

If the wxsqlite3 instructions demand a particular wxWidgets configuration, create that. If not, I suggest you try what it seems to be looking for:
./configure --disable-shared
BTW, using enable-monolithic is almost always wrong in Linux.

Another suggestion: If you prefer not to keep having to install/uninstall wxWidgets for each experimental build, you can instead build in subdirs of the wx source-code, e.g. 'build-static'. For each build you'd do something like:

Code: Select all

mkdir build-static
cd build-static/
../configure --disable-shared --prefix=$(pwd)
make -j

You don't need to 'make install'.

To use that build you'd open a terminal and do:
PATH=/full/path/to/build-static:$PATH
Then that static build will be the one used for building wx programs in that terminal. You can confirm it happens by viewing the output of:
wx-config --list
wx-config --cxxflags
wx-config --libs

Regards,

David

eetnev
In need of some credit
In need of some credit
Posts: 6
Joined: Sun Dec 17, 2017 9:36 pm

Re: wxsqlite3-3.5.8 linux problem

Postby eetnev » Thu Dec 28, 2017 1:23 am

DavidHart wrote:If the wxsqlite3 instructions demand a particular wxWidgets configuration, create that. If not, I suggest you try what it seems to be looking for:
./configure --disable-shared
BTW, using enable-monolithic is almost always wrong in Linux.


Okay, so I builded wxWidgets with your instructions for a fresh Ubuntu and added build-static-debug to PATH (nice tip). I also changed wxsqlite3's configuration a little bit.

wxWidgets' configuration: ../configure --enable-unicode --enable-debug --disable-shared --prefix=$(pwd)

wxsqlite3's congiratuon: ../configure --prefix=$(pwd) --disable-shared

wxsqlite3's compilation produces few warnings but minimal sample runs fine.

Code: Select all

eetnev@eetnev-VirtualBox:~/wxsqlite3-3.5.8/build-static$ make
  CC       sqlite3/secure/src/sqlite3secure.lo
  CXX      src/wxsqlite3.lo
  CXXLD    libwxcode_gtk2u_wxsqlite3-3.0.la

*** Warning: Linking the shared library libwxcode_gtk2u_wxsqlite3-3.0.la against the
*** static library /home/eetnev/wxWidgets-3.0.3/build-static-debug/lib/libwx_gtk2u_core-3.0.a is not portable!

*** Warning: Linking the shared library libwxcode_gtk2u_wxsqlite3-3.0.la against the
*** static library /home/eetnev/wxWidgets-3.0.3/build-static-debug/lib/libwx_baseu-3.0.a is not portable!
ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      samples/minimal.o
  CXXLD    samples/minimal
  CXX      samples/treeview/foldertree.o
  CXX      samples/treeview/projectlist.o
  CXX      samples/treeview/treeviewapp.o
  CXX      samples/treeview/treeviewsample.o
  CXXLD    samples/treeview/treeview


Next I'll have to try how all of this work on my own project. If someone has anything to say about the warnings above I'd like to hear.

Thanks for the help!

Edit:

ONEEYEMAN wrote:Did you compile the library yourself or installed it from the repository?


https://github.com/utelle/wxsqlite3/releases

I downloaded source code (tar.gz) and followed the instructions in readme.


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 3 guests