I just installed ahven, but if I compile a testprogram with Ahven.Framework,
I always get a compiler error:
file "ahven.ads" not found
My files for ahven are just here:
/opt/ada/include/ahven/ahven.ads
/usr/share/ada/adainclude/ahven/ahven.ads
how can I tell gnat where to search?
Edit:
I'm using gnatmake on Linux, without any project file.
There's an ahven.gpr file, which should take care of the dependencies. Find where that file was placed, and then either add a reference to it in your project's .gpr file, or if you're using the gps IDE, right-click on the project name, select Project/Dependencies, and then do "Add From File".
Assuming you are using gnatmake and a unix/linux based system, You need to add a path to your gnatmake command. To look up how to do this type gnatmake and look for the -I option in the help screen that follows. Im not sure which one of your dirs would be appropriate to include. That should be found in your ahven documentation.
Related
I am developing a project in QT, when I want to use Windeployqt to wrap my exe.
error:Warning: Unable to read \mkspecs\qconfig.pri comes out
I execute Eindeployqt in "QT5.1.1 for Desktop(Mingw 4.8.3)", I checked the qconfig.pri exsited in
C:\Qt\Qt5.1.1\5.1.1\mingw48_32\mkspecs\qconfig.pri
I have added environment variable, can anyone help on this?
Usually you would do this with environment variable
QMAKESPEC=C:\SOMEPATH\qt\mkspecs\win32-g++
or in your case probably:
QMAKESPEC=C:\Qt\Qt5.1.1\5.1.1\mingw48_32\mkspecs
though normally it should be a folder below mkspecs specifying your platform (win32-g++ in my first example).
The windeploy tool will use the paths provided from qmake.
Assuming that you are in the bin folder of your qt installation.
All "important" paths can be seen with:
qmake -query
In your case you will see that all paths have the wrong location.
You have to add a qt.conf file.
https://doc.qt.io/qt-5/qt-conf.html
with the following content:
[Paths]
Prefix = ..
Now, running qmake -query should return correct paths. Also the windeploy tool should be able to find the correct paths.
I'm new to OCaml, but I'm trying to figure out the equivalent of __filename, __dirname from Node. That is, I need to build a path relative to the file containing the code in question.
For reference, I'm working through Ghuloum's IACC: http://ell.io/tt$ocameel
I'm building my first compiler, and I have an utterly-simplistic ‘runtime’ file (in C — temporarily) adjacent to the compiler's source-code. I need to be able to pass the path to this file, as an argument (or a pre-compiled version, I suppose) to gcc or my linker, to have it linked against my compiler's output when I invoke the linker/assembler tooling.
(This may be a stupid question — I'm at a bit of an unknown-unknown here, “how does a compiler get the runtime to the linker”, or something like that. Any commentary about idiomatic solutions to this is welcome, even if it's not a direct answer to the above question!)
If you're running the source file directly via ocaml myfile.ml, Sys.argv.(0) will give you the path to the source file and you can use Filename.dirname to get the directory from that.
If you first compile the source file into an executable and then run the executable, Sys.argv.(0) will give you the name of the executable. In that scenario it's impossible to get the location of the source code (especially if you consider that the person running the executable might not even have the source code on their system).
If you set up your project structure, so that your sources live in src/, your compiled binary in bin/ and the compiled stdlib in lib/, you could just use Filename.dirname Sys.argv.(0) ^ "../lib" as the library path for gcc. This will work whether you run ocaml src/mycompiler.ml, bin/mycompiler or just mycompiler after installing everything to /usr/ or /usr/local/.
I'm hoping this is an easy question. I have setup an Ogre3D project in QtCreator 2.6.1 using MSVC2010. I have to setup a custom build step and I noticed that the letter 'd' is appended to the name of the compiled .exe (e.g. OrgeProgramd.exe, CoolGamed.exe)
This is not critical, I was just wondering why this happens. Is it normal? The target in the .pro file is correct. I tried building with Release and I get the same thing. Any ideas?
Look through your pro/pri files and find the line, similar to this: TARGET = $$join(TARGET,,,d). If you do - that would be the reason.
I'm working on a Qt4.7.3 project on mac osX (with xCode). I would like to move my Qt directory (installed with Qt installer). The problem is that some Qt executable files have hardcoded paths. I've already recompiled Qmake specifying the new Qt directory. So the project now compile and link perfectly, but at run time it cannot find the qt libraries (it still look into my old Qt directory). Is there other harcoded path somewhere, other configuration files to edit?
By the way, the reason why I want to move my Qt directory is to allow to share qt files via revision control tool.
The pre-built installer actually puts all the framework files into the system location (/Library/Framworks/) and you will have a hard time moving those.
Your best bet is to build it from source and specify a different install location. ./configure -help will show you how. (Use the -prefix option)
Hard links could be a way to go in this kind of situation I guess.
Try this.
Create qt.conf file in the same folder as your qmake.exe file.
[Paths]
Prefix = E:/Qt/4.8.3
Follow this link for detail description.
http://richardt.name/blog/moving-a-qt-installation-directory/
how can I change Qt install path after I building it ?
Example : qmake.exe search binaries to original install path, how can I change/redefine it ?
Thanks.
Edit : I finally found this patch to apply to Qt :
http://ftp-developpez.com/qt/binaires/win32/patcher/QtPatcher.7z
http://ftp-developpez.com/qt/binaires/win32/patcher/QtPatche_src.7z
I was looking into this and found a way that works (in qt 4.7.2) by customizing qt with a qt.conf file.
In my case, I added a qt4-4.7.2/bin/qt.conf (I think it must be in the same place as the qmake executable)
With the following contents:
[Paths]
Prefix = c:/my_path/to/qt4-4.7.2
and the qmake -query started returning the proper paths!
See: http://qt-project.org/doc/qt-5.0/qtdoc/qt-conf.html for more details
You can change path to binaries and many other hardcoded paths in qmake using qmake -set command.
See Configuring qmake's Environment for details.
I can answer it for windows, not so sure about others. Remove the path variables if any present in the environmental variable PATH.
In Qt-Creator goto,
Tools->Options->Qt4->Qt Versions
In the right hand side area, you will find Auto- Detected and Manual. Under Manual add a new entry by clicking the + symbol in the far right. Specify the QMake location by clicking Browse . Change the Default Qt Version to your newly specified Version. Of course, you have to re -build the application. Hope that it helps.
On Unix/Linux:
You can also use LD_LIBRARY_PATH+PATH for workarounds. But still, some defaults are hardcoded in the code, yes. A rebuild is a must.
On unix you can make a symbolic link, otherwise you probably need to rebuild it
This worked for me with Qt 5.15.2:
cd ~/Qt/Tools/QtCreator/share/qtcreator/QtProject
grep -inr '<olduser>' | cut -d: -f1 | xargs sed -i 's/<olduser>/<newuser>/g'
Replace <olduser> and <newuser> obviously.