I should use the FFTW library for a small program. I tried to follow several methods to get it to work, but I simply can't, since I think I lack some basic concepts.
I wanted to ask you if you could provide some step by step procedure for installing it, thanks.
Related
Bear with me, as I'm not a pro by any means.
I've known about ZeroMQ for a while, and that it offers a very interesting way of utilizing multiple cores by clever use of networking. I'd like to see what I can get going with it, as the lua examples provided are extremely concise and easy to understand.
But adding ZeroMQ as a lua library...Not so much. There are no instructions at all. Closest I could find, were Linux commands to download the repo and add it to the OS' libraries.
The problem, is that I'm on Windows. Nor do the instructions actually say how you add it to a lua project. Never mind how to add it to an IDE, like Zerobrane.
How do I go about this?
I think there are two part to this question: (1) how to add ZeroMQ as a library to a Lua script and (2) how to make it run from ZeroBrane Studio.
(1) To add ZeroMQ as a Lua library you need to use some ZeroMQ binding (essentially a wrapper around ZeroMQ library that provides Lua methods to use). I see two options: https://github.com/zeromq/lzmq and https://github.com/Neopallium/lua-zmq. You'll have to figure out how to compile one of them on Windows and generate .dll library that can be loaded by your Lua application.
(2) When you have the ZeroMQ library and its Lua binding library (they will usually be available as one .dll library), you don't need to do anything special to make it run from ZeroBrane Studio. If you can run your ZeroMQ sample from the current folder, then select that as the project folder in ZeroBrane Studio and run your script. That should be enough.
Make sure that your ZeroMQ binding is compiled against the same version of Lua you plan to use. For example, if you're using Lua 5.3, then the binding needs to be compiled against that version (and requires the support for that version in the ZeroMQ bindings).
I have a finished program that I would like to distribute to a colleague, and can find no "de-facto" tool chain or resource or guide, or even an opinion, on the best approach to cross-compilation. I know that there is rarely ever a cookie cutter solution, but I am still surprised by the lack of information in this regard.
I have begun trying to cross-compile all of the libraries that I use (and their dependencies) but of course, it is not going smoothly. For reference I decided to go with the basic instructions here. I have followed the instructions exactly as you see them.
Conveniently enough, I needed the png/jpeg/zlib libraries that are used as examples in the link above. I was also able to successfully cross-compile libtiff and leptonica. With that momentum, I then moved on to one of the more beastly libraries -- Tesseract. At this point, during the ./configure .... step, it says that it cannot find leptonica. I don't understand, as the pertinent leptonica files are installed, right where I (and the link above) want them to be. The rub could be rooted in the way that tesseract is built, it differs slightly from the prior libraries I built previously. Tesseract goes autogen.sh -> configure -> make ->make install. I have no idea how to mitigate this.
So my question: Should I continue to bother down this route? The other libraries that I use are openCV, and ImageMagick. If I should, can someone please ease my pain. If I should NOT continue down this route, what is the easiest way to switch to my (very old) windows XP computer, and package up this software? I doubt some of the software I use would even support development on that platform.
I've tried searching on this and everything seems to assume more knowledge on the subject than I have. I've downloaded this PureData external: https://github.com/badgeek/fux_videoglitch , and I think I need to compile the makefile, but I don't know how to do this. There doesn't seem to be a readMe with any instructions, and I can't seem to figure it out from any search hits. Can anyone point me in the right direction here? Thanks
First, you'll need to install either Xcode or Make. There's another stack question that relates the process for installing make in OSX install make command without already having make (mac os 10.5)
At which point you'll simply put in to terminal:
make targetfile
http://mrbook.org/tutorials/make/ has some great background on how this works. Make is simply for compiling big multifile programs.
IIRC Pure Data is kind of tricky to compile in the first place, so you'll want to keep instructions for compilation handy - the Pure Data mailing list often has users confused by this process.
I want to learn Ocaml or Haskell and I want to do it by writing a simple game. Apparently, there's one small problem: nobody cares about Windows and I want to do it on Windows, natively.
Haskell has Cabal, which has SDL, but it doesn't build due to a trivial problem with no workarounds (order of parameters passed to gcc). Ocaml doesn't even have that, it's all in source packages, be it GLCaml or OcamlSDL or whatever.
Is there a place where I can get a working SDL for Haskell or Ocaml on Windows without fighting with a dozen versions of compilers?
The Haskell Platform comes with a binding to OpenGL which should work out of the box on Windows.
Concerning the SDL package on hackage, you can use cabal unpack SDL to get the source code and fix things yourself. To install the package with your changes, run cabal install in the unpacked directory. In any case, drop a line to the maintainer, I'm sure he'll help out.
It's not related to SDL, but you've mentioned OpenGL. There is LablGL binding for OpenGL in OCaml which works out of the box. Wiki example (http://en.wikipedia.org/wiki/Objective_Caml#Triangle_.28graphics.29) compiles and works just fine.
The best instructions I've found for getting SDL to work in windows with a the most recent Haskell platform can be found at this blog. I followed everything step-by-step and it worked perfectly, despite some configure error messages.
It isn't SDL but GLFW works on Windows with Haskell through Cabal.
My article High-fidelity graphics with OpenGL 2 (25th Feb 2008) explained how the GLCaml bindings can be used to write OpenGL-based applications in OCaml that use vertex and fragment shaders (a phong shader is given as an example). There are 9 articles in the OCaml Journal on OpenGL, albeit mostly using the older LablGL library for OpenGL 1.1.
I tried and failed to get OpenGL working from Haskell under Linux in 2007. The Haskell Platform may have changed that but I have neither had time to try it yet myself nor ever heard of anyone using it for this.
However, both OCaml and Haskell must rely upon fragile low-level bindings to OpenGL because they are standalone languages and nobody has ever managed to get any significant commercial software using them to work. As you're on Windows, F#+XNA is a far more logical choice because XNA is tried and tested and F# has a safe high-level interface to it. A Google fight gives you a good idea of what a pioneer you'll be: +haskell +opengl gives 437 hits on Google and +ocaml +opengl gives only 347 hits.
I've googled the hell out of it, and it seems like there is no way to install gcc on OS X without installing Xcode (which takes at leats 1.5GB of space). All I need is gcc and none of the other junk that comes with Xcode. And at this point, I'll take any other kind of C compiler.
I know I could simply install Xcode, but that is beside the point since I neither have my original installation disc nor a quick internet connection.
So... does anyone have any suggestions?
EDIT: Sorry if I was unclear, but I need the headers as well. I'm currently installing gcc4 via fink and it's downloading the shared libraries as well. I'll update on the progress.
EDIT 2: Ok, so I successfully installed gcc using fink. BUT, it's pretty much useless: "error: C compiler cannot create executables". After googling around, I found that not having Apple's Developer Tools installed is the cause of the error. Probably because I need all the libraries, headers, etc that are only available through Xcode.
Checkout command line tools for Xcode from apple. It's official support from apple to only create the command line tools.
Try the osx-gcc-installer on github.
I've been doing this for a long time, and I've done things like this, and I've concluded it's simply never worth doing. :-(
The reason is that no one expects you to do such things, so there are assumptions all over the system that "everything" is there. You might not run into this today - or worse, you might not even realize later that this is the cause of your issues.
Instead of wasting your smart time on things like this which don't actually produce any working code you can use, following the approved method, run the download overnight, and spend your time instead on planning and writing the top-level code (you shouldn't need a compiler for that anyway!)
I'm fairly certain that this is not possible. However, I'm also not sure if you need the whole developer suite to get the developer tools installed. Quite a few tools get installed along with XCode that might be optional. However, I think you're out of luck for not needing to bite the bullet and use wget or DownThemAll or some other download manager that will let you slowly download the developer tools in chunks.
Whenever I install OS X I install the developer tools as a rule, just because it opens up the world of available software tremendously. Perhaps you should consider doing this in the future as well.
The first thing you want to try is called Pacifist - what Pacifist lets you do is to open a large package (such as XCode) and to access parts of it directly. I'm pretty sure you'll be able to find a smaller package inside the XCode package that just has gcc.
HOWEVER it's not clear to me that this is the best route. If you are planning to do Cocoa or Carbon developing I strongly suggest installing the entire package because you will need all the documentation and headers. If you're only planning on doing command-line stuff, you still may find you need to poke around inside XCode to identify all the packages you will need - things such as libraries, headers, man pages and so on.
All in all you're probably still better off installing the whole thing - if HD space is really tight (because you're on a tiny old iMac for example) then look at tools like Monolingual - Monolingual removes all the international support from all the various OS X applications, which can easily reduce the size of an application by 50%.
There's fink and MacPorts, if you want an easy installer/updater.
Install the GCC package from the Packages directory in Xcode's disk image and you'll have just GCC. Note that of course you won't have autotools or other standard build tools, for which you will have to install more packages from that folder.
I found this googling around that appears to install it without XCode.
install Command Line Tool separately.
refer to
http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
yes i could do it with port but you need at least to accept the code license.