I am now compiling libxml2 on windows 8 using mingw32.
I have downloaded from here ftp://xmlsoft.org/libxml2/ and follow the instruction found in the README file. They instruct to configure make using a javascript called configure.js. We can run the script like this:
cscript configure.js compiler=msvc prefix=c:\opt include=c:\opt\include lib=c:\opt\lib debug=yes
I guess there is a super simple and maybe obvious to this question, but how do I set several lib and include folders ? I tried separating with ";" :
cscript configure.js compiler=mingw zlib=yes prefix=C:\cpp\libraries\libxml2 include=C:\cpp\libraries\iconv-1.9.2.win32\include;C:\cpp\libraries\zlib1.2.3\GnuWin32\include lib=C:\cpp\libraries\iconv-1.9.2.win32\lib;C:\cpp\libraries\zlib1.2.3\GnuWin32\lib
but that did not work out. Did not find anything about that in the readme file ...
finally things were not so difficult.
the javascript script create a file config.mingw that is easy to edit, in this case manually adding the paths separately with -I, in my case:
INCLUDE+= -IC:\cpp\libraries\iconv\GnuWin32\include -IC:\cpp\libraries\zlib1.2.3\GnuWin32\include
LIB+= -LC:\cpp\libraries\iconv\GnuWin32\lib -LC:\cpp\libraries\zlib1.2.3\GnuWin32\lib
Related
i'm trying to build the example to run an erlang websocket server.
I created all that files and put them into one folder, add the rebar file and ran
./rebar get-deps
inside the folder direction.
But there is no
make
make runconsole
and nothing's happening.
Is there also a possibility to create that websocket server using IntelliJ? I tried to put that 3 .erl files into IntelliJ and want to Build the project but I receive
erlc: 2: Warning: behaviour cowboy_http_handler undefined
The make command reads something called a Makefile, which is a file written in a certain format, which tells the make command what it is supposed to do, e.g. compile some files with the listed names using the listed commands. Because there is no Makefile listed in that tutorial, you should have gotten an error something like this:
No targets specified and no makefile found.
You can contact the author of the tutorial at his github account and ask him where the Makefile is. Actually, the Makefile for the tutorial is here:
https://github.com/marcelog/erws
I created all that files and put them into one folder
The instructions in the Makefile depend on the exact directory structure that the author has here:
https://github.com/marcelog/erws
I tried using rebar3 and changing some stuff in the Makefile, but I still got errors. The problem is that rel directory: I don't know how to create all the stuff in there. You need to use rebar and reltool for that:
https://gist.github.com/FabioBatSilva/f1d1c4ea250302fed8c2
Here is a cowboy websockets example that I came up with last year, see if it helps:
How to Connect Cowboy (Erlang) websocket to webflow.io generated webpage
It uses the Erlang.mk build system as described in the cowboy docs here:
https://ninenines.eu/docs/en/cowboy/2.5/guide/getting_started/
we working on a C++/CMake project, that needs to run in both Windows and Linux. On Windows, we have to work with a number Visual Studio versions, both in 32- and 64 bit. In order to alleviate dependency issues in our team, we have manually compiled a number of dependencies for each configuration(vs2013_x64, vs2013_x86, vs2012_x64, vs2013_x86...) and installed them (using make install or similar commands) to a common folder for each configuration. Now we have a folder called "vs2013_x64" for example, that contains similar folders as /usr would on linux: CMake, include, lib, share, ...
Now my question is: How do I have to set up CMake, so that it treats this vs2013_x64 folder just like it does /usr on Linux?
I found a number of variables that seem related, for example
CMAKE_FIND_ROOT_PATH and CMAKE_SYSROOT. However, setting them to my vs2013_x64 folder for example does not work: FindXXX.cmake files in the vs2013_x64/CMake folder are not found, and even when I manually set the CMAKE_MODULE_PATH to that CMake folder, the Find* scripts are unable to find the include they are looking for, because the vs2013_x64/include folder does not appear to be searched.
A solution that did work was to set the CMAKE_PREFIX_PATH. This is nice and almost what I need, but lets say that on Linux, I would not want it to look at /usr at all under any circumstances. This would not be possible using the PREFIX_PATH solution if I understand it correctly.
From what I understood from the documentation,
CMAKE_FIND_ROOT_PATH is more configurable and has a number of additional variables such as CMAKE_FIND_ROOT_PATH_MODE_PROGRAM, CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This makes me believe that FIND_ROOT_PATH is what I actually SHOULD be doing - yet I am unable to make it work
Does what I am trying to do make sense? Can anyone clarify when and how to use what? Ideally, I would like a solution that allows me to set the search path to my vs2013_x64 folder on Windows, that defaults to /usr on Linux, but can optionally also be set to another directory containing lib/include/cmake folders. In addition, it would be nice if searching ONLY occurred in the configured path and nowhere else (to avoid mistakenly picking a library that was installed system-wide).
Thanks!
I have a few headers and source files which I want to be common between two sketches (as they are communication interfaces) but I can't include them in my sketches: this very arguable system of tabs refuses to find them when I use relative paths.
Example:
Project
-interface.h
-interface.cpp
-sketch1
--sketch1.ino
-sketch2
--sketch2.ino
I would like to do:
#include "../interface.h"
Without making a library out of it and putting it elsewhere (so as not to have to move around files when they are handed out to somebody else).
Thank you for your help (I'm growing mad over here ),
Mister Mystère
P.S: Version is 1.0.5 on Windows
The bad news is you probably have to place interface.h/c in a library folder. The good news is that it is not that difficult. Simply create a folder named "interface" as a peer to other library folders and cut/paste interface.h/c into that folder.
Finally, after creating the new folder/lib you will need to completely exit Arduino's IDE and restart it, before you can select a new "interface" lib for your sketch.
Create symbolic links to all of the required files.
Linux
ln -s sourcefile targetfile
Windows
mklink targetfile sourcefile
I am developing a library which uses CMake to control it. It would be good to provide a "FindXXX.cmake" which locates the library and header files. This file would enable the users to use the command "find_package(XXX)" to find my library.
However, I don't know how to install my lib's "FindXXX.cmake" to an correct location. I failed to find a CMake's build-in mechanism to install a "FindXXX.cmake". In addition, CMake's variable "CMAKE_MODULE_PATH" is a list of directories, so I cannot install according to that vairable because I cannot decide which specific directory to use.
If the copy of CMake is installed to a standard location(i.e. use no prefix etc) then this can be done by placing the file in /usr/share/cmake/Modules/ directory.
If you are going to supply a bundle probably you can add some commands to check if the cmake is available. if yes you can check for cmake --system-information|grep _INCLUDED_SYSTEM_INFO_FILE value from that to get modules directory.
Otherwise there's no way you can do that.
A workaround can be done i.e. if there is a binary in your bundle then you can add a command line option for placing this file.
I am having trouble with compiling one of the open source libraries (libopekele OpenID lib).
The problem is I don't have sudo access on the system where I need to compile this.
Ran the configure. It complained of missing htmltidy lib.
Installed the htmltidy at a non-standard path /home/geekgod (as I dont have access to the /usr and /usr/local).
Now the problem is how do I make the configure script of libopekele to pick the the headers from /home/geekgod/include.
Poking into the configure.ac script of libopkele, it is using AC_CHECK_HEADERS to search for tidy.h or tidy/tidy.h.
I am pretty sure it is looking for these at standard location (/usr/include).
How do I add /home/geekgod to the standard include dir?
try this:
./configure CPPFLAGS=-I/home/geekgod/include --prefix=... --etc