cwensley / pablodraw

PabloDraw is an Ansi/Ascii text and RIPscrip vector graphic art editor/viewer with multi-user capabilities.
MIT License
315 stars 21 forks source link

clang++ required to build under linux #44

Closed Sembiance closed 2 years ago

Sembiance commented 2 years ago

In linux, I wasn't able to run dotnet build Source/Pablodraw/PabloDraw.csproj due to the error: g++ : error : unrecognized command-line option ‘-MJ/var/tmp/portage/media-gfx/pablodraw-3.2.1_p20211219/work/pablodraw-main/artifacts/obj/Linux/PabloDraw.Console/x64/Debug/compile_commands.json’ [/var/tmp/portage/media-gfx/pablodraw-3.2.1_p20211219/work/pablodraw-main/Source/PabloDraw.Console/PabloDraw.Console.cxproj]

Seems the -MJ arg is only a clang thing. Simply changing the following from g++ to clang++ fixes it and allows it to build:

diff -Naur a/build/GCC.targets b/build/GCC.targets
--- a/build/GCC.targets 2021-12-19 19:30:34.000000000 -0500
+++ b/build/GCC.targets 2022-02-13 08:32:13.053658222 -0500
@@ -36,7 +36,7 @@
   </Target>

   <Target Name="BuildProject" DependsOnTargets="BuildResponseFiles">
-    <Exec Command="g++ @&quot;$(CompileOptionsRsp)&quot; @&quot;$(SourceFilesRsp)&quot;" WorkingDirectory="$(NativeObjDir)" StandardOutputImportance="normal" ConsoleToMsBuild="true" />
+    <Exec Command="clang++ @&quot;$(CompileOptionsRsp)&quot; @&quot;$(SourceFilesRsp)&quot;" WorkingDirectory="$(NativeObjDir)" StandardOutputImportance="normal" ConsoleToMsBuild="true" />

   </Target>
cwensley commented 2 years ago

This is no longer an issue as the command line has been rolled into the main PabloDraw executable on Linux and Mac. There is still a separate PabloDraw.Console.exe for windows, for silly windows reasons.