lc icon indicating copy to clipboard operation
lc copied to clipboard

Fix windows build issues

Open hungptit opened this issue 4 years ago • 0 comments

I like your new command and thank you for creating it :). I have written something similar here, however, I have not added the support for Windows yet. I definitely can reuse some techniques you have done in lc and apply them to my fast-wc and fast-grep commands.

What is the problem?

I am unable to compile lc on Windows using VS 2019 because of the below error

cl : command line error D8021: invalid numeric argument '/Wextra' [D:\working\others\lc\lc.vcxproj]
Cannot build lc using the 'release' config.
At D:\working\others\lc\build_all.ps1:12 char:5
+     throw "Cannot build lc using the '${config}' config."
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot build lc...elease' config.:String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot build lc using the 'release' config.

After I fix the above error, I run into a series of errors related to the undefined/duplicated symbols, etc.

Solution

  • Use the CMake supported functionality to set the compiler information.
  • Use src as a submodule
  • Add an automated script for the Windows build. The executed command is ./build_all.ps1 (debug|release)

hungptit avatar Jul 12 '21 14:07 hungptit