On 27 February 2013 21:09, Kevin Rose <[email protected]> wrote:
> I just tried to use the version at the head of github, but couldn't get it
> to build.  Am I doing something wrong?
>
> I cd'ed into src/core and typed "make -f Makefile.basic" just like I am
> doing with 3.1.0 but I get this following error:


Kevin,

You're using the classic Makefiles for Unix-only.
These Makefiles are considered as secondary build configuration
and have not been maintained. I have never used them myself.
I'll be happy to accept patches for these Makefiles.

> backend-loader.cpp:20:34: error: soci_backends_config.h: No such file or
> directory
> backend-loader.cpp: In function ‘std::vector<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> std::allocator<std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > > ><unnamed>::get_default_paths()’:
> backend-loader.cpp:107: error: ‘DEFAULT_BACKENDS_PATH’ was not declared in
> this scope
> backend-loader.cpp:115: error: ‘DEFAULT_BACKENDS_PATH’ was not declared in
> this scope
> make[1]: *** [backend-loader.o] Error 1

You may try to fix it by createing the missing header manually
cp soci/src/core/soci_backends_config.h.in soci/src/core/soci_backends_config.h

Then edit this line
#define DEFAULT_BACKENDS_PATH "@CMAKE_INSTALL_PREFIX@/@LIBDIR@"
to read something like
#define DEFAULT_BACKENDS_PATH "/usr/lib"

Hopefully that's the only missing bit.

The primary maintained build configuration for SOCI is CMake.
Once you have CMake installed, building SOCI on Unix, it's usually as simple as:

git clone git://github.com/SOCI/soci.git
mkdir mybuild
cd mybuild
cmake ../soci/src
make

There are numerous options you can control it:
http://soci.sourceforge.net/doc/installation.html#cmake

For example, if you want only SOCI+Oracle, you can switch everything else off:

cmake \
   -DSOCI_DB2=OFF \
   -DSOCI_EMPTY=OFF \
   -DSOCI_MYSQL=OFF \
   -DSOCI_ODBC=OFF \
   -DSOCI_ORACLE=ON \
   -DSOCI_POSTGRESQL=OFF \
   -DSOCI_SQLITE3=OFF \
   /path/to/soci/src

Optionally, if you want to run tests with "make test", you can
automatically configure
connection details, just add another option

-DSOCI_ORACLE_TEST_CONNSTR="service=xxx user=xxx password=xxx"


Finally, issue:

make
make test



Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to