Compiling FFTW without root access - unix

my boss is in vacation and I would really like to compile the FFTW library from http://www.fftw.org/ on a Mac OS X . The problem is, I don't have root access to install the files in the root directories with make install. Is there any possibility to install them local just for my user account? .
I read this http://www.princeton.edu/~ngrube/notes.html#fftw ..
I get a folder with a bin, lib, include and share subfolder in my home directory. In the include folder is the fftw3.h file and in the lib folder the libfftw3.a file. Is there a possibility to use the fftw3.h in my project? When I run it and want to link the libfftw3.a to my project it says :
library not found for -llibfftw3.a
I'm using Eclipse CDT for C/C++
edit:
I just saw, that when I use the make install for installing on some local path in my user directory I get some lines:
ranlib: file: #path#/FFTWLIB/lib/libfftw3.a(debug.o) has no symbols
ranlib: file: #path#FFTWLIB/lib/libfftw3.a(altivec.o) has no symbols
ranlib: file: #path#FFTWLIB/lib/libfftw3.a(avx.o) has no symbols
ranlib: file: #path#FFTWLIB/lib/libfftw3.a(sse2.o) has no symbols
ranlib: file: #path#FFTWLIB/lib/libfftw3.a(taint.o) has no symbols
I think they are the problem. Someone has a solution?

Yes, you just need to make sure that the lib directory is in the linker path. You can set this somewhere in the Eclipse project settings.

Related

Unable to read xml file when using exe4j to package jar into exe

Recently I encountered a problem when using exe4j to package the jar into exe. My xml configuration file is placed in the same directory of the exe, but after the package is completed, the exe will look for the xml file from the temporary folder.
These are the instructions in the exe4j help documentation
For some applications (especially GUI applications) you might want to change >the working directory to a specific directory relative to the executable, for >example to read config files that are in a fixed location. To do so, please >select the Change working directory to: checkbox and enter a directory relative >to the executable in the adjacent text field. To change the current directory >to the same directory where the executable is located, please enter a single >dot.
The error when i running the exe :
[ERROR] In Log's init,cann't read config file, file=/C:/Users/**/AppData/Local/Temp/e4jEA8.tmp_dir1543543191//sys_log.xml
Why is the program not looking for this xml from the exe's sibling directory, and how can I find it from this directory?
If you are using the "JAR in EXE" mode, use
System.getPrpoerty("install4j.exeDir")
to get the parent directory of the executable.

How to use extensions

Could someone please explain how one uses the premake extensions. I added the eclipse extension in a directory under my premake installation. And in the premake script I added recuire "eclipse".
Running the script with premake5 eclipse, I get an error module "eclipse.lua" not found.
I added the path of the modules directory to my environment variables.
I'm using premake (premake5) on Windows 8.
Thanks
addons need to reside in a folder. You need to create a "eclipse" folder, then copy all the files in it, and the "eclipse" folder should be located where premake can load it (either next the executable or some other place handled through environment variables)
I got this working by adding the full path to the require statement.
require "C:/premake/eclipse/eclipse"
and running the command as premake5 eclipse
Note: This plugin does not generate project files that one can import into Eclipse.

Qt Release qt.conf

When I release my Qt project, I want to redistribute the QtCore5.dll and Qtxxx.dll files.
How can I make myapp.exe to find them automatically?
The best way of doing this seems to be by editing a qt.conf file placed in the same folder as my executable.
myapp.exe is in c:\myapp\bin folder
The dlls are in c:myapp\common folder
"Better" way is to put your qt.conf into your resources :/qt/etc/qt.conf. This way has highest priority for resolving platform dependencies.
In our project we use cmake to generate necessary qt.conf file: in debug mode we put path to installed Qt binaries and in release - to local (deploy) folder.
Qt5xxx.dll files are linked, so you should place it in same folder, or make them available throught PATH environment variable. If you really want such exotic redistribution system (please, say real reason) - you may create your own platform-specific launcher, that will load necessary .dll's from any path.
Just put all required dll files into the same directory as your executable.
Note, that there are more files to distribute than just Qt*.dll - you will need proper plugin from platforms subdirectory and many more. Read Qt documentation on deploying application under Windows - it will teach you all required files.

CMake + Qt : define the moc/ui output directory

I'm currently transferring a project built with qmake to CMake.
In the version with qmake, in the .pri file, there was
MOC_DIR = .moc/$${PLATFORM_NAME}
that permitted to produce the MOC temporary files in a given directory, keeping the sources clean. How to do the same thing with CMake?
Note: with CMake, I use the FindQt4.cmake package and the command QT4_WRAP_CPP().
As baysmith says, if your goal is to keep your source directory clean, the real solution is to use CMake's "out-of-source" builds feature. If you're on Windows, set "Where to build the binaries" to a new directory, different from the "Where is the source code" directory. If you're on Unix, it goes something like this:
cd <source directory>
mkdir build
cd build
cmake ..
make
By running CMake on a different directory, all of the build files will go into that directory, and your sources will stay clean. (Note: the build directory doesn't have to be inside the source directory. See the CMake wiki for more details.)
If "out-of-source" doesn't work for you, I was able to find one other option. Based on what I can tell from the Qt4Macros.cmake file installed with my CMake 2.8, it isn't accessible as a config parameter. Here's the relevant line:
SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
The workaround is to change all of your MOC include directives to specify the subfolder you'd like to build to.
#include "moc/mainwindow.moc"
After creating the moc directory inside my build directory, there were no problems building, and my MOC file was in the new directory.

warbler doesn't packages a standalone application in a jar file but instead in a war file

I've a JRuby-based standalone application with the following structure:
my_app
- bin
- my_app # that's a launcher script
- lib
- my_app.rb
And when I warble in the top level directory, it doesn't generates a jar file as expected but instead a generates a war file. And this war, as expected, follows the war file's standard structure.
I've followed the documentation to do it:
https://github.com/nicksieger/warbler
"If your project do not have a .gemspec, Warbler will attempt
to guess the launcher from the contents of the bin directory
and use the lib directory as the lone require path. All files
in the project will be included in the archive."
Anyone already did it?
Thanks a lot!
This functionality is in version 1.3.0 which unfortunately hasn't been released yet. Try the prerelease version on rubygems.org (gem install warbler --pre).

Resources