Skip to content

Instantly share code, notes, and snippets.

@ryantm
Created January 31, 2015 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryantm/74ff316956f0d414fd43 to your computer and use it in GitHub Desktop.
Save ryantm/74ff316956f0d414fd43 to your computer and use it in GitHub Desktop.
ryantm@ryantm0j132 ~/sandbox/simple-shared (master)$ ./build.sh
+ set -e
+ cd library
+ mkdir build
+ cd build
+ cmake ../ -DCMAKE_INSTALL_PREFIX=../../executable -Wno-dev
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ryantm/sandbox/simple-shared/library/build
+ cmake --build . --target install
Scanning dependencies of target add
[100%] Building C object CMakeFiles/add.dir/add.c.o
Linking C shared library libadd.so
[100%] Built target add
Install the project...
-- Install configuration: ""
-- Installing: /home/ryantm/sandbox/simple-shared/executable/./libadd.so
-- Installing: /home/ryantm/sandbox/simple-shared/executable/./add.h
+ cd ../../executable
+ cabal sandbox init
Writing a default package environment file to
/home/ryantm/sandbox/simple-shared/executable/cabal.sandbox.config
Creating a new sandbox at
/home/ryantm/sandbox/simple-shared/executable/.cabal-sandbox
+ cabal install --extra-lib-dirs=. --extra-include-dirs=.
Resolving dependencies...
Configuring executable-0.1.0.0...
Building executable-0.1.0.0...
Preprocessing executable 'executable' for executable-0.1.0.0...
[1 of 1] Compiling Main ( Main.hs, dist/dist-sandbox-bc20fd1a/build/executable/executable-tmp/Main.o )
Linking dist/dist-sandbox-bc20fd1a/build/executable/executable ...
Installing executable(s) in
/home/ryantm/sandbox/simple-shared/executable/.cabal-sandbox/bin
Installed executable-0.1.0.0
ryantm@ryantm0j132 ~/sandbox/simple-shared (master)$ executable/dist/dist-sandbox-bc20fd1a/build/executable/executable
executable/dist/dist-sandbox-bc20fd1a/build/executable/executable: error while loading shared libraries: libadd.so: cannot open shared object file: No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment