Open maacl opened 1 year ago
Thanks for the bug report!
Is it possible that you are in the examples directory? If so, the problem is that one of the examples is called derive.carp
, shadowing the standard library file Derive.carp
. If you try to run it from the parent directory, for example, it should run.
NB: Ideally we could resolve this issue by making core files take precedence, but I suppose users couldn’t overwrite those then, making it a bit of a double-edged sword.
That is where I am. Works from the parent dir, but now I am getting the below:
carp examples\benchmark_mandelbrot.carp -x
Can't find symbol 'defdynamic-once' at C:/Users/marti/AppData/Roaming/carp/profile.carp:1:2.
profile.carp is:
(defdynamic-once sdl-windows-header-path "C:\\msys64\mingw64\include\SDL2\\")
(defdynamic-once sdl-windows-library-path "C:\\msys64\mingw64\bin\\")
Hello, sorry about the late answer!
Indeed, defdynamic-once
is defined after profile.carp
is loaded. defdynamic
should work.
Your profile file is indeed the first thing that is loaded, before any core libraries, so you can change things as early as possible. defdynamic-once
on the other hand is a macro defined in the core libraries.
Ah yes, thanks for the heads-up. I will clarify the comment to say that you should use defdynamic
instead to set them.
It looks to me like the clang-cl installation itself has some issues. Since we’ve migrated quite far from the original issue and are moving to a more chat-like communication style, could we move this conversation over to the Carp Gitter channel (https://Gitter.im/carp-lang/carp)?
Note: this is the first time that I’m responding to an issue from E-Mail, so if there are any typos or the like, I apologize.
On 31. Jan 2023, at 20:32, Martin Clausen ***@***.***> wrote:
Got one step further. Now I get the below:
PS C:\Users\marti\tmp\Carp> carp examples\benchmark_mandelbrot.carp -x
clang-cl: warning: unknown argument ignored in clang-cl: '-pipe' [-Wunknown-argument]
clang-cl: warning: unknown argument ignored in clang-cl: '-fomit-frame-pointer' [-Wunknown-argument]
clang-cl: warning: unknown argument ignored in clang-cl: '-mfpmath=sse' [-Wunknown-argument]
clang-cl: warning: unable to find a Visual Studio installation; try running Clang from a developer command prompt [-Wmsvc-not-found]
clang-cl: warning: argument unused during compilation: '-O3' [-Wunused-command-line-argument]
out\main.c(1,10): fatal error: 'assert.h' file not found
#include <assert.h>
^~~~~~~~~~
1 error generated.
carp.exe: callCommand: clang-cl.exe -o out\Untitled -I C:\Users\marti\tmp\Carp\/core/ -D_CRT_SECURE_NO_WARNINGS -pipe -O3 -fomit-frame-pointer -march=native -mfpmath=sse -msse3 out\main.c (exit 1): failed
PS C:\Users\marti\tmp\Carp>
Check, I am on gitter now.
CARP_DIR is set. I get a REPL when running
carp
.