How to build and use epgsql (erlang) - postgresql

My erlang program directory structure is below:
src
pgtest.erl
lib
epgsql
rebar
I downloaded the epgsql library from https://github.com/epgsql/epgsql
then tried to build it with make which gave me the below error:
make: rebar: Command not found
make: *** [compile] Error 127
So then I downloaded rebar from https://github.com/basho/rebar and build it. It was build successfully and gave me the message.
Congratulations! You now have a self-contained script called "rebar"
in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps.
So as per my understanding I copied the rebar script from the rebar directory to my epgsql directory and then tried to make again. However, I got the same error. I know I am doing it wrong, but not sure what to do?

You can see in the epgsql Makefile[1] that is defining the command as just rebar. If it were defined as ./rebar then it would work to put it in the same directory. Since it's not, you'll need to put it somewhere in your PATH, as the output of rebar's make instructed.
Erlang projects that include rebar itself will generally specify ./rebar, while those that don't will expect it in to be located somewhere in your PATH.
[1] https://github.com/epgsql/epgsql/blob/master/Makefile#L1

Related

how to compile kdesvn from githib repo

I've downloaded the sources for kdesvn from the github repo as I'm thinking to look into working on an addition to the project. Now turns out, I'm not even able to properly compile the downloaded sources: I've created a directory kdesvn-build changed into it and launched cmake ../ (as described on https://github.com/KDE/kdesvn/blob/master/INSTALL-cmake) which does some stuff but then stops saying:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: SUBVERSION_INCLUDE_DIR
Now, I don't know what SUBVERSION_INCLUDE_DIR should be set to nor could I find it searching around the web. Anyone?
It is a directory containing svn_*.h files. If you are on Linux, you'd need to install something like subversion-dev package. On FreeBSD headers are installed with main package, and the directory is /usr/local/include/subversion-1/.

Error: the program can't start because ImgProc.dll (third party library) is missing from your computer

I have three files ImgProc.h, ImgProc.lib, and ImgProc.dll created by Matlab. I imported them to my VSC++ 2012 MFC project, but when I ran it, the error occurred. I did add the ImgProc.lib into the linker-> input->additional dependencies, Copied 3 files into project directory.
I could not add references. Because when I tried, it was empty like:
that
I really appreciate if someone could help me.
ImgProc.dll must be available at runtime in your application's directory. You need to manually copy this file to your output directories for both Debug and Release builds. Alternatively you can create a post-build step that does the copying. Having ImgProc.dll in your project directory is not enough - your project directory is not part of the Dynamic-Link Library Search Order.

SCP Ant task errors with Cause: Could not load a dependent class com/jcraft/jsch/Logger

I am trying to use an SCP task within Ant within Eclipse.
I have downloaded this file: http://sourceforge.net/projects/jsch/files/jsch.jar/0.1.50/jsch-0.1.50.jar/download
and put it in C:\software\eclipse\plugins\org.apache.ant_1.8.4.v201303080030\lib
(ant-jsch.jar already exists in this folder) The other folder listed (the one in my home directory) does not exist.
Unfortunately I am getting the following output when trying to use the SCP task:
Buildfile: C:\Users\rhughes\workspace\project\build-all.xml
scp-test:
BUILD FAILED
C:\Users\rhughes\workspace\project\build-all.xml:5: Problem: failed to create task or type scp
Cause: Could not load a dependent class com/jcraft/jsch/Logger
It is not enough to have Ant's optional JARs
you need the JAR files that the optional tasks depend upon.
Ant's optional task dependencies are listed in the manual.
Action: Determine what extra JAR files are needed, and place them in one of:
-C:\software\eclipse\plugins\org.apache.ant_1.8.4.v201303080030\lib
-C:\Users\rhughes\.ant\lib
-a directory added on the command line with the -lib argument
How can I fix this?
I have faced the similar issue, Its due jsch.jar missing for scp connection in default ant installation and you need to download updated jsch.jar and put into apache-ant/lib directory. Please refer to the below similar post-
Ant scp task not working, even with jsch on ant/lib
Thanks
Ajay Sony

Boost.python failed with libboost_python.so.1.41.0: cannot open shared object file

I have already installed Boost.Python. There were no erros during instalation, but I have a problem. When I try to build my project ererything is OK, but when I run my wrapped project there is an error:
import wrraped_project
ImportError: libboost_python.so.1.41.0: cannot open shared object file: No such file or directory
I tried to copy the project to libboost_python.so.1.41.0 also the lib to the project etc. But every time I have the sme error.
Check if the boost library files are in LD_LIBRARY_PATH.
If that doesn't help, check if the filename is correct, and create a symlink if different.
Can you give us the relevant content of your /usr/lib directory? I'm assuming you're on Linux, right? And did you install Boost.Python with a package manager?

How do I build project files and packages for Borland C++ Builder 5 from the command line?

How do I build Borland C++ project files (bpr) and package files (bpk) from the command line? Project groups (bpg) are apparently make files and can be compile with make. But bpks and bprs are xml based and the Export to Makefile won't compile with make.
If I put a project in a bpg, make can't seem to find any of the files specified in the bpg since they all appear to be relative references. I changed the references to absolutes and make reports:
Fatal: Unable to open makefile
You don't need to directly compile a bpr. Just create a bpk which just includes that single bpr, and you can use make to compile it.
"c:\program files\borland\cbuilder5\bin\make" -B -s -fabc.bpg
If you also have other borland compilers installed, do not call the make.exe from the other compiler.
EDIT: execute the make command in the directory where the bpg and bpr is located.
Using bpr2mak and make works for me just fine, so as Roger said, you need to give details on what errors you're getting. BPK files can also be processed with bpr2mak. I'm using this method to compile a large project with many components, without difficulties.
Perhaps you could give some more information on 'won't compile'.
I.e. What error messages are you getting.
One frequent problem the come up with make is addressed at the following
http://www.delphigroups.info/3/8/36427.html