Brett
July 7, 2021, 2:58am
1
Thought I'd have a look at the newest ren-c, but I tried and failed to build on VS 2019. Wondering if builds with Visual Studio 2019 should be working or if that's on hold for now?
If it's on hold until a request, don't spend a lot of time trying to get it working for just me as my immediate interest and priority now is in end user business tools and integration for myself and my wife rather than language work per se. I.e web api's and vb.net because I need whip up things in languages I'm familiar with to get things done with little time.
What I did:
Copied r3-windows-x86-8994d23.exe to ./prebuilt
Installed VS C++ tools (clicked the box that looked right).
Run a command file with the following:
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
set R3_MAKE=C:\Projects\ren-c\prebuilt\r3-windows-x86-8994d23.exe
"%R3_MAKE%" ../make.r config: ../configs/vs2019-x64.r debug: asserts optimize: 2
What I got was:
...
Dynamic extensions
** Script Error: generate has no value
** Where: switch for-each do catch either else _ do
** Near: [rebmake visual-studio ~~ generate (x86)]
** File: ../make.r
** Line: 871
Then I changed the line in make for the vs2019 target from:
rebmake/visual-studio/generate/(x86) output-dir solution
to:
rebmake/makefile/generate/(x86) output-dir solution
and got a different error, so then I thought I'd ask here, since I'm clueless about compiling with C, C++.
Thank you.
Good to see you! Hope you can stick around a bit to fiddle with things...
There is no longer a production of a Visual Studio XML project file. Instead it produces an "nmake" form makefile.
I'd been doing target: nmake
and then the build steps are:
nmake prep
nmake folders
nmake
But I should have made that the default for the Visual studio configs. Now I have done so, so you won't need the target: nmake
:
Change visual studio build targets to NMAKE · metaeducation/ren-c@58c745c · GitHub
Brett
July 7, 2021, 11:55pm
3
Thanks!
So I brought in that change and ran the nmake commands as above, but I now get a bunch of syntax errors:
C:\Projects\ren-c\build>nmake
Microsoft (R) Program Maintenance Utility Version 14.28.29913.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl.exe /nologo /c /IC:\Projects\ren-c\src\include\ /Iprep\include\ /Iprep\core /DREB_API /DOS_STACK_GROWS_DOWN /DENDIAN_LITTLE /DUNICODE /D_FILE_OFFSET_BITS=64 /DWIN32 /D__LLP64__ /D_CRT_SECURE_NO_WARNINGS /DTO_WINDOWS /DTO_WINDOWS_X64 /O2 /wd4244 /wd4267 /wd4255 /wd4917 /wd4768 /wd4091 /wd4574 /wd4577 /wd4946 /Foobjs\a-constants.obj C:\Projects\ren-c\src\core\a-constants.c
a-constants.c
cl.exe /nologo /c /IC:\Projects\ren-c\src\include\ /Iprep\include\ /Iprep\core /DREB_API /DOS_STACK_GROWS_DOWN /DENDIAN_LITTLE /DUNICODE /D_FILE_OFFSET_BITS=64 /DWIN32 /D__LLP64__ /D_CRT_SECURE_NO_WARNINGS /DTO_WINDOWS /DTO_WINDOWS_X64 /O2 /wd4244 /wd4267 /wd4255 /wd4917 /wd4768 /wd4091 /wd4574 /wd4577 /wd4946 /Foobjs\a-globals.obj C:\Projects\ren-c\src\core\a-globals.c
a-globals.c
prep\include\tmp-internals.h(296): error C2059: syntax error: 'return'
prep\include\tmp-internals.h(300): error C2059: syntax error: '}'
prep\include\tmp-internals.h(321): error C2143: syntax error: missing '{' before '*'
prep\include\tmp-internals.h(336): error C2059: syntax error: 'return'
prep\include\tmp-internals.h(337): error C2059: syntax error: '}'
...
prep\include\tmp-internals.h(473): error C2059: syntax error: '}'
prep\include\tmp-internals.h(541): error C2059: syntax error: '<parameter-list>'
prep\include\tmp-internals.h(6064): fatal error C1004: unexpected end-of-file found
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\cl.exe"' : return code '0x2'
Stop.
That's strange. If you can send me the tmp-internals.h I can look at it.
But offhand, I'm wondering if your git setting has "auto crlf"...so you have carriage returns and line feeds in your source? The older Ren-C doing prep wouldn't be noisy about an error for that, but it might cause problems these days.
git, msysgit
Brett
July 8, 2021, 7:29am
5
Thanks, that seems to be it. Based on what you said I issued this command in the sourcetree terminal:
git config --global core.autocrlf false
Deleted the repo from my local machine and cloned it down again.
Redid my steps as shown above and now I have a new r3.exe
As an aside, I wonder if my autocrlf setting the best location or should it be part of the repo .gitattributes file.
Thanks!