How to run CMakesetup? - cmake

I downloaded cmake and I wanted to build LSHKIT using this command:
cmakesetup ", where is the LSHKIT root directory
but it gives me this error:
'cmakesetup' is not recognized as an internal or external command,
operable program or batch file.
could you tell me what is wrong?
BTW, I am working in windows 7.

CMakeSetup is an older program that no longer builds with the most recent releases of CMake. Use "cmake-gui" instead of "CMakeSetup"...

Related

"Failed to load dynlib/dll" error for libdmtx.dll when running an executable generated by auto-py-to-exe

I am using the library pylibdmtx to generate a data matrix in my python script. Since the library uses the dll libdmtx.dll, I added it to the "Additional Files" (--add-data) section of auto-py-to-exe.
When I run the executable on my computer where I wrote developed the python project, the executable works perfectly but when I transfer the executable to a different computer and try running it there, I get the Failed to load dynlib/dll error.
I checked the temp folder that the executable was creating and using and found libdmtx.dll to be present there. I am not sure why the executable works only on my computer but not the others. Am I missing adding any other dependencies for libdmtx.dll?
Image of the error when the executable is run

Running software build in MSYS2 MINGW32 shell

I'm trying to run a piece of software I built in MSYS2 MINGW32 shell. The software is 32bits (don't have time to port it to 64bits) and there is one statically linked executable. Here is how I setup the build environment:
Installed a fresh copy of MSYS2;
$ pacman -Syu
Installed the following packages: git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-SDL mingw-w64-i686-SDL_mixer mingw-w64-i686-zlib mingw-w64-i686-libpng mingw-w64-i686-make
Git checkout the repo
Run the build in CMake
Build runs fine and the exe is generated.
Now the problem starts: the executable can't run and displays an error message about missing DLLs. I copied the missing DLLs to the same folder of the executable, and them another error message pops up complaining about error 0xC000007B, which I tracked down to be missing dependencies. After a while I figured out that the problem was that some of the DLLs is missing a dependency itself. Copied this last dependency to the folder.
Now, the big question: I can run the exe perfectly fine in the MINGW32 shell but I can't run it neither in cmd.exe nor by double-clicking in Windows Explorer and this is a problem (I can't ship a software this way). Is there any way to produce a binary that is able to run from explorer and from cmd.exe? What is the cause of this problem? Can it be mitigated?
I solved my problem!
After a lot of research, I realized that nothing was wrong with my MSYS2 build/setup/dependencies. The real problem was that CMake hide one parameter for the linker: -mwindows. Actually, the CMake find_package routine from one of the libraries I'm using (SDL) added this parameter to the linker command line parameters.
Adding a -mconsole to the linker parameters (using add_link_options("-mconsole")) solved the problem. The CLI now works as expected.
Thank you all for your help.

Cannot configure QtCreator using CMake on Ubuntu 18.04

I am trying to setup a project based on CMake with QtCreator.
In Projects I defined the Build Steps I need.
In the Build setting I get constantly the error message:
Failed to activate protocol version: "CMAKE_GENERATOR" is set but incompatible with configured generator value
I tried to browse on the Internet for this problem but I could not get rid of this error.
If now I however try to build my project specifying a target, my compile steps are not executed, instead, I get the following message:
Running "/usr/local/bin/cmake -E server --pipe=/tmp/cmake-W2VOXm/socket --experimental" in xxxx/.Build/release.
CMake Project parsing failed.
Parsing of CMake project failed: Connection to CMake server lost.
Restarting QtCreator does not help, each time the project is opened the message happens again.
Make sure the build directory it's in the same directory than your projects is, like this:
I got a similar error and have fixed it.
Try to reinstall cmake in Ubuntu by follwing https://cgold.readthedocs.io/en/latest/first-step/installation.html#ubuntu.
Configurate Tools - Options - build & run regarding "cmake" and "kits". Make sure that one of the configurations (auto-detected or maunal) is corrected.
restart qt creator, open project and "run cmake" again.
I have seen and resolved this issue previously by just deleting the build folder, reloading qtcreator and rerunning cmake.

How to switch PHP versions in environment variables?

Since I'm required to work on both PHP5.x and PHP7.x projects in Yii framework, I've installed WAMP.
I've also set up my environment variables to link to both paths containing php.exe and for just working with the projects, that's just fine.
However, whenever I need to run migrations, there's a problem: if PHP7 path is defined first, PHP5 migrations won't run and if PHP5 path is listed first, PHP7 migrations won't work anymore.
Error message for PHP5:
'yii' is not recognized as an internal or external command, operable program or batch file.
Error message for PHP7:
Parse error: syntax error, unexpected '?' in C:\wamp64\www\project\vendor\phpunit\phpunit\src\Framework\TestCase.php on line 822
Is there a clean way to be able to define which PHP version you wish to use when running migrations, without having to reconfigure your environment variables again and again?
Thank you #RiggsFolly for your help. Based on the link you provided, I compiled a handy solution:
I started off by creating 2 new files in C:\Windows\System32 (since this path is already included in the environment variables):
startphp5.cmd and startphp7.cmd.
startphp5.cmd contains just this (start7.php is obviously almost the same):
PATH=%PATH%;C:\wamp64\bin\php\php5.6.31
php -v
Before running my migrations in my command prompt, all I have to do now is run either "startphp5" or "startphp7".

Adt, Adl command is not getting recognized by windows

I have installed Adobe AIR on windows operating system.
I have also downloaded the Adobe AIR SDK and set in the "Path" variable the AdobeAIR SDK bin folder.
Then I had created a sample HTML-based AIR application with the AIR SDK.
and then in order to test the application, I typed the command
"adl applicationName-app.xml".
Then I got the following result:
'adl' is not recognized as an internal or external command,
operable program or batch file.
Similarly when I typed the command "adt", I got the result:
'adt' is not recognized as an internal or external command,
operable program or batch file.
Please help me in resolving the issue.
Happen to me once. What happen was, i was trying to download windows version, but i unknowingly downloaded linux version, hence adl and adt will never be executable.
You might want to re-download the whole sdk and make sure the file name is "adt.bat" and "adl.exe"
Go to the bin folder of flash builder where all compiler files are resides like mxmlc and adl. Than write down adl and than give compiler arguments. It will work.
Use the set path command on the command line:
c:\>set path
If the correct path to the AIR SDK isn't listed, then you did not successfully set the path variable.
See http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-71994050128cca87097-8000.html#WS2d929364fa0b8137-78b25bdf12a498897d1-7fff