Can't find file when using windeployqt.exe - windows

I'm pretty sure this isn't how I'm supposed to use windeployqt, but I have an executable which is missing some dependencies (specifically the qt plugin windows). I thought I could use the windeployqt tool in order to find the missing dependencies for this executable and install them, but I get a "does not exist" error when I try and run the following:
windeployqt.exe ExecutableFileName.exe
I tried this after trying the full path (e.g. windeployqt.exe pathtoexecutablefile\executablefilename.exe
but both times I get two errors. Either filename.exe does not exist, or pathtofile\filename.exe doesn't exist. Is there a way to fix this or am I using the tool wrong? I've added the folder containing the tool to my system path, but do I need to add the folder containing the executable as well?

Related

Windows solution for openssl/ssl.h no such file?

I'm trying to do this in Windows using Git CMD
C:\Users\Ove\paho>git clone https://github.com/eclipse/paho.mqtt.c.git
C:\Users\Ove\paho>cd org.eclipse.paho.mqtt.c.git
C:\Users\Ove\paho>msbuild "Windows Build\Paho C MQTT APIs.sln" /p:Configuration=Release
I'm stuck at msbuild where it repeats a series of errors:
'openssl/ssl.h': No such file or directory
I've installed openssl and there is an environment variable set up in:
C:\OpenSSL-Win32\bin\openssl.cfg
I've tried adding other systems paths like:
C:\Users\Ove\openssl\include\openssl
which is where ssl.h resides
I've also tried sticking the openssl folder in the paho\src folder locally
but I still get these errors
With this commit you can see what's happened
https://github.com/eclipse/paho.mqtt.c/commit/543e761474e4836162a0f4428323173abf2de5ad#diff-0d89939d72d5bb4940c5f129d135d9f4
Windows and MSVC don't have any kind of a system for locating library headers. So naturally, this codebase has its own system for locating the openssl headers which uses an environment variable.
openssl.cfg looks like openssl's own operational configuration, completely unrelated to building anything.
You say you tried "adding" (what does that mean?) C:\Users\Ove\openssl\include\openssl (to what?) which you say is "where ssl.h" resides. So what? Your compiler error isn't telling you it's missing ssl.h. It's telling you it's missing openssl/ssl.h. Perhaps if you "added" C:\Users\Ove\openssl\include which does contain openssl/ssl.h? But I'm not sure how it would have got there unless you copied it around, making things more confusing for yourself.
I'll tell you what I'd do:
set OpenSSLDir=C:\OpenSSL-Win32\include
Putting the openssl folder in paho\src may have worked, if by "openssl folder" you mean C:\OpenSSL-Win32\include\openssl and not C:\OpenSSL-Win32 -- if the project had done the equivalent of -I., meaning that attempts to #include <openssl/ssl.h> from paho\src\SSLSocket.c could find it at paho\src\openssl\ssl.h. However, you can see, the project hasn't done that. Therefore you could add . as an include path and probably make that solution work; or edit the code to #include "openssl/ssl.h" instead.
I've been excruciatingly verbose here because you need to understand how include paths work before you can drop libraries in on windows and combine them all. There's no magic, just simple rules.

Find out where bash command definition is stored?

I used make/cmake for a project a while ago to build a command line tool, and I thought the binary was only executable while in that directory, but I just found out I'm able to call the command from any directory. This is troublesome because I'm having trouble building a newer project and I suspect this is related.
For example, I can run the command caffe train from a specific folder where I built the binary, but it turns out I can run caffe train from any folder, which I shouldn't be able to do. I could delete the binary, but the problem is that the command for it is stored and being called from somewhere, but I don't know where.
How can I find out where the definition for this command is stored? I examined my .bash_profile and looked at all the paths it listed, but I'm not seeing a relevant one. Is there another place I ought to be looking to find where command line tools are installed?
Ah sorry I just found out: Using type command gives where it is stored. Apparently whereis command should also do the same thing, though it gives me no output; for anyone else who has this problem, trying both would be good!

How to resolve Xcode codesign error about multiple binaries sharing the same path?

When I try to export a signed copy of my application from the Archives screen, I get the following error.
I used find . -type l ls to find symlinks in my project directory: there are none. I went to the Xcode/Archives folder for this archive and searched for symlinks there, and there are some but none of them are in the DevMateKit.framework mentioned in the error message. I've also tried adding a build step to manually delete the second binary, but it doesn't help.
The code signing is being done automatically by Xcode, and the files are being copied through a standard Copy Files task. There is also one manual piece of code signing, done through a Run Script task, which manually codesigns a different framework to the one in the error message (although I can't see how that would be relevant). My Xcode version is 6.3.1.
Any suggestions?
If you are using DevMateKit v1.1.1 or less, check your 'Link Binary With Libraries' build phase and phase where you are copying frameworks and remove DevMateIssuesReporter.framework from the list if it's present there. If it won't help, just contact DevMate support with this problem or create a new issue with GitHub (https://github.com/DevMate/DevMateKit)
OK, so I believe the reason this happens is as follows. The DevMateKit.framework is pre-codesigned by the developer. But I suspect that their source has symlinks in it, and they have signed it all in such a way that this error occurs, but when packaging the framework for download have removed the symlinks so it appears there is nothing that code be done.
I experimented with signing the code myself, which I think would work, but after some experimentation decided to simply delete the binaries that are directly inside any CrashReporter.framework directory, and leave the ones inside any CrashReporter.framework/Versions/.../ directory. This removes the duplicated binaries and appears to work perfectly.
But I'm not an expert on this process, so it's entirely possible that I was just doing something wrong.

Using Google's ProtoBuf (and a .proto file) to create a Python API Library

I have the .proto file used in the open-source Android API (http://code.google.com/p/android-market-api/), and am having some trouble compiling the file to generate the .py.
I'm trying to follow the instructions here, https://developers.google.com/protocol-buffers/docs/pythontutorial , and am on the steps that are under the header "Compiling Your Protocol Buffers".
I've downloaded the compiler, protoc.exe. The readme says "To install, simply place this binary somewhere in your PATH," which I'm not understanding. I'm messed around with it for a while now, but can't think of how to proceed.
I'm quite the novice programmer, so please tell me if something isn't clear, or if I'm having some sort of fundamental misunderstanding... about anything. I'm on Windows 7 by the way.
Thanks!
if protoc.exe is not in the same directory you're calling it from, you need to add it to your PATH environment variable to be accessible from the calling directory when you're in the shell. open up a command shell and execute:
set PATH=%PATH%c:\directory\to\proto\executable;
then change directories over to where your source code is and execute the compilation line as instructed from the google page.
I had the same problem because it is not written that clear in the README.txt. What they mean is to:
1. take the protoc.exe and put it in the same folder with the other files of your project.
2. open the cmd to that directory and run: protoc --cpp_out=. myfile.proto
=> This will create the 2 new files in the folder with the files of your project, and then you can add them normally to your program.
This helped me: http://www.scriptol.com/programming/protocol-buffers-tutorial.php
This is for c++, but I guess it will be something similar for python; I guess you just have to change the command you are using in the cmd :)

Add include directory to scons

I have a project which has been checked out of Subversion and uses Scons for building. However, I have a library installed on my computer which Scons doesn't detect - it just says that the include file can't be found. Is there any way that I can direct Scons to the library location without altering the Sconscript file at all (because I don't want to have to deal with conflicts every time I update) - e.g. add a command line option that it will detect before searching for the include file? I can't even see all the available options because it doesn't respond to the --help option before it searches for the include files.
Okay, after some more googling, I found that there is a way to do it. gcc has a number of default directories that it searches (which I already knew - I just didn't know what they were defined as). The simplest way to do what I was after is to add the directories to these environment variables. The one that I needed was
$CPATH
This sets the path where gcc searches for its include files. Setting this to the directory I needed solved my problem.
you can set env["CPPPATH"], but I hope there's an easier way...
SCons has a concept of repositories - directories to look for source and target files. These can be specified on command line.
-Y REPOSITORY, --repository=REPOSITORY, --srcdir=REPOSITORY
Search REPOSITORY for source and target files.
To get to help of SCons itself, use -H option.
no you can't, unless the developer of the scons script explicitly adds support for it.

Resources