I've the source code of ffmpeg and would like to build it in my win7. I've minGW installed on my machine. I found a step by step instruction from this link:
http://www.gooli.org/blog/building-ffmpeg-for-windows-with-msys-and-mingw/
The link 'Download updated bash for MSYS' did not follow. It showed the file is not found. When I try to build the program the way explained in the site, it shows an error:
Unknown option “–extra-cflags=-mno-cygwin”.
See ./configure –help for available options.
./myconfig: –extra-ldflags=-Wl,–add-stdcall-alias: command not found
./myconfig: –target-os=mingw32: command not found
From a similar question posted here, I followed the link http://ffmpeg.arrozcru.org/ but the static build downloaded from the site was corrupted. Pls help.
yeah, those instructions are really old, refer to old version of mingw/msys
better, new instructions (visual walk through ) available at http://ingar.satgnu.net/devenv/mingw32/base.html
you install msys, not bash, it comes with MinGW shell, /bin/sh.exe, and you use it to drive configure, just like ingar does with a whole bunch of other projects above
the usual magic incantation is
sh configure --enable-static --enable-shared
make test
make install
Related
How is this possible?
I installed .net sdk 6.0.405: dotnet-sdk-6.0.405-win-x64.exe
I can in windows terminal and power shell run: dotnet --version: 6.0.405 ✅
I CAN ALSO IN VSCODE IN ITS BUILTIN TERMINAL, run: dotnet --version: 6.0.405 ✅✅
But in the OUTPUT tab, choosing OmniSharp Log from the dropdown, it says:
[ERROR] A .NET 6 SDK for x86_64 was not found. Please install the latest x86_64 SDK from ...
I switched vscode explorer settings to use external terminal.
And this terminal setting to command prompt:
Terminal › Integrated › Default Profile: Windows
The default profile used on Windows. This setting will currently be ignored if either terminal.integrated.shell.windows or terminal.integrated.shellArgs.windows are set.
I have dotnet in the PATH (and it works in terminals and in vscode's terminal)
I restarted vscode, AND REINSTALLED the dotnettools "C# for Visual Studio Code (powered by OmniSharp)" extension. I went to the online store and from the right column under Resources I downloaded the ms-dotnettools.csharp-1.25.2#win32-x64.vsix to make sure I get the right one. And restarted vscode.
I tried this setting:
Omnisharp: Dotnet Path
Specified the path to a dotnet installation to use when "useModernNet" is set to true, instead of the default system one. This only influences the dotnet installation to use for hosting Omnisharp itself. Example: "/home/username/mycustomdotnetdirectory".
C:/Program Files/dotnet/sdk/6.0.405
And this setting:
Omnisharp: Sdk Path
Specifies the path to a .NET SDK installation to use for project loading instead of the highest version installed. Applies when "useModernNet" is set to true. Example: /home/username/dotnet/sdks/6.0.300.
C:/Program Files/dotnet/sdk/6.0.405
And restarted vscode. And now it says:
[ERROR] Error: Command failed: dotnet.exe --version
'dotnet.exe' is not recognized as an internal or external command,
operable program or batch file.
What? W H A T? lol
What could be wrong? Why isn't it saying where it expected to find it and what to do to locate it? Is there a setting to specify the dotnet.exe path to this C# extension? Does it need always-on internet or something? Does it have DRM? Does it need Edge installed? Wtf?🙂
🙃😭 I just need intellisense; and I've wasted 2h, on only microsoft-owned products.
#Microsoft 0/5 stars
Still don't know why it happens, but here's how to solve it:
The problem was from this: I like to keep all my visual studio code extensions as .vsix files locally in folders so I can remember and get them easily & offline. Sensible enough choice, and I had the correct ms-dotnettools.csharp-1.25.2#win32-x64.vsix for my platform.
But in VSCode, when I install this particular extension via VSIX, even though it succeeds, it can't find .net. If you instead install the extension "normally", ie via vscode's own download, it seems vscode does some extra configuration steps while installing, and probably sets the .net paths correctly or something. Because now it works.
So TL;DR: don't install ms-dotnettools.csharp via vsix, it seems bugged. 😶
Would love to see an answer explaining what's wrong / how to actually do via vsix; but I don't have any more time to debug this rn.
I could not find anything similar to this, troubleshooting doesn't seem to have similar issues of a missing license.
How to get this license file and where to add it, as it may be the issue which fails the whole build ?
Any insight is much appreciated.
alex31#Air3:~$ `brew install scriptcs`
==> Installing dependencies for scriptcs: mono
==> Installing scriptcs dependency: mono
==> Downloading https://download.mono-project.com/sources/mono/mono-6.4.0.198.ta
Already downloaded: /home/alex31/.cache/Homebrew/downloads/0f5bd5d4725f08bae7e853625da4da3ccdbb326dfa62820ffd3410b49ea6d64b--mono-6.4.0.198.tar.xz
==> ./configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/mono/6.4.0.198 --disa
==> make
==> make install
==> Cloning https://github.com/mono/msbuild.git
Updating /home/alex31/.cache/Homebrew/mono--msbuild--git
=> Checking out revision ad9c9926a76e3db0d2b878a24d44446d73640d19
HEAD is now at ad9c9926 Merge pull request #109 from radical/roslyn-bump-2019-02
HEAD is now at ad9c9926 Merge pull request #109 from radical/roslyn-bump-2019-02
==> ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Relea
Last 15 lines from /home/alex31/.cache/Homebrew/Logs/mono/04.cibuild_bootstrapped_msbuild.sh:
/tmp/mono--msbuild-20191101-2457-1g9gbaz/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19207.1
/tools/RepositoryValidation.proj(29,5): error : No license file found in '/tmp/mono--msbuild-20191101-2457-1g9gbaz/'.
Xunit.NetCore.Extensions -> /tmp/mono--msbuild-20191101-2457-1g9gbaz/artifacts /bin/Xunit.NetCore.Extensions/Release-MONO/net472/Xunit.NetCore.Extensions.dll
Dependency -> /tmp/mono--msbuild-20191101-2457-1g9gbaz/artifacts/bin/Samples/Dependency/Release-MONO/net472/Dependency.dll
PortableTask -> /tmp/mono--msbuild-20191101-2457-1g9gbaz/artifacts/bin/Samples/PortableTask /Release-MONO/netstandard1.3/PortableTask.dll
TaskUsageLogger -> /tmp/mono--msbuild-20191101-2457-1g9gbaz/artifacts/bin/Samples/TaskUsageLogger/Release-MONO/net472/TaskUsageLogger.dll
XmlFileLogger -> /tmp/mono--msbuild-20191101-2457-1g9gbaz/artifacts/bin/Samples/XmlFileLogger/Release-MONO/net472/XmlFileLogger.dll
Build FAILED.
/tmp/mono--msbuild-20191101-2457-1g9gbaz/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19207.1
/tools/RepositoryValidation.proj(29,5): error : No license file found in '/tmp/mono- -msbuiild20191101-2457-1g9gbaz/'.
0 Warning(s)
1 Error(s)
Time Elapsed 00:11:11.71
Build failed (exit code '1').
READ THIS: https://docs.brew.sh/Troubleshooting
There have been issues with Linuxbrew's mono installation, so I wouldn't get my hopes up for getting it to work anytime soon. This is what the Linuxbrew maintainer said a month ago:
Yes, I gave up on mono a few weeks ago. Let's close this, we can work on this later if needed. We can not fix everything at once.
Source
Also, it seems like the actual problem is with the msbuild part within the mono formula.
I'm not that experienced with Linuxbrew but maybe you could try to install mono separately and then install scriptcs with the --ignore-dependencies flag? It's possible that it won't work but it might be worth the try. I would also check whether msbuild is installed with mono and if not, install it with .NET Core.
Another option you have is to follow the official guideline on the scriptcs GitHub repository. They instruct you to install the Scriptcs Version Manager (SVM) and then use it to install the latest version of Scriptcs. By doing that, you can bypass the whole Linuxbrew stuff. You can find the instructions here.
I have the official SonarQube docker image running successfully under http://localhost:32768/ (it is the one provided by Docker)
We want to perform some code analysys with C#.NET, this application is located in a folder called c:\myapplication (that is where I have the prj and sln)
My question is HOW! how can I tell my SonarCube, running in my docker http://localhost:32768/ , I want to analyse my C# code?
Thanks a lot!
Since the second answer provided seemed to be windows specific I decided to write down how it can be done in Linux, including the sonarqube installation.
1.) Run the command:
$sudo docker pull sonarqube
This will pull the docker image.
2.) Run the server using the command:
$sudo docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
This will run the sonarqube server. You can then go to Firefox and visit the server at http://localhost:9000 and login with the password "admin" and user "admin.
------------------------------ Analyzing projects -------------------------------------------------------------------
1.) Download the sonarqube scanner from here:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild
2.) Unzip and place the files in a folder.
3.) Give executable permissions to the sonarcube file as follows:
$chmod +x <path-to-extracted-folder>/sonar-scanner-3.2.0.1227/bin/sonar-scanner
4.) Create a project using the user interface in firefox (localhost:9000).
5.) Go to the directory where the sln file is at and run the project commands. They will have one of the following forms:
$SonarScanner.MSBuild.exe begin /k:"project-key"
$MSBuild.exe /t:Rebuild
$SonarScanner.MSBuild.exe end
or
$dotnet <path to SonarScanner.MSBuild.dll> begin /k:"project-key"
$dotnet build
$dotnet <path to SonarScanner.MSBuild.dll> end
Either should work. Afterward you can see the your results in firefox.
To be pedantic about it, SonarQube doesn't analyze code. It presents the results of analyses to you (okay, it does actually do some further metric aggregation and calculation server-side). Instead, you want to tell the SonarQube Scanner for MSBuild to analyze your code. Doing so is fully documented.
Essentially
install the scanner
execute the Begin step (this tells the scanner to start listening)
(re)build your solution
execute the End step (tells the scanner to stop listening and process what it heard)
browse your project in the SonarQube interface.
The specific commands would look something like this:
SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"Project Name" /v:"1.0"
MSBuild.exe /t:Rebuild
SonarQube.Scanner.MSBuild.exe end
Thanks for your answers, but after a couple of hours, I decided to write a post in my blog in how to do it step by step.
I know that there is plenty of documentation, but there are many bits and pieces to touch before you can see the analysis done properly.
I decided to shared my views and result with you guys,
http://netsourcecode.blogspot.co.uk/2017/01/continuous-code-quality-with-net.html
have fun!
OS: Windows 10
dotnet-cli:
Version: 1.0.0-beta-001598
Commit Sha: 7582649f88
This is after following the instructions here for C# debugging. Does it work yet for windows?
According to the error message, it looks like you did not install the C# extension as per the instructions https://microsoft.gallery.vsassets.io/items?itemName=ms-vscode.csharp
Open your command pallet and verify that the correct version is installed. Or, if it is, remove it and try installing again
I'm new to linux and mono. I installed mono to a new Raspberry Pi machine using
sudo apt-get install mono-complete.
I also did the update and upgrade using apt-get.
I then followed the helloWorld examples in the Mono Basics page in mono-project website:
http://www.mono-project.com/docs/getting-started/mono-basics/
I managed to build and run the first 'Console Hello World' example using the following:
mcs hello.cs
mono hello.exe
However, when I tried the next example 'Winforms Hello World', I encountered the following error when running 'mcs hello.cs -pkg:dotnet':
error CS0006: Metadata file 'cscompmgd.dll' could not be found
However, it works if i use gmcs instead of mcs.
I googled here and there but no luck.
I can find a link to this file 'cscompmgd.dll' in '/usr/lib/mono/2.0' directory in my Raspberry Pi.
The installed mono version is 3.2.8 (returned by using 'mono --version').
Does anyone know why it works with gmcs but it doesn't work with mcs?
Thank you.
Solved by adding the -lib: option like this:
mcs helloWinforms.cs -pkg:dotnet -lib:/usr/lib/mono/2.0
Solution with adding
-lib:/usr/lib/mono/2.0
was not the best in my case (it broke a dependency on some 4.0 elements, specifically 'System.Threading').
Dirty, but works
Another, very dirty solution is to copy the
/usr/lib/mono/2.0/cscompmgd.dll
to your project folder (or wherever the Makefile is) and add
-r:cscompmgd.dll
when compiling (or add the filename after list of other included libraries specified by '-r').
There is probably a way to do that without copying the file, but that is beyond my capabilities.
So you end up with:
mcs helloWinforms.cs -pkg:dotnet -r:cscompmgd.dll