I'm just installing mono to learn how it all works.
I installed mono (mono-2.10.9-gtksharp-2.12.11-win32-0.exe) for the first time and just started to follow on through the Mono Basics page to verify the installation.
http://www.mono-project.com/Mono_Basics
I was surprised that the installer didn't set up the PATH env variable , but once I'd done that I was able to get the first example compiling/running.
But I'm getting compile errors on the second example. So am wondering if I am missing further environment variables/settings?
Are the environment variables used by mono documented anywhere?
I'm also just wondering if the installer is ok or should I be looking for another one...
The error messages are as follows:
C:\Users\Vida\Desktop\Learning\Mono>gmcs hello.cs -pkg:gtk-sharp-2.0
error CS2001: Source file `Files' could not be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/pango-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/atk-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/gdk-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/gtk-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/glib-sharp.dll' could not
be found
Compilation failed: 6 error(s), 0 warnings
Sounds like some component is confused by the spaces in Program Files (x86) (which is presumably the installation directory.) Try setting the PATH using its short name (normally Progra~2) , or reinstall to a directory that doesn't have spaces. You can also try additionally setting the MONO_PATH environment variable.
Related
I downloaded the ultimate version of IntelliJ from the official website and when I do ./idea.sh in the .. /bin directory of the file I get this error message in the terminal:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.Error opening zip file or JAR manifest missing : /root/.jetbrains/jetbrains-agent-v3.2.0.de72.619 Error occurred during initialization of VM agent library failed to init: instrument
I don't know if I am supposed to have a .jetbrains file in my repersonel if so why I don't have it and if not how to get it?
Cordially...
What's the environment of your machine and I do not think you need to care about how to get .jetbrains manually by yourself. I've installed a IntelliJ idea on Ubuntu18.04, it works well. You can try run it as an administrative, also you can go to ./bin folder and then run ./idea.sh rather than ../bin folder
btw, as I said install, it does not indicate we need to compile it and get some executable binary file to run it. It's a green software that contains anything you need, you can run it directly
The Error opening zip file or JAR manifest missing : /root/.jetbrains/jetbrains-agent-v3.2.0.de72.619 error indicate that there is a problem with the distribution you have downloaded. It was corrupted or modified improperly.
Re-download it from https://www.jetbrains.com/idea/download and install into a new empty directory.
You can also try deleting the IDE's config and system directories.
I am new in Cmake thats why I will write story detailed.
I trying to build one lib under windows and that lib depends on other lib. (libmatroska depends on libebml) source libmatroska and source libebml
Fortunately both libs can be build with cmake.
I built libebml successfuly with cmake. And also built binaries using VS studio.
Then I tried to deal with libmatroska:
During first try I got:
Could not find a package configuration file provided by "Ebml" (requested
version 1.3.5) with any of the following names:
EbmlConfig.cmake
ebml-config.cmake
at libebml sources I found EbmlConfig.cmake.
I Type export Ebml_DIR=D:/work/mkv/libebml and try again.
On second run I got:
Could not find a configuration file for package "Ebml" that is compatible
with requested version "1.3.5".
The following configuration files were considered but not accepted:
D:/work/mkv/libebml/EbmlConfig.cmake, version: unknown
And after few hours I am still stuck on it.
I can't understand root of this error.
Is it something wrong with EbmlConfig.cmake?
... or maybe I specified path to wrong *.cmake file?
... or I need to install libebml some how before handling libmatroska?
I will be happy for any clue.
UPDATE:
Here EbmlConfig.cmake context:
include(${CMAKE_CURRENT_LIST_DIR}/EbmlTargets.cmake)
Where EbmlTargets.cmake is file generated while Ebml compilation.
I tried to change path inside EbmlConfig.cmake to global path. But got same error.
Also when I delete context of EbmlConfig.cmake I still have same error.
It looks like "default error when something goes wrong"
I have a WIX package - created using Wix Toolset 3.7, which is strangely failing on a specific environment with the following message,
ExecXmlFile: Error 0x80070005: failed to load XML file:
\sharep001\share\IIS\pre\EAT\Website\CalculationService\Web.config
MSI (s) (70!FC) [11:15:37:491]: Product: EAT 1.0.0.0 -- Error 25531.
Failed to open XML file
\sharep001\share\IIS\pre\EAT\Website\CalculationService\Web.config,
system error: -2147024891
Error 25531. Failed to open XML file
\sharep001\share\IIS\pre\EAT\Website\CalculationService\Web.config,
system error: -2147024891
CustomAction ExecXmlFile returned actual error code 1603 (note this
may not be 100% accurate if translation happened inside sandbox)
Why I say the behavior is strange is because,
The same package I can install on the local directory on the webserver, no errors reported.
The same package I can install on another UNC directory, no errors reported.
Why is it failing?
- The XML transform step only gets called after the directory is created, files are dropped, iis website is created, etc. So, hard to explain why, does not seem like a permission issue.
Any idea how I can debug this?
It is strange that the path does not contain a root drive specification. Is it possible that this file is on a different drive than where the custom action is executing and thus the relative path is not being found? I would first try to provide a full path to the file and see if that addresses the issue.
To debug, you could go hardcore and grab the sources and pdbs .zip files for the WiX toolset build you are using then use MsiBreak environment variable to get attached to the custom action .dll. From there, you can debug through the ExecXmlFile() function to see the actual return result. You could also inspect the machine just before/after the error occurs to see if the file is locked or otherwise inaccessible.
Good luck!
Check if file has correct UTF-8 encoding, my fault was a missing BOM
Failed to open XML file , system error: -2147024786
Had hoped that this would help, but getting a different error.
attempting to compile the following as hello.cs
using Gtk;
using System;
class Hello
{
static void Main()
{
Application.Init();
Window window = new Window("helloworld");
window.Show();
Application.Run();
}
}
Compiling with the following command "gmcs hello.cs -pkg:gtk-sharp-2.0"
depending on the command prompt, I'm receiving either cs0006 (mono cp) or cs2001 (win cp) saying that files cannot be found
from mono cp it says that the metadata file cannot be found
from win cp it says that source file cannot be found
Here's a sample:
c:\Users\Stephen Lloyd\Desktop>gmcs hello.cs -pkg:gtk-sharp-2.0
-r:C:/Program Files \(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/pango-sharp.dll \(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/atk-sharp.dll \(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/gdk-sharp.dll \(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/gtk-sharp.dll \(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/glib-sharp.dll
error CS2001: Source file `Files' could not be found
error CS2001: Source file `\(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/pango-sharp.dll' could not be found
error CS2001: Source file `\(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/atk-sharp.dll' could not be found
error CS2001: Source file `\(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/gdk-sharp.dll' could not be found
error CS2001: Source file `\(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/gtk-sharp.dll' could not be found
error CS2001: Source file `\(x86\)/Mono-2.10.8/lib/mono/gtk-sharp-2.0/glib-sharp.dll' could not be found
Compilation failed: 6 error(s), 0 warnings
In all cases the referenced .dlls are in that folder.
Any thoughts?
-pkg is broken on Windows; you will need to supply individual individual -r[eference]:s. Please see this answer for details.
As an alternative to manually entering references, I found it easier to just install mono to a path with no spaces aka C:\devtools\mono and then adding the ... C:\devtools\mono\bin to your path. The command was then successful for me. As an aside I have had a similar problem before with using unix devtools on windows and this has worked there as well.
Had this problem on MacOSX. The solution to add the mono bin directory to path solved it for me.
Specifically,
"/Library/Frameworks/Mono.framework/Versions/Current/bin"
needed to be on my path.
I did this:
export MONOPATH=/Library/Frameworks/Mono.framework/Versions/Current
export PATH=${PATH}:${MONOPATH}/bin
And afterwards, I was able to compile via:
gmcs /t:exe /debug+ -pkg:dotnet WinFormsHello.cs
(likewise for gtk# etc)
I was having the same problem running this on Windows 10. Since Windows supports symbolic links, since Vista, I thought this might be a solution ... it worked for me.
As Administrator, I created a directory symbolic link from the root directory to mono:
cd \
mklink /d mono "\program files x(86)\mono"
Then, again as Administrator, I edited the "Open Mono Command Prompt" shortcut properties:
Target: C:\Windows\SysWOW64\cmd.exe /k "C:\Mono\\bin\setmonopath.bat"
Start In: C:\Mono
Now when pkg-config parses the drive-path of mono.exe it "sees" only c:\mono and will proceed to append the rest of the path to resolve the required packages.
You can set your symbolic link from any directory. I set it from root for sake of simplicity. The main purpose is to establish a path without spaces or special characters.
I'm getting the following error when running an executable I created on a 64-bit machine using C++ code:
"Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries"
My PATH (shown below) obviously points to jvm.dll since I have that file in both C:\Progra~1\Java\jdk1.6.0_17\jre\bin and C:\Windows\System32
PATH=C:\Program Files (x86)\Gmake\bin;C:\Program Files (x86)\apache-ant-1.7.1\bin;C:\Progra~1\Java\jdk1.6.0_17\bin;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools;C:\Progra~1\Java\jdk1.6.0_17\jre\bin\server;C:\Progra~1\Java\jdk1.6.0_17\jre\bin;C:\Windows\System32
Does anybody have any ideas as to what would cause this error? Thanks.
Use dependency walker to figure out what dll is missing.
I have the same issue when I run the java.exe in my Windows2008 R2 version.
my path was
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files\System Center Operations Manager 2007\
;C:\Java\jdk1.6.0_33\bin
when I run the java.exe under C:\Java\jdk1.6.0_33\bin, it works fine. I found that within the c:\Windows\System32\ comes with a copy of java.exe. When I run the c:\Windows\System32\java.exe, it shows the same error:
C:\>Windows\System32\java.exe
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries
I fixed this issue by moving the C:\Java\jdk1.6.0_33\bin to the beginning of the PATH environment:
PATH=C:\Java\jdk1.6.0_33\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\
Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\System Center
Operations Manager 2007\
Hope this help.
This is how I solved a similar problem:
Used JavaRa: http://singularlabs.com/software/javara/ to remove old java versions.
Restarted the PC.
Re-installed the latest JDK version.
In my case, there was a jvm.dll file in the same folder as my exe file. I simply deleted the jvm.dll from there and it worked. Probably, it preceded the one in the PATH
I got this error as my PATH (environment variable) has not set correctly.
while setting PATH variable, set path of jvm.dll as a very first path in the list
Reboot your machine.
Note: Do not move jvm.dll to your project directory.
I had a complicated case. There was a jvm.dll file in the same folder as my exe file. I deleted it (because it shouldn't be there) but jvm.dll couldn't be find then.
I wanted to solve it by adding %JAVA_HOME%\jre\bin\server to my PATH because jvm.dll is located there. However, it didn't work. It turned out that the Windows loader won't expand the JAVA_HOME variable during searching for jvm.dll in the paths specified in PATH because I defined JAVA_HOME as user's variable. When I defined JAVA_HOME as a system variable, it started working as expected.