how could I connect the saved implementations in subversion to the main/test program outside the subversion?

I want to use the saved file in the subversion as a library so that i could use it in any programs...

tnx in advance...

Dani AI

Generated

Short answer for : treat the code in Subversion as a real library project (separate headers and sources, a build script) and either (a) check out/export and build/install the library once and link the installed artifact from other projects, or (b) pull the library source into the consuming working copy with an svn external and build it as part of the consumer. pointed to Subversion resources earlier; here are practical, concrete workflows and cautions so the link step actually works.

Minimum recommended workflow (high level):

  • In the lib repo: arrange include/ and src/, add a Makefile or CMake that builds a static (.a/.lib) or shared (.so/.dll) library and provides an install target. Create tags for releases.

  • To consume the library, either export/checkout and build/install, for example:

    svn checkout <LIB_URL> libdir
    cd libdir
    ./configure && make && make install

    or use an svn external (pin to a tag for stability):

    svn propset svn:externals "mylib <LIB_TAG_URL>" .
    svn update

Linking example (Unix):

g++ main.cpp -I/usr/local/include -L/usr/local/lib -lmylib

Key cautions and troubleshooting:

  • C++ ABI: mix-and-match compilers, standard library versions, or differing compiler flags can produce linker/runtime failures. For cross-compiler stability, expose a C API or use header-only or source-included builds.
  • Prefer pinned tags in svn:externals instead of trunk to avoid unexpected changes.
  • Do not store built binaries in SVN as a long-term practice; store source and build artifacts in CI or a binary repo.
  • If “undefined reference” errors appear, check -l order, include paths, and that the library was actually built for the same ABI. If a shared lib fails at runtime, check LD_LIBRARY_PATH/rpath (or Windows DLL search paths) and use tools like ldd to inspect dependencies.

For : the above is a concise, practical sequence to get a Subversion-stored C++ implementation usable from other projects.

Recommended Answers

All 2 Replies

are you talking about ?

Sorry I didn't understand anything at all.. !
Hopefully someone else will, and reply..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.