Libmtp in windows (msys/mingw): Run problems - dll

Hi i need a windows port of libmtp (github_link). So i compiled libmtp under Msys/MingW Environment.
The build is successful and i have no error on build, but in runtime i have error. When function (LIBMTP_Get_Connecte_Devices) is called, the return value of this function is (LIBMTP_ERROR_CONNECTING).
LIBMTP_mtpdevice_t* device_list;
LIBMTP_error_number_t x = LIBMTP_GET_CONNECTED_Device(&device_list);
// x = LIBMTP_ERROR_CONNECTING
Can anyone can solve my problem?
In addition, where can i found prebuild versions of libmtp (libmtp-9.dll) for windows?

I think it is because libmtp needs libusb to connect to your device.
There are builds on the OpenSUSE Build Service

Related

NGROK failed to start the tunnel

I have been trying to run the shopify app in my local machine, but this error keeps popping up.
"Ngrok failed to start the tunnel"
Ngrok is successfully installed in my system, and env variable is also set to correct location.
Try using a different version of #shopify/app and #shopify/cli. I had the same problem with version 3.14.0 and I used 3.21.0. This solved my problem.
"#shopify/app": "3.21.0",
"#shopify/cli": "3.21.0",

XOpenDisplay(NULL) fails to connect to X

I was given a fairly large program to compile and run with extremely vague instructions on how to properly configure my system and install the program. I was told to use a Windows, install Cygwin, navigate to the program's base directory, and type "make". I installed Cygwin on a 64-bit Windows 7 in C:\cygwin64 as the main user (I also installed all of the default packages, plus a few extras) and then ran the makefile included with the program (this worked with no problems). When trying to run the executable with a required file argument, I was simply given the error message "cannot connect to X server." Upon examination of the code, it appears that this error was caused by a line setting display=XOpenDisplay(NULL) and then exiting when this resulted in display == NULL. Earlier, "display" had been declared as a variable of type Display. Is there any way I can get the program to connect to the X server? I have been assured that the installation of the program is extremely easy, but I'm not so sure... Thanks in advance.

JVMTI native agent (DLL) can not be loaded to a runing Java program - AgentLoadException

I struggled on this issue for a few days but didn't get a right answer yet.
Here is the Problem Description:
I wrote a normal Java program (Program-A), and wrote a Windows-based native agent (*.dll, written in C/C++) with Agent_OnLoad, Agent_OnAttach, Agent_OnUnload method, which works fine if using Java command-line flag (-agentlib). Then I wrote another Java program to attach the native agent onto a runing the Java Program-A (see the below code piece for VM attach and loadAgentPath), however I got the exception:
com.sun.tools.attach.AgentLoadException: Failed to load agent library
I tried to change the agentPath (absolute or relative file path) this or that way, none of these works. Should I try some other way to make this work. What I need is to attach a native agent onto a runing java program rather than using command-line flag.
Does anyone know the root cause or a clue for the solution?
BTW, the command line to run attach VM Java code as:
java -Djava.library.path=D:\DevTools\Java7\jre7\bin -classpath .;./tools.jar com.xxx.TestAgentVMAttacher
...
VirtualMachine virtualMachine = com.sun.tools.attach.VirtualMachine.attach(pid); // Note: this code line is executed normally, I am sure the pid is correct
...
agentPath = theFilePath + "/myagent.dll"; // Note: I am sure the dll file path is correct
virtualMachine.loadAgentPath(agentPath,null); // Note: this code line would cause the exception (AgentLoadException) as I mentioned above, no matter how I set the agentPath, even I set it as null, same exception happened.
Environment related info:
- OS: Windows XP
- Java Version: Java(TM) SE Runtime Environment (build 1.7.0-b147)
Eventually I found the answer for my question, I had a wrong method name ('Agent_Attach') in Agent.cpp file, the correct one should be 'Agent_OnAttach', with this fix, my agent lib (.dll) can be loaded to a running Java program now.

Code Injection using mach_star

I was trying to inject code into the Finder process using mach_inject . I am currently using given the source given here
The code seems to get the PID of the finder process correctly. There is a bundle mach_inject_bundle which is to be injected.
The following error comes every time I run the injector.
mach_inject failing.. (os/kern) invalid address
error: (os/kern) invalid address
I am running the build using sudo from the terminal. I am using Snow Leopard MAC OS X 10.6.8.
I found some similar issues reported by others here . But no solution seems to work.
Can someone please help me out ??
Thanks
In the Architectures setting for the project just set x86_64.

Compiling webkit on windows : environment variable not found $(PRODUCTION)

I am trying to compile webkit on windows and am running into several errors.
One of them is :
The following environment variables were not found: $(PRODUCTION)
Does anybody know what this variable is supposed to map to?
Thanks
-M
This warning is normal in the development environment and should not result in any real build errors. You are looking for something more severe.