digitalmars.D.learn - extern(C++) in win32.mak
- Paul D Anderson (15/15) Feb 06 2018 I don't understand the following line in dmd/src/win32.mak:
- rikki cattermole (3/10) Feb 06 2018 https://dlang.org/spec/expression.html#import_expressions
- Paul D Anderson (6/16) Feb 07 2018 Thank you. I did not know that.
- Seb (5/20) Feb 07 2018 I recommend cloning DMD directly from git if you want to compile
- Paul D Anderson (14/24) Feb 07 2018 I downloaded from git but still get an error, though it's no
- Jacob Carlborg (4/6) Feb 07 2018 I don't think this file is built anymore.
- Seb (9/16) Feb 07 2018 It's a leftover of the lexer experiment and AFAICT still built:
I don't understand the following line in dmd/src/win32.mak: extern (C++) __gshared const(char)* ddoc_default = import ("default_ddoc_theme.ddoc"); What does the word "import" mean in this context? I can't find any documentation on the use of import in this way, and the line fails to compile during the make. The error message is: file "default_ddoc_theme.ddoc" cannot be found or not in a path specified with -J The file is in the directory dmd2/src/res, which is specified with -J../res in the build. Is there anyone who knows the ins and outs of the makefile that can shed some light? Thanks, Paul
Feb 06 2018
On 07/02/2018 6:05 AM, Paul D Anderson wrote:I don't understand the following line in dmd/src/win32.mak: extern (C++) __gshared const(char)* ddoc_default = import ("default_ddoc_theme.ddoc");That is a string import (-J).What does the word "import" mean in this context? I can't find any documentation on the use of import in this way, and the line fails to compile during the make.https://dlang.org/spec/expression.html#import_expressions
Feb 06 2018
On Wednesday, 7 February 2018 at 06:18:04 UTC, rikki cattermole wrote:On 07/02/2018 6:05 AM, Paul D Anderson wrote:Thank you. I did not know that. The error was caused by an over-zealous virus checker preventing some dmc executables from downloading. PaulI don't understand the following line in dmd/src/win32.mak: extern (C++) __gshared const(char)* ddoc_default = import ("default_ddoc_theme.ddoc");That is a string import (-J).What does the word "import" mean in this context? I can't find any documentation on the use of import in this way, and the line fails to compile during the make.https://dlang.org/spec/expression.html#import_expressions
Feb 07 2018
On Wednesday, 7 February 2018 at 06:05:54 UTC, Paul D Anderson wrote:I don't understand the following line in dmd/src/win32.mak: extern (C++) __gshared const(char)* ddoc_default = import ("default_ddoc_theme.ddoc"); What does the word "import" mean in this context? I can't find any documentation on the use of import in this way, and the line fails to compile during the make. The error message is: file "default_ddoc_theme.ddoc" cannot be found or not in a path specified with -J The file is in the directory dmd2/src/res, which is specified with -J../res in the build. Is there anyone who knows the ins and outs of the makefile that can shed some light? Thanks, PaulI recommend cloning DMD directly from git if you want to compile from source. There are many CIs in place that ensure that it always works.
Feb 07 2018
On Wednesday, 7 February 2018 at 08:28:23 UTC, Seb wrote:On Wednesday, 7 February 2018 at 06:05:54 UTC, Paul D Anderson wrote:I downloaded from git but still get an error, though it's no longer the ddoc file error. At this line (316-7), $G\lexer.lib: $(LEXER_SRCS) $(ROOT_SRCS) $(STRING_IMPORT_FILES) $G $(HOST_DC) -of$ -vtls -lib -J$G $(DFLAGS) $(LEXER_SRCS) $(ROOT_SRCS) I get Error: 'of..\generated\windows\release\32\lexer.lib' not found It looks to me as if at ' -of$ ', the '-of' flag is supposed to specify the output file, but is being interpreted as part of the filename. Does anyone know what the problem is? PaulIs there anyone who knows the ins and outs of the makefile that can shed some light? Thanks, PaulI recommend cloning DMD directly from git if you want to compile from source. There are many CIs in place that ensure that it always works.
Feb 07 2018
On 2018-02-07 14:47, Paul D Anderson wrote:I get Error: 'of..\generated\windows\release\32\lexer.lib' not foundI don't think this file is built anymore. -- /Jacob Carlborg
Feb 07 2018
On Wednesday, 7 February 2018 at 14:38:37 UTC, Jacob Carlborg wrote:On 2018-02-07 14:47, Paul D Anderson wrote:It's a leftover of the lexer experiment and AFAICT still built: https://github.com/dlang/dmd/blob/master/src/win32.mak#L317 https://github.com/dlang/dmd/blob/master/src/win32.mak#L336I get Error: 'of..\generated\windows\release\32\lexer.lib' not foundI don't think this file is built anymore.It looks to me as if at ' -of$ ', the '-of' flag is supposed to specify the output file, but is being interpreted as part of the filename.Yeah looks like it. What HOST_DC do you use (i.e. what DMD version)? As mentioned, this file is built by various CIs, so it's pretty interesting to see that it doesn't work for you.
Feb 07 2018