I'm trying to write some MIDL in visual studio to define an interface I want to play with for some windows runtime research. The interface I want to use has some methods that take IStorageItem and IStorageFolder parameters, and I noticed these were defined in windows.storage.idl (from the Microsoft SDK). However when I import this idl into mine I get the following errors:
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\windowscontracts.idl(5) : error MIDL2025 : syntax error : expecting an interface name or DispatchInterfaceName or CoclassName or ModuleName or LibraryName or ContractName or a type specification near "namespace"
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\windowscontracts.idl(7) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
Note that I have tried newer version of the SDK (right up to the latest) with the same results (and before hitting this error midl happily processes lots of other winrt idl files).
Can anyone shed some light on this problem and how I might fix it? I don't really want to manually define the storage interfaces since they look fiddly to do!
Related
I am very new to Ghidra, I have just installed it in order to try and decompile an ELF file.
when trying to assign the file to the new Ghidra project, I get these error messages:
Loading language 'x86:LE:64:default' - Uncaught Exception: ghidra.app.plugin.processors.sleigh.SleighException: File not found - language probably did not compile properly
Can't read language spec C:\Program Files\ghidra_9.1.2_PUBLIC\Ghidra\Processors\x86\data\languages\x86-64.sla
java.io.FileNotFoundException: C:\Program Files\ghidra_9.1.2_PUBLIC\Ghidra\Processors\x86\data\languages\x86-64.sla (Access is denied)
What can I do to fix these?
I got the same error today. After trying a few things unsuccessfully (using a different version of JDK (and changing the environment variables to include the other JDK version), installing all the Ghidra extensions, and re-copying the x86-64.sla file, none of those worked. But, I decided to try running Ghidra as Administrator in the hopes it would not run into permission errors and voila!, it worked.
I am trying to generate code of my Simulink Model. The model contains linked blocks and Level 2 S-functions.
I am getting the following error when I press the Build Model Button
MyFluidProp_mod6.obj : error LNK2019: unresolved external symbol "double __cdecl pneu_fluids_PureGasProps_cp(double,class FluidProps &)" (?pneu_fluids_PureGasProps_cp##YANNAEAVFluidProps###Z) referenced in function "double __cdecl cp_Fcn(double,class FluidProps &)" (?cp_Fcn##YANNAEAVFluidProps###Z)
Update:
After tracking all required source files, and copying them to the current folder, I end up with the actual error:
C:\Program Files\Microsoft SDKs\Windows\v7.1\\include\winnt.h(135) : fatal error C1189: #error : "No Target Architecture"
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.EXE"' : return code '0x2'
Stop.
From previous posts, it appears that winnt.h has to be replaced by windef.h. But since it used internally (not by any of my source codes), I can't change it.
This is most probably to a missing link to one of the used libraries. But since I cannot supply any additional commands to the Build Button, I cannot specify the link. I also must admit that I didn't understand exactly the error message meaning.
Can anyone help?
Your most likely not telling the compiler where to look for the library containing the function in question. This is done on the Configuration Parameters -> Code Generation -> Custom Code tab. If you right click on the words "Include Directories:" then you can bring up the help, explaining what to put into where.
I am trying to compile a CUDA program using MEX within Matlab2014a and can't get it to work.
I installed the newest CUDA toolbox (6.5) and driver (340.62) and the samples work correctly, so I guess it is correctly installed.
I also installed MS Visual Studio 2012 Professional and Matlab 2014a.
I followed the exact description in the Matlab Help in "GPU Computing -> Examples and How To -> Run MEX-Functions Containing CUDA Code".
My CUDA file ends with .cu (so I am trying to compile Matlab's standard example mexGPUExample.cu, but I get the same error with other .cu files), the mex_CUDA_win64.xml is in the same folder, the environment variable MW_NVCC_PATH is set correctly in the user variables and just to be sure I also called "setenv('MW_NVCC_PATH,...)" in Matlab.
If I try to compile a CUDA example with
mex -largeArrayDims mexGPUExample.cu
I get the following error:
cl : Command line warning D9024 : unrecognized source file type 'mexGPUExample.cu', object file assumed
cl : Command line warning D9027 : source file 'mexGPUExample.cu' ignored
cl : Command line warning D9021 : no action performed
D:\PROGRAMS\MATLAB~1\BIN\MEX.PL: Error: Compile of 'mexGPUExample.cu' failed.
Unable to complete successfully.
I also tried to set the compiler correctly using
mex -setup
and chose the MS Visual Studio Compiler.
The code itself works because I tested it on other systems.
I have no idea what I am doing wrong.
Any help is appreciated.
Matlab only supports CUDA 5.5 on R2014a, so your CUDA 6.5 by default cannot compile mex files under Matlab. Matlab R2014a supports VS 2012 now, but you need to verify you have VS 64-bit compiler if your Matlab is 64-bit. You can compile a normal .mex file with .cpp source file, (lots of these files under matlabroot/extern folder) to see whether Matlab works well with your VS.
Note that Matlab has a lag in supporting the latest compilers, both VS/gcc and Cuda. It is always good choice to check the compiler requirement by Matlab, before using the latest compilers.
Also check whether your Cuda kit and graphics drivers are correctly installed and work seamlessly with VS. You can compile and run some .cu files under the VS environment.
If you have finished all above and changed to the correct version of compilers, follow the instructions on matheworks website to compile the mexGPUExample file. If my memory is correct, you need to set environment variables and copy the XML file to the .mex file path. Then it should work.
In Progress Developer Studio (Eclipse):
How do you set up the project so it won't "compile" (check for errors) in .i (include) files separately?
Now we get a lot of errors because include files can not be run on its own. For example some variables that are used in the .i file are defined in p/w file - that will generate an error.
By default includes are not compiled. The errors shown on include files are caused by other sources (.cls, .p, .w) that failed to compile on that include.
See also : knowledgebase.progress.com/articles/Article/000048421
We have a project in which we want to control a Lego Mindstorms robot with the Microsoft Kinect sensor. We decided to use SimpleOpenNI with Processing to read the sensor and leJOS to control the robot for a simple reason: since both is in Java, we can specifiy a kind of RoboHandler and call its methods from the sensor reading class.
In order to achieve that, we downloaded the leJOS plugin for eclipse, created a new leJOS NXT project and put the processing and SimpleOpenNI libraries in the build path. Note that to use SimpleOpenNI, it is required an old processing version without Java.
Now the problem is, that when installing leJOS, it strictly requires a 32-bit Java JDK, so I had to download this and point to it at installation.
At this point, following build paths are in the project:
LeJOS NXT Runtime (which has among others java.awt classes)
core.jar (used to run Processing in eclipse)
SimpleOpenNI.jar
Having all this, and setting up a first Processing sketch like
import processing.core.*;
public class Test extends PApplet{
(....)
}
results in following error code:
Multiple markers at this line
- The type java.awt.event.MouseMotionListener cannot be resolved. It is indirectly referenced from
required .class files
- The type java.applet.Applet cannot be resolved. It is indirectly referenced from required .class files
- The type java.awt.event.MouseListener cannot be resolved. It is indirectly referenced from required .class files
- The hierarchy of the type FirstTry is inconsistent
- The type java.awt.event.FocusListener cannot be resolved. It is indirectly referenced from required .class files
- The type java.awt.event.KeyListener cannot be resolved. It is indirectly referenced from required .class files
When I downloaded the Processing without Java version, I wasn't able to choose from 32bit- or 64bit version. The SimpleOpenNI is installed as 64bit-version.
When adding the 64bit-JDK (eclipse workspace default) as workspace too, the error disappears, but when trying to run a sketch, following error gets printed in the console:
Invalid layout of java.lang.Thread at name
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:128), pid=9176, tid=8740
# fatal error: Invalid layout of preloaded class
#
# JRE version: 7.0_04-b22
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b21 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Valentino\Desktop\workspaces\workspace_processing\RoboZeugs\bin\hs_err_pid9176.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
So in my oppinion there is a problem with the JDK versions (32 and 64 bit), but there must be a way to handle this. Has anyone experience on this specific topic, maybe even with Kinect -> Mindstorms? Can anybody tell me what this error exactly means?
You're mixing classes that are designed to run with the JVM on the NXT brick (i.e. everything in classes.jar) with classes that are designed to run with a fully fledged JVM on the PC.
Don't do that. If you want to remote control an NXT, use pccomms.jar and everything else in lib/pc. But never add classes.jar or anything else in lib/nxt to the classpath when you're starting a Java program on your PC.
The error message about java.lang.Thread is probably due to the fact, that java.lang.Thread in classes.jar in by no means compatible with java.lang.Thread that comes with the JVM on your PC.