cannot compile hello.cs for gtk# using mono command prompt - mono

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.

Related

impossible to install a intellij idea

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.

The following configuration files were considered but not accepted:

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"

CMake VTK_DIR-NOTFOUND

VTK_DIR-NOTFOUND is returned when using CMake. I am using CMake GUI and, as other path errors, I can point then to proper path. However, for VTK doesn't work. I am pointing to directory where VTConfig.cmake file and others are. Also tried with all of other VTK dirs but without any sucess. I am using Visual Studio 12 2013 Win 64 configuration for generation but tried with 2010 too.
pointing to path manually,
The first thing I would check is what is the actual find_package() command being invoked where the error occurs? Perhaps that call is something a bit unusual or explicitly has the MODULE keyword (this would prevent the VTKConfig.cmake file from being found).
If that looks okay, check to see if something is modifying the VTK_DIR variable. Insert the following near the top of your top-most CMakeLists.txt file:
variable_watch(VTK_DIR)
This should tell you what, if anything, is modifying it in ways you didn't expect.
Assuming VTK_DIR is not actually being changed, the next thing you could try is setting CMAKE_PREFIX_PATH to the directory containing the VTKConfig.cmake file (you can add this in the CMake GUI if it isn't there already). Maybe also try variable_watch(CMAKE_PREFIX_PATH) too just in case something is modifying that internally in unexpected was as well.
If that still doesn't reveal anything, then it would seem likely that there is something wrong with either your CMake or VTK installation. Perhaps try an earlier CMake version and see if you get any different behaviour.
Although the currently accepted answer is a good way of debugging, it looks like you're building Point Cloud Library (PCL) with the binaries from unancyowen. In which case I suggest ensuring your system environment variables are setup correctly which will automate the process you are currently going through and facilitate the job of the find_package() methods.
Assuming you installed everything in the same directory (i.e. where you have already linked to FLANN and Eigen) the following default PCL 3rd Party Libraries should be added to Path:
C:\Program Files\PCL 1.7.2\3rdParty\FLANN\bin
C:\Program Files\PCL 1.7.2\3rdParty\VTK\bin
C:\Program Files\PCL 1.7.2\3rdParty\Eigen
C:\Program Files\PCL 1.7.2\3rdParty\Boost
Then Qt, OpenNI etc. which are installed separately.
And you can also add:
BOOST_INCLUDEDIR : C:\Program Files\PCL 1.7.2\3rdParty\Boost\include\boost-X_XX\boost (Replace X_XX with your version number)
BOOST_LIBRARYDIR : C:\Program Files\PCL 1.7.2\3rdParty\Boost\lib
BOOST_ROOT : C:\Program Files\PCL 1.7.2\3rdParty\Boost
EIGEN_ROOT : C:\Program Files\PCL 1.7.2\3rdParty\Eigen
In the field where it is showing that
VTK - DIR : NOT FOUND
You can either copy paste the location or type in, or just browse for the file called VTKConfig.cmake. Generally found inside the build folder of VTK. This is how it solved in my case. Have a try!!

mono Newbie. Installed but env vars not set.. maybe things missing

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.

Directory used in Command line to Compile&Run .java file

I installed JDK on my PC running windows XP, the default directory of JDK is :
C:\Program Files\Java\jdk1.7.0_05\bin
I'm following the tutorial to do a sample
My source file named HelloWorld is in another directory : E:\NotePad\Code
As the tutorial says : "To compile your source file, change your current directory to the directory where your file is located" , so I change my Command's current directory to E:\NotePad\Code , but here comes the problem which is saying 'javac' is not recognized as an internal or external command
Well, the tutorial has a solution to this problem, it seems that I should change Command Line's current directory to where the JDK is installed which is : C:\Program Files\Java\jdk1.7.0_05\bin
After I finish it, I try this commond : javac HelloWorld.java to compile the file, but it says
javac : cannot find file : HelloWorld.java
It means that the HelloWorld.java file in E:\NotePad\Code can't be compiled by the JDK which is installed in C:\Program Files\Java\jdk1.7.0_05\bin
I try putting the HelloWorld.java file in C:\Program Files\Java\jdk1.7.0_05\bin , it works fine
So the question is : How can I Compile&Run a file with the JDK installed in a different directory ?
You will either need C:\Program Files\Java\jdk1.7.0_05\bin on your PATH, or reference the compiler directly using
C:\Program Files\Java\jdk1.7.0_05\bin\javac
It sounds like you need to update your PATH variable, see here: http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#path