Poco compilation error cannot find -lPocoDataMySQL - c++

I am using ubuntu 16 and installed poco library via apt-get install libpoco-dev (version 1.3).
I also have mysql client installed.
However, when I compile a cpp to test mysql connection, the compiler threw error:
cannot find lPocoDataMySQL
cannot find lPocoJSON
it seems it cannot find the lib for the above two
I have already included the following in Makefile
LD_INCLUDE=-I/usr/include/Poco
CPPFLAGS=-Wno-multichar -Wall -lPocoUtil -lPocoFoundation -lPocoJSON -lPocoNetSSL -lPocoData -lPocoDataMySQL -lPocoJSON
g++ -o dbconnector dbconnector.cpp $(LD_INCLUDE) $(CPPFLAGS)
thanks.

The issue has been resolved by install Poco 1.8.
thanks rafix07

Related

fatal error: GL/glx.h: No such file or directory libgl1-mesa-dev already installed

I'm trying to compile skia to compile aseprite on Ubuntu 19.10, I keep getting the error
c++ -MMD -MF obj/src/gpu/gl/glx/gpu.GrGLMakeNativeInterface_glx.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSK_ENABLE_DISCRETE_GPU -DSKIA_IMPLEMENTATION=1 -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/docs -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -fstrict-aliasing -fPIC -O3 -fdata-sections -ffunction-sections -Wno-unused-parameter -std=c++14 -fno-exceptions -fno-rtti -c ../../src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp -o obj/src/gpu/gl/glx/gpu.GrGLMakeNativeInterface_glx.o
../../src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp:15:10: fatal error: GL/glx.h: No such file or directory
15 | #include <GL/glx.h>
| ^~~~~~~~~~
all the posts I've found have said to install libgl1-mesa-dev using apt-get, but I've already done that and I'm still getting the error. I've also tried running install_dependencies.sh in the tools folder, which installed a bunch of other stuff.
You could download the glx file file and copy it to your project file this will fix the error but us not recommended
I figured it out, I had set apt-get to use the oibaf ppa for graphics drivers, purging the ppa and reinstalling from the standard sources fixed it.

Can't use static lib of mongo-cxx-driver on Linux

So I follow the official tutorial for the installation : https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/
Neverless, I can't use the produced libraries as static.
So I managed to compile the C version of the driver as described, I've enabled the flag --enable-static=yes with the ./configure before doing make && sudo make install and I got the libmongoc-1.0.a and the libbson-1.0.a which are static. So this far, everything it's alright.
Then I have done the cxx version of the driver, except that there is no configuration file as in the C version. So I've juste done a
cmake -DCMAKE_BUILD_TYPE=Release -DBSONCXX_POLY_USE_BOOST=1 -DCMAKE_INSTALL_PREFIX=/usr/local
from the build folder, followed by a make && sudo make install
So I got the libmongocxx.a and the libbsoncxx.a, but when I try to compile with them, I can't run the binary because I got the following error :
error while loading shared libraries: libmongocxx.so._noabi: cannot open shared object file: No such file or directory
So I understand that is because there is some symbols missing and then I need to use the shared library to run the binary but I don't want this to happend, I want the symbols within the binary that I can run it without any LD_PRELOAD.
Any suggestions ?
I had the same issue in an Ubuntu 16.04 and I run a apt-get update & apt-get upgrade and the problem was solved.
It seems that there were some update to the compiler and some libraries that prevent some test from reaching the shared libraries.
I have a similar question, and solved, now I compiled and run my binary with static libs successfully.
I write my build script using newlisp, but the static link options are very helpful, I paste it here.
c++ /to/your/path/site/code/back_end/builder/object/files1.cc.o ... /to/your/path/site/code/back_end/builder/object/files10.cc.o -o bin/site -static-libgcc -static-libstdc++ -L/usr/lib -lpthread -l:libmongocxx.a -l:libbsoncxx.a -l:libmongoc-1.0.a -l:libbson-1.0.a -lrt -lssl -lcrypto -lsasl2 -l:libboost_log.a -l:libboost_log_setup.a -l:libboost_system.a -l:libboost_thread.a -l:libboost_filesystem.a -lcppcms -lbooster -lcurl -ljsoncpp

How to uninstall mod_wsgi when installed with make?

I have installed mod_wsgi on Ubuntu 14.04 as described in their documentation. While I don't get any errors from Apache or anything my Django setup does not work (no idea why exactly) so I would like to start over and use libapache2-mod-wsgi.
However, I don't know how to uninstall mod_wsgi. This answer to a more general question on the subject advises trying make uninstall which does not work in this case.
make -n install gives me the following output:
/usr/bin/apxs2 -c -I/usr/include/python2.7 -DNDEBUG -D_FORTIFY_SOURCE=2 -Wc,-g -Wc,-O2 src/server/mod_wsgi.c src/server/wsgi_*.c -L/usr/lib -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
/usr/bin/apxs2 -i -S LIBEXECDIR=/usr/lib/apache2/modules -n 'mod_wsgi' src/server/mod_wsgi.la
What exactly do I have to do to uninstall this?
Thanks!
Edit: I'm using mod_wsgi-4.5.3.
Remove any configuration you added to Apache configuration files and also run:
sudo rm /usr/lib/apache2/modules/mod_wsgi.so
I would strongly recommend against using the system provided mod_wsgi package as it is generally out of date by many many versions and is also thus not supported. You are better off using the latest from source code and trying to work out what the problem is, exact details of which you haven't posted.

Missing jpeglib.h when building pygame in Cygwin

I'm trying to install pygame with cygwin with the step by step below
http://msdl.cs.mcgill.ca/people/tfeng/svmsccdoc/node49.html
Things are going fine until the last part when I'm running theses 3 lines
export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
export CPATH=/usr/local/include/SDL:$CPATH
python setup.py install build
I have this issue
gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration - fdebug-prefix-map=/usr/src/ports/python/python-2.7.8-1.i686/build=/usr/src/debug/python-2.7.8-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.8-1.i686/src/Python-2.7.8=/usr/src/debug/python-2.7.8-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/NEED_INC_PATH_FIX -I/usr/include/python2.7 -c src/imageext.c -o build/temp.cygwin-1.7.33-i686-2.7/src/imageext.o
src/imageext.c:35:21: erreur fatale: jpeglib.h : No such file or directory
#include <jpeglib.h>
As you can see, the file jpeglib.h is missing
I tried to install the missing file by downloading the lib
apt-cyg install libjpeg62
But to no avail
Does anyone have seen that issue before? I browsed the net but found nothing relevant.
TIA
libjpeg62 doesn't have jpeglib.h. You need libjpeg-devel instead.
You can search for specific files in packages using the package search function on the Cygwin website.
You can download an already compiled version of PyGame and skip these steps. This can be painful sometimes.
Just check this page : http://www.lfd.uci.edu/~gohlke/pythonlibs/
or
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame , to get directly to PyGame section.
The Python extension unofficial windows binaries. You can find alot of Python libraries on this page.
Using theses packages will make you save a lot of time.

Compiling boost_asio/example/ssl/server.cpp on macosx works on linux

server.cpp - http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/example/ssl/server.cpp
I am trying to build this on my mac. Using the following. (builds fine on my ubuntu system)
g++ -I /usr/local/boost/ sslserver.cpp -o sslserver -lboost_system -lssl -lpthread
My libs are located in /usr/local/lib so I tried adding -L /usr/local/lib after the includes. However, I have built other projects before using -lboost_system -lpthread without any issues or specifying the libs.
The error is huge > https://dl.dropbox.com/u/15586644/error.txt
Its mainly lots of deprecated methods warnings - I doubt anything is deprecated.
followed by Undefined symbols for architecture x86_64.
How should I go about building server.cpp on MacOSX?
See
- Why is Apple Deprecating OpenSSL in MacOS 10.7 (Lion)?
Apple is migrating from OpenSSL to Common Crypto, hence depreciated warnings