godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.74k stars 576 forks source link

Generation of android bindings fails due to "/nologo"-flag #361

Closed 2shady4u closed 3 years ago

2shady4u commented 4 years ago

Generation of android bindings, using the latest master branch, fails due to Scons adding a "/nologo"-flag that shouldn't be there...

Capture

EDIT (without the use_mingw-flag): Capture

Versions:

Why does this happen? For some reason this flag is added with initializing the construction environment: env = Environment(ENV = os.environ) I have zero clue why this happens though...

Temporary work-around: Explicitly removing the '/nologo'-flag from the env does the trick, like so: Capture Capture2

Does anyone know what I am doing wrong? Or is this Scons' (or some other programs) fault?

piiertho commented 4 years ago

Hi ! Maybe I'm wrong, but I think nologo is the option to tell microsoft compiler to not display informations like version. Try to remove use_mingw argument, to see if it changes anything.

2shady4u commented 4 years ago

I'm not an expert in Scons so I don't really know (on an advanced) level how any of this works. I'm not using any "use_mingw" arguments in my cmd in Powershell.

Commenting out the part about "mingw" in the SConstruct file, regarding android, crashes because the command's auto-generated flags are now totally wrong...

Capture

piiertho commented 4 years ago

On your first screen, the last command argument is use_mingw=yes

Here

2shady4u commented 4 years ago

Apologies for some reason I included a picture that had this flag (because I was getting desperate and trying out all the flags), here is the same cmd crashing, but without the mingw-flag:

Capture

piiertho commented 4 years ago

Hi ! As I am away from home I only have a macbook to test it. From OSX there is no problem running scons platform=android generate_bindings=yes ANDROID_NDK_ROOT="/Users/piertho/Library/android-sdks/ndk-bundle" android_arch=arm64v8 I'll test on windows as soon as I come back home :)

EDIT:

I tested on my windows, I cannot reproduce the error:

C:\Users\ptmeisels\git\UtopiaRise-GDNative\godot-cpp> scons  platform=android generate_bindings=yes ANDROID_NDK_ROOT="C:/android-ndk-r20b" android_arch=arm64v8
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\AABB.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\AABB.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Array.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Array.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Basis.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Basis.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Color.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Color.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Dictionary.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Dictionary.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\GodotGlobal.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\GodotGlobal.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\NodePath.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\NodePath.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Plane.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Plane.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\PoolArrays.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\PoolArrays.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Quat.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Quat.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\Rect2.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\Rect2.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\RID.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\RID.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\String.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\String.cpp

...

C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VisualShaderNodeVectorOp.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VisualShaderNodeVectorOp.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VisualShaderNodeVectorRefract.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VisualShaderNodeVectorRefract.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VisualShaderNodeVectorScalarSmoothStep.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VisualShaderNodeVectorScalarSmoothStep.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VisualShaderNodeVectorScalarStep.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VisualShaderNodeVectorScalarStep.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VisualShaderNodeVectorSmoothStep.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VisualShaderNodeVectorSmoothStep.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VScrollBar.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VScrollBar.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VSeparator.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VSeparator.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VSlider.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VSlider.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\VSplitContainer.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\VSplitContainer.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WeakRef.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WeakRef.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebRTCDataChannel.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebRTCDataChannel.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebRTCDataChannelGDNative.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebRTCDataChannelGDNative.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebRTCMultiplayer.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebRTCMultiplayer.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebRTCPeerConnection.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebRTCPeerConnection.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebRTCPeerConnectionGDNative.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebRTCPeerConnectionGDNative.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebSocketClient.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebSocketClient.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebSocketMultiplayerPeer.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebSocketMultiplayerPeer.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebSocketPeer.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebSocketPeer.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WebSocketServer.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WebSocketServer.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WindowDialog.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WindowDialog.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\World.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\World.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\World2D.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\World2D.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\WorldEnvironment.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\WorldEnvironment.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\XMLParser.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\XMLParser.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\YSort.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\YSort.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\__init_method_bindings.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\__init_method_bindings.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\gen\__register_types.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\gen\__register_types.cpp
C:/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ar rc bin\libgodot-cpp.android.debug.arm64v8.a src\core\AABB.o src\core\Array.o src\core\Basis.o src\core\Color.o src\core\Dictionary.o src\core\GodotGlobal.o src\core\NodePath.o src\core\Plane.o src\core\PoolArrays.o src\core\Quat.o src\core\Rect2.o src\core\RID.o src\core\String.o src\core\TagDB.o src\core\Transform.o src\core\Transform2D.o src\core\Variant.o src\core\Vector2.o src\core\Vector3.o src\gen\AcceptDialog.o src\gen\AnimatedSprite.o src\gen\AnimatedSprite3D.o src\gen\AnimatedTexture.o src\gen\Animation.o src\gen\AnimationNode.o src\gen\AnimationNodeAdd2.o src\gen\AnimationNodeAdd3.o src\gen\AnimationNodeAnimation.o src\gen\AnimationNodeBlend2.o src\gen\AnimationNodeBlend3.o src\gen\AnimationNodeBlendSpace1D.o src\gen\AnimationNodeBlendSpace2D.o src\gen\AnimationNodeBlendTree.o src\gen\AnimationNodeOneShot.o src\gen\AnimationNodeOutput.o src\gen\AnimationNodeStateMachine.o src\gen\AnimationNodeStateMachinePlayback.o src\gen\AnimationNodeStateMachineTransition.o src\gen\AnimationNodeTimeScale.o src\gen\AnimationNodeTimeSeek.o src\gen\AnimationNodeTransition.o src\gen\AnimationPlayer.o src\gen\AnimationRootNode.o src\gen\AnimationTrackEditPlugin.o src\gen\AnimationTree.o src\gen\AnimationTreePlayer.o src\gen\Area.o src\gen\Area2D.o src\gen\ArrayMesh.o src\gen\ARVRAnchor.o src\gen\ARVRCamera.o src\gen\ARVRController.o src\gen\ARVRInterface.o src\gen\ARVRInterfaceGDNative.o src\gen\ARVROrigin.o src\gen\ARVRPositionalTracker.o src\gen\ARVRServer.o src\gen\AStar.o src\gen\AtlasTexture.o src\gen\AudioBusLayout.o src\gen\AudioEffect.o src\gen\AudioEffectAmplify.o src\gen\AudioEffectBandLimitFilter.o src\gen\AudioEffectBandPassFilter.o src\gen\AudioEffectChorus.o src\gen\AudioEffectCompressor.o src\gen\AudioEffectDelay.o src\gen\AudioEffectDistortion.o src\gen\AudioEffectEQ.o src\gen\AudioEffectEQ10.o src\gen\AudioEffectEQ21.o src\gen\AudioEffectEQ6.o src\gen\AudioEffectFilter.o src\gen\AudioEffectHighPassFilter.o src\gen\AudioEffectHighShelfFilter.o src\gen\AudioEffectInstance.o src\gen\AudioEffectLimiter.o src\gen\AudioEffectLowPassFilter.o src\gen\AudioEffectLowShelfFilter.o src\gen\AudioEffectNotchFilter.o src\gen\AudioEffectPanner.o src\gen\AudioEffectPhaser.o src\gen\AudioEffectPitchShift.o src\gen\AudioEffectRecord.o src\gen\AudioEffectReverb.o src\gen\AudioEffectSpectrumAnalyzer.o src\gen\AudioEffectSpectrumAnalyzerInstance.o src\gen\AudioEffectStereoEnhance.o src\gen\AudioServer.o src\gen\AudioStream.o src\gen\AudioStreamGenerator.o src\gen\AudioStreamGeneratorPlayback.o src\gen\AudioStreamMicrophone.o src\gen\AudioStreamOGGVorbis.o src\gen\AudioStreamPlayback.o src\gen\AudioStreamPlaybackResampled.o src\gen\AudioStreamPlayer.o src\gen\AudioStreamPlayer2D.o src\gen\AudioStreamPlayer3D.o src\gen\AudioStreamRandomPitch.o src\gen\AudioStreamSample.o src\gen\BackBufferCopy.o src\gen\BakedLightmap.o src\gen\BakedLightmapData.o src\gen\BaseButton.o src\gen\BitMap.o src\gen\BitmapFont.o src\gen\Bone2D.o src\gen\BoneAttachment.o src\gen\BoxContainer.o src\gen\BoxShape.o src\gen\BulletPhysicsDirectBodyState.o src\gen\BulletPhysicsServer.o src\gen\Button.o src\gen\ButtonGroup.o src\gen\Camera.o src\gen\Camera2D.o src\gen\CameraFeed.o src\gen\CameraServer.o src\gen\CameraTexture.o src\gen\CanvasItem.o src\gen\CanvasItemMaterial.o src\gen\CanvasLayer.o src\gen\CanvasModulate.o src\gen\CapsuleMesh.o src\gen\CapsuleShape.o src\gen\CapsuleShape2D.o src\gen\CenterContainer.o src\gen\CheckBox.o src\gen\CheckButton.o src\gen\CircleShape2D.o src\gen\ClassDB.o src\gen\ClippedCamera.o src\gen\CollisionObject.o src\gen\CollisionObject2D.o src\gen\CollisionPolygon.o src\gen\CollisionPolygon2D.o src\gen\CollisionShape.o src\gen\CollisionShape2D.o src\gen\ColorPicker.o src\gen\ColorPickerButton.o src\gen\ColorRect.o src\gen\ConcavePolygonShape.o src\gen\ConcavePolygonShape2D.o src\gen\ConeTwistJoint.o src\gen\ConfigFile.o src\gen\ConfirmationDialog.o src\gen\Container.o src\gen\Control.o src\gen\ConvexPolygonShape.o src\gen\ConvexPolygonShape2D.o src\gen\CPUParticles.o src\gen\CPUParticles2D.o src\gen\CSGBox.o src\gen\CSGCombiner.o src\gen\CSGCylinder.o src\gen\CSGMesh.o src\gen\CSGPolygon.o src\gen\CSGPrimitive.o src\gen\CSGShape.o src\gen\CSGSphere.o src\gen\CSGTorus.o src\gen\CubeMap.o src\gen\CubeMesh.o src\gen\Curve.o src\gen\Curve2D.o src\gen\Curve3D.o src\gen\CurveTexture.o src\gen\CylinderMesh.o src\gen\CylinderShape.o src\gen\DampedSpringJoint2D.o src\gen\DirectionalLight.o src\gen\Directory.o src\gen\DynamicFont.o src\gen\DynamicFontData.o src\gen\EditorExportPlugin.o src\gen\EditorFeatureProfile.o src\gen\EditorFileDialog.o src\gen\EditorFileSystem.o src\gen\EditorFileSystemDirectory.o src\gen\EditorImportPlugin.o src\gen\EditorInspector.o src\gen\EditorInspectorPlugin.o src\gen\EditorInterface.o src\gen\EditorNavigationMeshGenerator.o src\gen\EditorPlugin.o src\gen\EditorProperty.o src\gen\EditorResourceConversionPlugin.o src\gen\EditorResourcePreview.o src\gen\EditorResourcePreviewGenerator.o src\gen\EditorSceneImporter.o src\gen\EditorSceneImporterAssimp.o src\gen\EditorScenePostImport.o src\gen\EditorScript.o src\gen\EditorSelection.o src\gen\EditorSettings.o src\gen\EditorSpatialGizmo.o src\gen\EditorSpatialGizmoPlugin.o src\gen\EncodedObjectAsID.o src\gen\Engine.o src\gen\Environment.o src\gen\Expression.o src\gen\File.o src\gen\FileDialog.o src\gen\Font.o src\gen\FuncRef.o src\gen\GDNative.o src\gen\GDNativeLibrary.o src\gen\GDNativeLibraryResourceLoader.o src\gen\GDNativeLibraryResourceSaver.o src\gen\GDScript.o src\gen\GDScriptFunctionState.o src\gen\Generic6DOFJoint.o src\gen\Geometry.o src\gen\GeometryInstance.o src\gen\GIProbe.o src\gen\GIProbeData.o src\gen\GlobalConstants.o src\gen\Gradient.o src\gen\GradientTexture.o src\gen\GraphEdit.o src\gen\GraphNode.o src\gen\GridContainer.o src\gen\GridMap.o src\gen\GrooveJoint2D.o src\gen\HBoxContainer.o src\gen\HeightMapShape.o src\gen\HingeJoint.o src\gen\HScrollBar.o src\gen\HSeparator.o src\gen\HSlider.o src\gen\HSplitContainer.o src\gen\HTTPClient.o src\gen\HTTPRequest.o src\gen\Image.o src\gen\ImageTexture.o src\gen\ImmediateGeometry.o src\gen\Input.o src\gen\InputDefault.o src\gen\InputEvent.o src\gen\InputEventAction.o src\gen\InputEventGesture.o src\gen\InputEventJoypadButton.o src\gen\InputEventJoypadMotion.o src\gen\InputEventKey.o src\gen\InputEventMagnifyGesture.o src\gen\InputEventMIDI.o src\gen\InputEventMouse.o src\gen\InputEventMouseButton.o src\gen\InputEventMouseMotion.o src\gen\InputEventPanGesture.o src\gen\InputEventScreenDrag.o src\gen\InputEventScreenTouch.o src\gen\InputEventWithModifiers.o src\gen\InputMap.o src\gen\InstancePlaceholder.o src\gen\InterpolatedCamera.o src\gen\IP.o src\gen\IP_Unix.o src\gen\ItemList.o src\gen\JavaScript.o src\gen\Joint.o src\gen\Joint2D.o src\gen\JSON.o src\gen\JSONParseResult.o src\gen\KinematicBody.o src\gen\KinematicBody2D.o src\gen\KinematicCollision.o src\gen\KinematicCollision2D.o src\gen\Label.o src\gen\LargeTexture.o src\gen\Light.o src\gen\Light2D.o src\gen\LightOccluder2D.o src\gen\Line2D.o src\gen\LineEdit.o src\gen\LineShape2D.o src\gen\LinkButton.o src\gen\Listener.o src\gen\MainLoop.o src\gen\MarginContainer.o src\gen\Marshalls.o src\gen\Material.o src\gen\MenuButton.o src\gen\Mesh.o src\gen\MeshDataTool.o src\gen\MeshInstance.o src\gen\MeshInstance2D.o src\gen\MeshLibrary.o src\gen\MeshTexture.o src\gen\MobileVRInterface.o src\gen\MultiMesh.o src\gen\MultiMeshInstance.o src\gen\MultiMeshInstance2D.o src\gen\MultiplayerAPI.o src\gen\MultiplayerPeerGDNative.o src\gen\Mutex.o src\gen\NativeScript.o src\gen\Navigation.o src\gen\Navigation2D.o src\gen\NavigationMesh.o src\gen\NavigationMeshInstance.o src\gen\NavigationPolygon.o src\gen\NavigationPolygonInstance.o src\gen\NetworkedMultiplayerENet.o src\gen\NetworkedMultiplayerPeer.o src\gen\NinePatchRect.o src\gen\Node.o src\gen\Node2D.o src\gen\NoiseTexture.o src\gen\Object.o src\gen\OccluderPolygon2D.o src\gen\OmniLight.o src\gen\OpenSimplexNoise.o src\gen\OptionButton.o src\gen\OS.o src\gen\PackedDataContainer.o src\gen\PackedDataContainerRef.o src\gen\PackedScene.o src\gen\PacketPeer.o src\gen\PacketPeerGDNative.o src\gen\PacketPeerStream.o src\gen\PacketPeerUDP.o src\gen\Panel.o src\gen\PanelContainer.o src\gen\PanoramaSky.o src\gen\ParallaxBackground.o src\gen\ParallaxLayer.o src\gen\Particles.o src\gen\Particles2D.o src\gen\ParticlesMaterial.o src\gen\Path.o src\gen\Path2D.o src\gen\PathFollow.o src\gen\PathFollow2D.o src\gen\PCKPacker.o src\gen\Performance.o src\gen\PHashTranslation.o src\gen\PhysicalBone.o src\gen\Physics2DDirectBodyState.o src\gen\Physics2DDirectBodyStateSW.o src\gen\Physics2DDirectSpaceState.o src\gen\Physics2DServer.o src\gen\Physics2DServerSW.o src\gen\Physics2DShapeQueryParameters.o src\gen\Physics2DShapeQueryResult.o src\gen\Physics2DTestMotionResult.o src\gen\PhysicsBody.o src\gen\PhysicsBody2D.o src\gen\PhysicsDirectBodyState.o src\gen\PhysicsDirectSpaceState.o src\gen\PhysicsMaterial.o src\gen\PhysicsServer.o src\gen\PhysicsShapeQueryParameters.o src\gen\PhysicsShapeQueryResult.o src\gen\PinJoint.o src\gen\PinJoint2D.o src\gen\PlaneMesh.o src\gen\PlaneShape.o src\gen\PluginScript.o src\gen\Polygon2D.o src\gen\PolygonPathFinder.o src\gen\Popup.o src\gen\PopupDialog.o src\gen\PopupMenu.o src\gen\PopupPanel.o src\gen\Position2D.o src\gen\Position3D.o src\gen\PrimitiveMesh.o src\gen\PrismMesh.o src\gen\ProceduralSky.o src\gen\ProgressBar.o src\gen\ProjectSettings.o src\gen\ProximityGroup.o src\gen\ProxyTexture.o src\gen\QuadMesh.o src\gen\RandomNumberGenerator.o src\gen\Range.o src\gen\RayCast.o src\gen\RayCast2D.o src\gen\RayShape.o src\gen\RayShape2D.o src\gen\RectangleShape2D.o src\gen\Reference.o src\gen\ReferenceRect.o src\gen\ReflectionProbe.o src\gen\RegEx.o src\gen\RegExMatch.o src\gen\RemoteTransform.o src\gen\RemoteTransform2D.o src\gen\Resource.o src\gen\ResourceFormatDDS.o src\gen\ResourceFormatImporter.o src\gen\ResourceFormatLoader.o src\gen\ResourceFormatLoaderBinary.o src\gen\ResourceFormatLoaderBMFont.o src\gen\ResourceFormatLoaderDynamicFont.o src\gen\ResourceFormatLoaderGDScript.o src\gen\ResourceFormatLoaderImage.o src\gen\ResourceFormatLoaderNativeScript.o src\gen\ResourceFormatLoaderShader.o src\gen\ResourceFormatLoaderStreamTexture.o src\gen\ResourceFormatLoaderText.o src\gen\ResourceFormatLoaderTextureLayered.o src\gen\ResourceFormatLoaderTheora.o src\gen\ResourceFormatLoaderVideoStreamGDNative.o src\gen\ResourceFormatLoaderWebm.o src\gen\ResourceFormatPKM.o src\gen\ResourceFormatPVR.o src\gen\ResourceFormatSaver.o src\gen\ResourceFormatSaverBinary.o src\gen\ResourceFormatSaverGDScript.o src\gen\ResourceFormatSaverNativeScript.o src\gen\ResourceFormatSaverShader.o src\gen\ResourceFormatSaverText.o src\gen\ResourceImporter.o src\gen\ResourceImporterOGGVorbis.o src\gen\ResourceInteractiveLoader.o src\gen\ResourceLoader.o src\gen\ResourcePreloader.o src\gen\ResourceSaver.o src\gen\ResourceSaverPNG.o src\gen\RichTextLabel.o src\gen\RigidBody.o src\gen\RigidBody2D.o src\gen\RootMotionView.o src\gen\SceneState.o src\gen\SceneTree.o src\gen\SceneTreeTimer.o src\gen\Script.o src\gen\ScriptCreateDialog.o src\gen\ScriptEditor.o src\gen\ScrollBar.o src\gen\ScrollContainer.o src\gen\SegmentShape2D.o src\gen\Semaphore.o src\gen\Separator.o src\gen\Shader.o src\gen\ShaderMaterial.o src\gen\Shape.o src\gen\Shape2D.o src\gen\ShortCut.o src\gen\Skeleton.o src\gen\Skeleton2D.o src\gen\SkeletonIK.o src\gen\Sky.o src\gen\Slider.o src\gen\SliderJoint.o src\gen\SoftBody.o src\gen\Spatial.o src\gen\SpatialGizmo.o src\gen\SpatialMaterial.o src\gen\SpatialVelocityTracker.o src\gen\SphereMesh.o src\gen\SphereShape.o src\gen\SpinBox.o src\gen\SplitContainer.o src\gen\SpotLight.o src\gen\SpringArm.o src\gen\Sprite.o src\gen\Sprite3D.o src\gen\SpriteBase3D.o src\gen\SpriteFrames.o src\gen\StaticBody.o src\gen\StaticBody2D.o src\gen\StreamPeer.o src\gen\StreamPeerBuffer.o src\gen\StreamPeerGDNative.o src\gen\StreamPeerSSL.o src\gen\StreamPeerTCP.o src\gen\StreamTexture.o src\gen\StyleBox.o src\gen\StyleBoxEmpty.o src\gen\StyleBoxFlat.o src\gen\StyleBoxLine.o src\gen\StyleBoxTexture.o src\gen\SurfaceTool.o src\gen\TabContainer.o src\gen\Tabs.o src\gen\TCP_Server.o src\gen\TextEdit.o src\gen\TextFile.o src\gen\Texture.o src\gen\Texture3D.o src\gen\TextureArray.o src\gen\TextureButton.o src\gen\TextureLayered.o src\gen\TextureProgress.o src\gen\TextureRect.o src\gen\Theme.o src\gen\Thread.o src\gen\TileMap.o src\gen\TileSet.o src\gen\Timer.o src\gen\ToolButton.o src\gen\TouchScreenButton.o src\gen\Translation.o src\gen\TranslationLoaderPO.o src\gen\TranslationServer.o src\gen\Tree.o src\gen\TreeItem.o src\gen\TriangleMesh.o src\gen\Tween.o src\gen\UndoRedo.o src\gen\UPNP.o src\gen\UPNPDevice.o src\gen\VBoxContainer.o src\gen\VehicleBody.o src\gen\VehicleWheel.o src\gen\VideoPlayer.o src\gen\VideoStream.o src\gen\VideoStreamGDNative.o src\gen\VideoStreamTheora.o src\gen\VideoStreamWebm.o src\gen\Viewport.o src\gen\ViewportContainer.o src\gen\ViewportTexture.o src\gen\VisibilityEnabler.o src\gen\VisibilityEnabler2D.o src\gen\VisibilityNotifier.o src\gen\VisibilityNotifier2D.o src\gen\VisualInstance.o src\gen\VisualScript.o src\gen\VisualScriptBasicTypeConstant.o src\gen\VisualScriptBuiltinFunc.o src\gen\VisualScriptClassConstant.o src\gen\VisualScriptComment.o src\gen\VisualScriptCondition.o src\gen\VisualScriptConstant.o src\gen\VisualScriptConstructor.o src\gen\VisualScriptCustomNode.o src\gen\VisualScriptDeconstruct.o src\gen\VisualScriptEditor.o src\gen\VisualScriptEmitSignal.o src\gen\VisualScriptEngineSingleton.o src\gen\VisualScriptExpression.o src\gen\VisualScriptFunction.o src\gen\VisualScriptFunctionCall.o src\gen\VisualScriptFunctionState.o src\gen\VisualScriptGlobalConstant.o src\gen\VisualScriptIndexGet.o src\gen\VisualScriptIndexSet.o src\gen\VisualScriptInputAction.o src\gen\VisualScriptIterator.o src\gen\VisualScriptLocalVar.o src\gen\VisualScriptLocalVarSet.o src\gen\VisualScriptMathConstant.o src\gen\VisualScriptNode.o src\gen\VisualScriptOperator.o src\gen\VisualScriptPreload.o src\gen\VisualScriptPropertyGet.o src\gen\VisualScriptPropertySet.o src\gen\VisualScriptResourcePath.o src\gen\VisualScriptReturn.o src\gen\VisualScriptSceneNode.o src\gen\VisualScriptSceneTree.o src\gen\VisualScriptSelect.o src\gen\VisualScriptSelf.o src\gen\VisualScriptSequence.o src\gen\VisualScriptSubCall.o src\gen\VisualScriptSwitch.o src\gen\VisualScriptTypeCast.o src\gen\VisualScriptVariableGet.o src\gen\VisualScriptVariableSet.o src\gen\VisualScriptWhile.o src\gen\VisualScriptYield.o src\gen\VisualScriptYieldSignal.o src\gen\VisualServer.o src\gen\VisualShader.o src\gen\VisualShaderNode.o src\gen\VisualShaderNodeBooleanConstant.o src\gen\VisualShaderNodeBooleanUniform.o src\gen\VisualShaderNodeColorConstant.o src\gen\VisualShaderNodeColorFunc.o src\gen\VisualShaderNodeColorOp.o src\gen\VisualShaderNodeColorUniform.o src\gen\VisualShaderNodeCubeMap.o src\gen\VisualShaderNodeCubeMapUniform.o src\gen\VisualShaderNodeDeterminant.o src\gen\VisualShaderNodeDotProduct.o src\gen\VisualShaderNodeExpression.o src\gen\VisualShaderNodeFaceForward.o src\gen\VisualShaderNodeFresnel.o src\gen\VisualShaderNodeGroupBase.o src\gen\VisualShaderNodeIf.o src\gen\VisualShaderNodeInput.o src\gen\VisualShaderNodeOuterProduct.o src\gen\VisualShaderNodeOutput.o src\gen\VisualShaderNodeScalarClamp.o src\gen\VisualShaderNodeScalarConstant.o src\gen\VisualShaderNodeScalarDerivativeFunc.o src\gen\VisualShaderNodeScalarFunc.o src\gen\VisualShaderNodeScalarInterp.o src\gen\VisualShaderNodeScalarOp.o src\gen\VisualShaderNodeScalarSmoothStep.o src\gen\VisualShaderNodeScalarUniform.o src\gen\VisualShaderNodeSwitch.o src\gen\VisualShaderNodeTexture.o src\gen\VisualShaderNodeTextureUniform.o src\gen\VisualShaderNodeTransformCompose.o src\gen\VisualShaderNodeTransformConstant.o src\gen\VisualShaderNodeTransformDecompose.o src\gen\VisualShaderNodeTransformFunc.o src\gen\VisualShaderNodeTransformMult.o src\gen\VisualShaderNodeTransformUniform.o src\gen\VisualShaderNodeTransformVecMult.o src\gen\VisualShaderNodeUniform.o src\gen\VisualShaderNodeVec3Constant.o src\gen\VisualShaderNodeVec3Uniform.o src\gen\VisualShaderNodeVectorClamp.o src\gen\VisualShaderNodeVectorCompose.o src\gen\VisualShaderNodeVectorDecompose.o src\gen\VisualShaderNodeVectorDerivativeFunc.o src\gen\VisualShaderNodeVectorDistance.o src\gen\VisualShaderNodeVectorFunc.o src\gen\VisualShaderNodeVectorInterp.o src\gen\VisualShaderNodeVectorLen.o src\gen\VisualShaderNodeVectorOp.o src\gen\VisualShaderNodeVectorRefract.o src\gen\VisualShaderNodeVectorScalarSmoothStep.o src\gen\VisualShaderNodeVectorScalarStep.o src\gen\VisualShaderNodeVectorSmoothStep.o src\gen\VScrollBar.o src\gen\VSeparator.o src\gen\VSlider.o src\gen\VSplitContainer.o src\gen\WeakRef.o src\gen\WebRTCDataChannel.o src\gen\WebRTCDataChannelGDNative.o src\gen\WebRTCMultiplayer.o src\gen\WebRTCPeerConnection.o src\gen\WebRTCPeerConnectionGDNative.o src\gen\WebSocketClient.o src\gen\WebSocketMultiplayerPeer.o src\gen\WebSocketPeer.o src\gen\WebSocketServer.o src\gen\WindowDialog.o src\gen\World.o src\gen\World2D.o src\gen\WorldEnvironment.o src\gen\XMLParser.o src\gen\YSort.o src\gen\__init_method_bindings.o src\gen\__register_types.o
scons: done building targets.
2shady4u commented 4 years ago

Just to get back to this: I am able to successfully build the necessary Android bindings on my Ubuntu VM without any issues.

This issue seems to be unique to Windows OS

Zylann commented 4 years ago

I can confirm /nologo (alone) is present in CCFLAGS on Windows 10 when the environment gets constructed, at https://github.com/GodotNativeTools/godot-cpp/blob/c2f765e49c7dd0c86729e6ba17f87c039203bce0/SConstruct#L148

This call does not specify a particular tool (The tools argument is None), so internally SCons defaults to tools = ['default']. In SCons/Tools/default.py, SCons then looks at the list of tools matching env["PLATFORM"], which is "win32", and this adds the mslink and msvc tools. Each of these tools then get called (__call__) with the environment as parameter, which makes them setup values in it (see SCons/Tools/msvc.py .generate()), and this is where it adds /nologo to CCFLAGS.

Clearly, this environment is not suited for compiling to Android, despite the presence of this in the android section:

elif env['platform'] == 'android':
    if host_platform == 'windows':
        env = env.Clone(tools=['mingw'])
        env["SPAWN"] = mySpawn
Zylann commented 3 years ago

I made a small change in https://github.com/godotengine/godot-cpp/pull/501 to fix MinGW builds on Windows. You can try it by copying the changes from the PR (at time of writing it is not merged yet to the repo). Let me know if that fixes things for you