Re: ImportC issue?

2023-04-19 Thread DLearner via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 11:50:28 UTC, bachmeier wrote: [...] Did you use the switch `-m32omf`? https://dlang.org/spec/importc.html#auto-cpp No so following the references I tried every preprocessor option I could find: ``` C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c -m32omf

Re: ImportC issue?

2023-04-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 20/04/2023 12:07 AM, DLearner wrote: Error: C preprocess command sppn.exe failed for file ex01.c, exit status 1 Did you verify that sppn is accessible in that shell? As in run it, can it be found? If not its just a PATH variable issue.

Re: serve-d and emacs

2023-04-19 Thread Per Nordlöw via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 10:35:31 UTC, Per Nordlöw wrote: I believe this should work ```elisp (defun serve-d-command () "Shell command to start serve-d." '("dub" "run" "--vquiet" "serve-d")) (when (require 'lsp nil t) (dolist (mode '(d-mode d-ts-mode)) (add-hook mode #'lsp)

Re: serve-d and emacs

2023-04-19 Thread Per Nordlöw via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 10:35:31 UTC, Per Nordlöw wrote: On Wednesday, 19 April 2023 at 09:39:19 UTC, Per Nordlöw wrote: On Wednesday, 19 April 2023 at 09:37:56 UTC, Per Nordlöw wrote: . Has anybody gotten these things to work? I'm gonna try `lsp-mode` instead of `eglot`. I believe

Re: serve-d and emacs

2023-04-19 Thread Per Nordlöw via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 09:37:56 UTC, Per Nordlöw wrote: . Has anybody gotten these things to work? I'm gonna try `lsp-mode` instead of `eglot`.

Re: serve-d and emacs

2023-04-19 Thread Per Nordlöw via Digitalmars-d-learn
On Wednesday, 28 April 2021 at 23:04:27 UTC, Christian Köstlin wrote: if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo. Its a little tricky, because the basic setup works e.g. with emacs 27.2 or newer, but not with 27.1. All that is needed (if

ImportC issue?

2023-04-19 Thread DLearner via Digitalmars-d-learn
C source ex01.c: ``` #include int main() { printf("hello world\n"); return 0; } ``` 'dmc ex01.c' produces message: ``` link ex01,,,user32+kernel32/noi; ``` but does generate .obj, .map and .exe files, and the exe executes properly. However, trying to use ImportC via 'dmd ex01.c' produces

Re: serve-d and emacs

2023-04-19 Thread Per Nordlöw via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 09:39:19 UTC, Per Nordlöw wrote: On Wednesday, 19 April 2023 at 09:37:56 UTC, Per Nordlöw wrote: . Has anybody gotten these things to work? I'm gonna try `lsp-mode` instead of `eglot`. I believe this should work ```elisp (defun serve-d-command () "Shell

Re: ImportC issue?

2023-04-19 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 10:21:22 UTC, DLearner wrote: C source ex01.c: ``` #include int main() { printf("hello world\n"); return 0; } ``` 'dmc ex01.c' produces message: ``` link ex01,,,user32+kernel32/noi; ``` but does generate .obj, .map and .exe files, and the exe executes

Re: ImportC issue?

2023-04-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Yeah cl is the MSVC compiler being used for preprocessing. So for whatever reason its not using dmc, hence the error.

Re: ImportC issue?

2023-04-19 Thread DLearner via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 12:09:44 UTC, Richard (Rikki) Andrew Cattermole wrote: On 20/04/2023 12:07 AM, DLearner wrote: Error: C preprocess command sppn.exe failed for file ex01.c, exit status 1 Did you verify that sppn is accessible in that shell? As in run it, can it be found? If

Re: ImportC issue?

2023-04-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 20/04/2023 1:11 AM, DLearner wrote: If SPPN.exe essential to a component of DMD, was it not downloaded with it (and PATH modified to point to it), by the installer? It is not an essential component of dmd. It is one option in the usage of an experimental feature inside of dmd that is not

Re: ImportC issue?

2023-04-19 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 13:11:45 UTC, DLearner wrote: On Wednesday, 19 April 2023 at 12:09:44 UTC, Richard (Rikki) Andrew Cattermole wrote: On 20/04/2023 12:07 AM, DLearner wrote: Error: C preprocess command sppn.exe failed for file ex01.c, exit status 1 Did you verify that sppn is

Re: ImportC issue?

2023-04-19 Thread DLearner via Digitalmars-d-learn
On Wednesday, 19 April 2023 at 14:42:44 UTC, bachmeier wrote: [...] My understanding (from my occasional use of Windows) is that DMD installs the Community Edition of Visual Studio. That should solve your original issue, and you shouldn't need to mess with sppn.exe. Well it took a little