ArduPilot / MissionPlanner

Mission Planner Ground Control Station for ArduPilot (c# .net)
http://ardupilot.org/planner/
GNU General Public License v3.0
1.78k stars 2.4k forks source link

I can't compile #536

Closed OuyangNick closed 9 years ago

OuyangNick commented 10 years ago

The below is readme.txt

  1. Install software
  2. Check out
  3. Build
    • Open ArdupilotMega.sln with Visual Studio express 2013 for windows desktop.
    • Compile.

-----------MONO------------- run using mono MissionPlanner.exe

run debuging MONO_LOG_LEVEL=debug mono MissionPlanner.exe

you need prereq's sudo apt-get install mono-runtime libmono-system-windows-forms4.0-cil libmono-system-core4.0-cil libmono-winforms2.0-cil libmono-corlib2.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil

I don't know what's mean the below: -----------MONO------------- run using mono MissionPlanner.exe

run debuging MONO_LOG_LEVEL=debug mono MissionPlanner.exe

you need prereq's "sudo apt-get install mono-runtime libmono-system-windows-forms4.0-cil libmono-system-core4.0-cil libmono-winforms2.0-cil libmono-corlib2.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil" meanwhile,i can't compile. The error massage:Failed to find a metadata file error 23 “G:\mission\MissionPlanner\ExtLibs\Utilities\bin\Debug\MissionPlanner.Utilities.dll” G:\mission\MissionPlanner\ExtLibs\Controls\CSC MissionPlanner.Controls Thanks

metalnow commented 10 years ago

Hey, I met the problem yesterday. Here is my solution.

  1. download the source code of GMap from codeplex https://www.codeplex.com/Download/SourceControlFileDownload.ashx?ProjectName=greatmaps&changeSetId=3660acb94e16
  2. in the zip file, find "References" folder and extract it to your [missionplanner source]\ExtLibs\
  3. open "ArdupilotMega.sln". Below the projects [Libs\MissionPlanner.Utilities], [Libs\MissionPlanner.Controls] and [MissionPlanner], right-clicks on [References] and choose "Add Reference".
  4. Chose "Solution\Projects" on left side. On right side, make a check to "GMap.NET.Core" and "GMap.NET.WindowsForms" for these three projects.
  5. check there is no question mark or cross mark on the References lib.
  6. rebuild.

In the end of readme.txt file, forget the MONO staff. It's just a note for someone.

trkinslow commented 10 years ago

Cool, thanks. I was having the same problem. Your post gave me the missing link (pun intended!). The whole "Build Mission Planner" text should be redone to match what really needs to happen with VS 2013 (as most people would get if they started from scratch today). The real "how to" is pieced together from a couple different web pages and posts. - Tim

trkinslow commented 10 years ago

Are there other config type files that need to be copied to the debug directory in addition to the xml files?

MP builds, runs, and connects to Pixhawk, but I don't get maps: "The underlying connection was closed: An unexpected error occurred on a receive". Looks to be the tile loader.

trkinslow commented 10 years ago

Continuing with this in case someone chimes in. Something is blocking the simple GetRequest from Google Maps. It goes into .net and returns a dropped connection error. Production MP works okay as does the basic HTTP code doing the same thing outside of MP. MP is setting up .net someplace in such a way that something, someplace, is blocking it. Yes, I have virus checkers and firewalls disabled.

The upside is that I'm learning the entire MP startup flow and the gmap aspect! ;-)

Isaac96 commented 9 years ago

I cannot compile either. I unzipped the folder and opened "ArdupilotMega.sln" with Visual Studio Express Desktop 2013. I get these errors: Error 18 The type or namespace name 'DirectX' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\Joystick\Joystick.cs 7 17 MissionPlanner Error 19 The type or namespace name 'DirectX' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\Joystick\JoystickSetup.cs 9 17 MissionPlanner Error 20 The type or namespace name 'Device' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\Joystick\Joystick.cs 17 9 MissionPlanner Error 21 The type or namespace name 'JoystickState' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\Joystick\Joystick.cs 18 9 MissionPlanner Error 22 The type or namespace name 'DeviceList' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\Joystick\Joystick.cs 218 23 MissionPlanner Error 23 The type or namespace name 'Device' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\Joystick\Joystick.cs 930 16 MissionPlanner Error 24 Metadata file 'C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\bin\Debug\MissionPlanner.exe' could not be found C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\MissionPlanner.Stats\CSC MissionPlanner.Stats Error 25 Metadata file 'C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\bin\Debug\MissionPlanner.exe' could not be found C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\Grid\CSC MissionPlanner.Grid Error 26 Metadata file 'C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\bin\Debug\MissionPlanner.exe' could not be found C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\TrackerHome\CSC TrackerHomeGPS Error 27 Metadata file 'C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\bin\Debug\MissionPlanner.exe' could not be found C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\SimpleGrid\CSC MissionPlanner.SimpleGrid Error 28 Metadata file 'C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\bin\Debug\MissionPlanner.exe' could not be found C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\ExtGuided\CSC ExtGuided Error 29 Metadata file 'C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\bin\Debug\MissionPlanner.exe' could not be found C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\MissionPlanner.Gridv2\CSC MissionPlanner.Gridv2 Warning 1 Assembly reference 'MissionPlanner, PublicKey=null' is invalid and cannot be resolved C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\GMap.NET.Core\Properties\AssemblyInfo.cs 28 21 GMap.NET.Core Warning 2 Unreachable code detected C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\GMap.NET.Core\GMap.NET.Internals\Cache.cs 124 10 GMap.NET.Core Warning 3 'Org.Mentalis.Network.ProxySocket.ProxySocket.Connect(string, int)' hides inherited member 'System.Net.Sockets.Socket.Connect(string, int)'. Use the new keyword if hiding was intended. C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\GMap.NET.Core\GMap.NET.Internals\SocksProxySocket\ProxySocket.cs 130 21 GMap.NET.Core Warning 4 'Org.Mentalis.Network.ProxySocket.ProxySocket.BeginConnect(string, int, System.AsyncCallback, object)' hides inherited member 'System.Net.Sockets.Socket.BeginConnect(string, int, System.AsyncCallback, object)'. Use the new keyword if hiding was intended. C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\GMap.NET.Core\GMap.NET.Internals\SocksProxySocket\ProxySocket.cs 195 29 GMap.NET.Core Warning 5 Could not resolve this reference. Could not locate the assembly "Mono.Data.SqliteClient". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GMap.NET.Core Warning 6 Could not resolve this reference. Could not locate the assembly "Mono.Security". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GMap.NET.Core Warning 7 Could not resolve this reference. Could not locate the assembly "MySql.Data". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GMap.NET.Core Warning 8 Could not resolve this reference. Could not locate the assembly "Npgsql". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GMap.NET.Core Warning 9 Could not resolve this reference. Could not locate the assembly "System.Data.SQLite". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GMap.NET.Core Warning 10 The variable 'baseurl1sec' is assigned but its value is never used C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\Utilities\srtm.cs 400 20 MissionPlanner.Utilities Warning 11 'GMap.NET.WindowsForms.ToolTips.GMapBaloonToolTip.DefaultStroke' hides inherited member 'GMap.NET.WindowsForms.GMapToolTip.DefaultStroke'. Use the new keyword if hiding was intended. C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\GMap.NET.WindowsForms\GMap.NET.WindowsForms\ToolTips\GMapBaloonToolTip.cs 18 34 GMap.NET.WindowsForms Warning 12 The variable 'customarrows' is assigned but its value is never used C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\GMap.NET.WindowsForms\GMap.NET.WindowsForms\GMapRoute.cs 157 22 GMap.NET.WindowsForms Warning 13 The variable 'crap' is assigned but its value is never used C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\SharpKml\Base\TypeBrowser.cs 116 17 SharpKml Warning 14 Assignment made to same variable; did you mean to assign something else? C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\Controls\Sphere.cs 288 17 MissionPlanner.Controls Warning 15 This label has not been referenced C:\Users\Isaac\Desktop\Chrome Downloads\MissionPlanner-master\MissionPlanner-master\ExtLibs\tlogThumbnailHandler\tlogThumbnailHandler.cs 141 13 tlogThumbnailHandler Warning 16 Could not resolve this reference. Could not locate the assembly "Microsoft.DirectX". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. MissionPlanner Warning 17 Could not resolve this reference. Could not locate the assembly "Microsoft.DirectX.DirectInput". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. MissionPlanner Warning 30 The referenced component 'Microsoft.DirectX' could not be found. MissionPlanner Warning 31 The referenced component 'Microsoft.DirectX.DirectInput' could not be found. MissionPlanner Warning 32 The referenced component 'Mono.Data.SqliteClient' could not be found. GMap.NET.Core Warning 33 The referenced component 'Mono.Security' could not be found. GMap.NET.Core Warning 34 The referenced component 'MySql.Data' could not be found. GMap.NET.Core Warning 35 The referenced component 'Npgsql' could not be found. GMap.NET.Core Warning 36 The referenced component 'System.Data.SQLite' could not be found. GMap.NET.Core

meee1 commented 9 years ago

please install Microsoft directx sdk.

palmnz commented 9 years ago

Hi there,

I have shared the similar problem, even if I re-install the DirectX SDK. By default, Windows 8.1 comes with DirectX, just do not know why it does not work?