Re: I can not understand this Error: undefined identifier `cpp_longlong`

2024-11-20 Thread Dakota via Digitalmars-d-learn
On Wednesday, 20 November 2024 at 07:02:25 UTC, Dakota wrote: I am sure it defined because I add static assert to confirm this `config.d`: and not sure how to work this around: ```sh #0 0x000103d4e8f7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/ldc/bin/ldc2+0x1038098f7) #1

I can not understand this Error: undefined identifier `cpp_longlong`

2024-11-19 Thread Dakota via Digitalmars-d-learn
```sh /ldc/import/core/stdc/stdint.d(96): Error: undefined identifier `cpp_longlong` /ldc/import/core/stdc/stdint.d(97): Error: undefined identifier `cpp_ulonglong` /ldc/import/core/stdc/stdint.d(118): Error: undefined identifier `cpp_ulong` ``` I am sure it defined because I add static

Re: importC Error: undefined identifier `__atomic_thread_fence`

2024-06-23 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, June 21, 2024 12:39:44 PM MDT mw via Digitalmars-d-learn wrote: > Looks like `__atomic_thread_fence` is a GCC built-in function, so > how to make importC recognize it? dmd cannot handle it. gcc or ldc might, but dmd generally needs standard C code. Stuff like gcc built-ins basically has

importC Error: undefined identifier `__atomic_thread_fence`

2024-06-21 Thread mw via Digitalmars-d-learn
Looks like `__atomic_thread_fence` is a GCC built-in function, so how to make importC recognize it? Thanks.

Re: importC error Error: undefined identifier `__builtin_unreachable`

2024-02-26 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 26/02/2024 10:34 PM, Dakota wrote: undefined identifier `__builtin_clz` Done. https://issues.dlang.org/show_bug.cgi?id=24414

Re: importC error Error: undefined identifier `__builtin_unreachable`

2024-02-26 Thread Dakota via Digitalmars-d-learn
On Monday, 26 February 2024 at 08:18:53 UTC, Richard (Rikki) Andrew Cattermole wrote: On 26/02/2024 9:04 PM, Dakota wrote: I try one more importC case, get this error: ```sh Error: undefined identifier `__builtin_unreachable` ``` any tips to fix this? Reported: https://issues.dlang.org

Re: importC error Error: undefined identifier `__builtin_unreachable`

2024-02-26 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 26/02/2024 9:04 PM, Dakota wrote: I try one more importC case, get this error: ```sh Error: undefined identifier `__builtin_unreachable` ``` any tips to fix this? Reported: https://issues.dlang.org/show_bug.cgi?id=24413

importC error Error: undefined identifier `__builtin_unreachable`

2024-02-26 Thread Dakota via Digitalmars-d-learn
I try one more importC case, get this error: ```sh Error: undefined identifier `__builtin_unreachable` ``` any tips to fix this?

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread Marcone via Digitalmars-d-learn
On Thursday, 28 April 2022 at 07:02:14 UTC, MGW wrote: Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru I sent you an email. Could you answer me and send me these dlls for W

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread Marcone via Digitalmars-d-learn
On Thursday, 28 April 2022 at 07:02:14 UTC, MGW wrote: Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru Hi, I didn't compile it as Qt is too big for me to download just to u

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread MGW via Digitalmars-d-learn
Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru

QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-26 Thread Marcone via Digitalmars-d-learn
I'm trying to load a .ui GUI designed in Qt Designer. I'm following the examples in the links below, but the following error occurs: Error: undefined identifier `QFormBuilder` QFormBuilder qfb = new QFormBuilder(this); setQtObj((qfb.load(":/fQtE56help.ui")).QtObj); * htt

Re: DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-17 Thread Marcone via Digitalmars-d-learn
Why gdi32.lib in dmc is not a Valid Library File?

Re: DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-16 Thread Marcone via Digitalmars-d-learn
On Sunday, 16 May 2021 at 15:43:51 UTC, Adam D. Ruppe wrote: On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote: Error: undefined identifier 'SetDCBrushColor' Did you include gdi32.lib on the command line? I got this error: C:\Users\Usuario\Arquivos\dm\lib\gdi32.lib Error

Re: DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-16 Thread Marcone via Digitalmars-d-learn
decided to test it. Creating a program with a win32api graphical interface I run into this error: Error: undefined identifier 'SetDCBrushColor' How to solve this problem? Thanks. if it's not one defined in one of the core.sys.windows module, export it yourself: ```d pragma(

Re: DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-16 Thread Jack via Digitalmars-d-learn
graphical interface I run into this error: Error: undefined identifier 'SetDCBrushColor' How to solve this problem? Thanks. if it's not one defined in one of the core.sys.windows module, export it yourself: ```d pragma(lib, "Gdi32.lib"); COLORREF SetDCBrushColor(

Re: DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-16 Thread Marcone via Digitalmars-d-learn
On Sunday, 16 May 2021 at 15:43:51 UTC, Adam D. Ruppe wrote: On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote: Error: undefined identifier 'SetDCBrushColor' Did you include gdi32.lib on the command line? Yes, I did it. But not work. I get this error: Error: undefined

Re: DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote: Error: undefined identifier 'SetDCBrushColor' Did you include gdi32.lib on the command line?

DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

2021-05-16 Thread Marcone via Digitalmars-d-learn
: undefined identifier 'SetDCBrushColor' How to solve this problem? Thanks.

Re: bindbc.sfml , sfVideoMode , Error: undefined identifier

2021-05-08 Thread Alain De Vos via Digitalmars-d-learn
After adding ``` "versions": [ "SFML_Audio", "SFML_Graphics", "SFML_250", ] ``` to dub.json it compiles. The sfml library the freebsd os is version : "sfml-2.5.1_2" .

Re: bindbc.sfml , sfVideoMode , Error: undefined identifier

2021-05-08 Thread Dennis via Digitalmars-d-learn
On Saturday, 8 May 2021 at 09:05:18 UTC, Alain De Vos wrote: I must doing something wrong ? Did you define the `SFML_Graphics` version like in the README of bindbc-sfml?

bindbc.sfml , sfVideoMode , Error: undefined identifier

2021-05-08 Thread Alain De Vos via Digitalmars-d-learn
I try this, ``` import bindbc.sfml; import bindbc.sfml.config; import bindbc.sfml.system; import bindbc.sfml.window; void main(){ bool ret=loadSFML(); sfVideoMode m=sfVideoMode(800, 600,24); } ``` But dub gives undefined identifier sdVideoMode. Although, https://bindbc

Re: Example uses "volatile"; compiler says "undefined identifier volatile"

2019-08-01 Thread Paul via Digitalmars-d-learn
Thank you. I'll try that.

Re: Example uses "volatile"; compiler says "undefined identifier volatile"

2019-07-31 Thread Timo Sintonen via Digitalmars-d-learn
On Thursday, 1 August 2019 at 03:04:27 UTC, Paul wrote: I'm trying to build a Bare Bones 'OS' via example. Example says to compile with "gdc -c kernel.main.d -o kernel.main.o -g" I'm having trouble getting GDC all set up..as I'm a rank amateur. So, I tried compiling the example below with DM

Example uses "volatile"; compiler says "undefined identifier volatile"

2019-07-31 Thread Paul via Digitalmars-d-learn
I'm trying to build a Bare Bones 'OS' via example. Example says to compile with "gdc -c kernel.main.d -o kernel.main.o -g" I'm having trouble getting GDC all set up..as I'm a rank amateur. So, I tried compiling the example below with DMD. DMD spits out exceptions to the use of 'volatile'. D

Re: undefined identifier 'size_t'

2016-05-03 Thread Joshua Hodkinson via Digitalmars-d-learn
On Wednesday, 4 May 2016 at 01:44:31 UTC, Adam D. Ruppe wrote: Is there a file called object.d in your current directory? Not anymore, Thanks for pointing that out

Re: undefined identifier 'size_t'

2016-05-03 Thread Adam D. Ruppe via Digitalmars-d-learn
Is there a file called object.d in your current directory?

undefined identifier 'size_t'

2016-05-03 Thread Joshua Hodkinson via Digitalmars-d-learn
-run hello.d -de -w -unittest Here is a sample program: import std.stdio; void main () { stdout.writeln("Hello World!"); } And the ouput: ..dmd2\windows\bin\..\..\src\druntime\import\core\stdc\time.d(111): Error: undefined identifier 'size_t' ..dmd2\windows\bin\..\..\

Re: Error: undefined identifier 'selector'

2015-12-15 Thread Mike McKee via Digitalmars-d-learn
I found the fix: $ sudo brew update $ sudo brew uninstall --force dmd $ sudo su $ cd /Library $ rm -rfd D $ exit $ sudo brew install dmd This not only takes one from an older dmd to a more current version (in my case, from 2.068 to 2.069), but it also fixes a bug where /Library/D doesn't get u

Re: Error: undefined identifier 'selector'

2015-12-14 Thread Meta via Digitalmars-d-learn
On Monday, 14 December 2015 at 23:34:28 UTC, tcak wrote: On Monday, 14 December 2015 at 20:46:41 UTC, Mike McKee wrote: When I run this piece of code: // FROM: https://dlang.org/spec/objc_interface.html module main; [...] UDA s cannot be used for functions/methods AFAIK. It doesn't give an

Re: Error: undefined identifier 'selector'

2015-12-14 Thread tcak via Digitalmars-d-learn
On Monday, 14 December 2015 at 20:46:41 UTC, Mike McKee wrote: When I run this piece of code: // FROM: https://dlang.org/spec/objc_interface.html module main; [...] UDA s cannot be used for functions/methods AFAIK.

Error: undefined identifier 'selector'

2015-12-14 Thread Mike McKee via Digitalmars-d-learn
ot;); NSLog(str); str.release(); } I get this error: $ dmd -L-framework -LFoundation test.d test.d(7): Error: undefined identifier 'selector' test.d(13): Error: undefined identifier 'selector' test.d(14): Error: undefined identifier 'selector' It just doesn't like that @selector statement. What's the catch?

Re: "Error: Undefined identifier" when moving import to another module

2014-10-20 Thread nrgyzer via Digitalmars-d-learn
On Monday, 20 October 2014 at 17:37:34 UTC, nrgyzer wrote: This solved the problem for the first time, BUT - I don't know if it's a bug or a feature - I ran into another problem. I'm having the following few lines: module example; private { string[string] myPrivateArray; } static this() {

Re: "Error: Undefined identifier" when moving import to another module

2014-10-20 Thread nrgyzer via Digitalmars-d-learn
This solved the problem for the first time, BUT - I don't know if it's a bug or a feature - I ran into another problem. I'm having the following few lines: module example; private { string[string] myPrivateArray; } static this() { foreach ( m; __traits(allMembers, example) ) {

Re: "Error: Undefined identifier" when moving import to another module

2014-10-20 Thread nrgyzer via Digitalmars-d-learn
myMain.d-mixin-11(11): Error: undefined identifier _D12TypeInfo_xAa6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D49TypeInfo_xAS3std8typecons16__T5TupleTkTkTkZ5Tuple6__initZ myMain.d-mixin-11(11): Error: undef

Re: "Error: Undefined identifier" when moving import to another module

2014-10-20 Thread nrgyzer via Digitalmars-d-learn
, BUT when I move the import of "my.static.library.binding" to the example-module: module example; import my.static.library.binding; void exmapleFunction() { // do something here } ... I'm getting many error messages like these: myMain.d-mixin-11(11): Error: undef

Re: "Error: Undefined identifier" when moving import to another module

2014-10-19 Thread Joakim via Digitalmars-d-learn
"my.static.library.binding" to the example-module: module example; import my.static.library.binding; void exmapleFunction() { // do something here } ... I'm getting many error messages like these: myMain.d-mixin-11(11): Error: undefined identifier _D12TypeInfo_xAa6__initZ myMain.d-mixin-11(11): E

Re: "Error: Undefined identifier" when moving import to another module

2014-10-19 Thread nrgyzer via Digitalmars-d-learn
On Sunday, 19 October 2014 at 17:14:14 UTC, monarch_dodra wrote: On Sunday, 19 October 2014 at 16:09:41 UTC, nrgyzer wrote: "mixing" should be replaced with "mixin": static if ( isCallable!(mixin(m) ) My main is empty in both cases. So nothing done in my main (currently). Posting full code

Re: "Error: Undefined identifier" when moving import to another module

2014-10-19 Thread monarch_dodra via Digitalmars-d-learn
On Sunday, 19 October 2014 at 16:09:41 UTC, nrgyzer wrote: "mixing" should be replaced with "mixin": static if ( isCallable!(mixin(m) ) My main is empty in both cases. So nothing done in my main (currently). Posting full code that actually compiles and reproduces the issue helps.

Re: "Error: Undefined identifier" when moving import to another module

2014-10-19 Thread nrgyzer via Digitalmars-d-learn
doing here? ... I'm getting many error messages like these: myMain.d-mixin-11(11): Error: undefined identifier _D12TypeInfo_xAa6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D49TypeInfo_xAS3std8typecons16__T5TupleTkTkTkZ5Tuple6__initZ myMain.d-mixin-11(11): Error: undefined iden

Re: "Error: Undefined identifier" when moving import to another module

2014-10-19 Thread monarch_dodra via Digitalmars-d-learn
Main.d-mixin-11(11): Error: undefined identifier _D12TypeInfo_xAa6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D49TypeInfo_xAS3std8typecons16__T5TupleTkTkTkZ5Tuple6__initZ myMain.d-mixin-11(11): Error: undefined identifier Sounds like your import was also import std.typecons wh

"Error: Undefined identifier" when moving import to another module

2014-10-19 Thread nrgyzer via Digitalmars-d-learn
e; import my.static.library.binding; void exmapleFunction() { // do something here } ... I'm getting many error messages like these: myMain.d-mixin-11(11): Error: undefined identifier _D12TypeInfo_xAa6__initZ myMain.d-mixin-11(11): Error: undef

Re: "Undefined identifier FILE" when building Druntime

2014-09-25 Thread ketmar via Digitalmars-d-learn
On Thu, 25 Sep 2014 19:13:58 + Meta via Digitalmars-d-learn wrote: > This happens with a freshly checked out master. I first build > DMD, which completes successfully. However, when I then try to > build Druntime, I got the following error messages: can't confirm. just updated everything an

"Undefined identifier FILE" when building Druntime

2014-09-25 Thread Meta via Digitalmars-d-learn
This happens with a freshly checked out master. I first build DMD, which completes successfully. However, when I then try to build Druntime, I got the following error messages: src\core\stdc\wchar_.d(32): Error: undefined identifier FILE src\core\stdc\wchar_.d(33): Error: undefined identifier

Re: Alias template param - Undefined Identifier

2014-03-21 Thread Chris Williams
On Wednesday, 19 March 2014 at 00:07:04 UTC, Chris Williams wrote: ...probably something along the lines of making all of my functions a static function in a struct, which I then pass into a template which processes UDAs to generate functions at the top

Re: Alias template param - Undefined Identifier

2014-03-18 Thread Chris Williams
On Tuesday, 18 March 2014 at 23:33:12 UTC, bearophile wrote: Chris Williams: But I also like to know how most-effectively to write a C-style macro in D, so it seemed worth checking what the state of the art is. This is an antipattern :-) Bye, bearophile As are goto, pointers, and conditio

Re: Alias template param - Undefined Identifier

2014-03-18 Thread bearophile
Chris Williams: But I also like to know how most-effectively to write a C-style macro in D, so it seemed worth checking what the state of the art is. This is an antipattern :-) Bye, bearophile

Re: Alias template param - Undefined Identifier

2014-03-18 Thread anonymous
On Tuesday, 18 March 2014 at 23:10:05 UTC, Chris Williams wrote: Annoying that formatting the string is required. I think you're right that it's ignoring my alias parameter because I'm not using it. Formatting doesn't accomplish anything except to use the parameter. But in exchange, you have to

Re: Alias template param - Undefined Identifier

2014-03-18 Thread Chris Williams
On Tuesday, 18 March 2014 at 23:05:51 UTC, bearophile wrote: Chris Williams: I could put a wrapper around the calls to these functions that performs this action, but I figured a little macro would be sufficient for my needs (it's just a little script.) I suggest to keep the code simpler. By

Re: Alias template param - Undefined Identifier

2014-03-18 Thread Chris Williams
On Tuesday, 18 March 2014 at 22:42:20 UTC, anonymous wrote: You can pass the variable name as a string: Or you can get the variable name from the alias parameter: import std.string: format; template gotoPath(alias path) { enum gotoPath = format(q{ ...

Re: Alias template param - Undefined Identifier

2014-03-18 Thread bearophile
Chris Williams: I could put a wrapper around the calls to these functions that performs this action, but I figured a little macro would be sufficient for my needs (it's just a little script.) I suggest to keep the code simpler. Bye, bearophile

Re: Alias template param - Undefined Identifier

2014-03-18 Thread anonymous
id main() { writefln("a %s", fs.getcwd()); doStuff("/etc"); writefln("c %s", fs.getcwd()); } When I try to compile (DMD 2.064), I get the following error: test.d(16): Error: undefined identifier path You can pass the variable name as a string: impo

Alias template param - Undefined Identifier

2014-03-18 Thread Chris Williams
oPath!(targetDirectory)); writefln("b %s", fs.getcwd()); } void main() { writefln("a %s", fs.getcwd()); doStuff("/etc"); writefln("c %s", fs.getcwd()); } When I try to compile (DMD 2.064), I get the following error: test.d(16): Error: undefined ide

Re: Undefined identifier error with enum in the separate module

2014-02-02 Thread bearophile
Philippe Sigaud: Well, I really thought it was forbidden (as in: the code will never work). I guess you can define foo inside module foo.d and use it internally... So OK for your proposal. You can use it externally too, if you qualify it correctly. Bye, bearophile

Re: Undefined identifier error with enum in the separate module

2014-02-02 Thread Philippe Sigaud
> This is the ER I have opened, if you have comments or you don't agree with > my ideas, please comment there: > https://d.puremagic.com/issues/show_bug.cgi?id=12059 Well, I really thought it was forbidden (as in: the code will never work). I guess you can define foo inside module foo.d and use it

Re: Undefined identifier error with enum in the separate module

2014-02-02 Thread bearophile
Philippe Sigaud: I'd prefer an error, with the same kind of nice message you get when you forget to import std.stdio. Ideally, the error should be caught as soon as the module is compiled, like shadowing errors (which it is, in a way). "module foo contains a member named foo. Module members

Re: Undefined identifier error with enum in the separate module

2014-02-02 Thread Philippe Sigaud
Bearophile: > I have seen other people hit this problem (like problems caused by having a > "set.d" module containing a "Set" struct plus a "set" helper function). > > Is this worth warning against (with a dmd warning/error)? I'd prefer an error, with the same kind of nice message you get when you

Re: Undefined identifier error with enum in the separate module

2014-02-01 Thread evilrat
unittest { auto e = CodeEnum.OK; // Works! } // Reply.d import CodeEnum; unittest { auto.e = CodeEnum.OK; // Error: undefined identifier 'OK' } What I am doing wrong? Thanks, Nemanja it is recommended to name module in lower case only. and in your particular cas

Re: Undefined identifier error with enum in the separate module

2014-02-01 Thread bearophile
Philippe Sigaud: In D, do not use the same symbol for a module and one of its inner symbols. I have seen other people hit this problem (like problems caused by having a "set.d" module containing a "Set" struct plus a "set" helper function). Is this worth warning against (with a dmd warning

Re: Undefined identifier error with enum in the separate module

2014-02-01 Thread Philippe Sigaud
> // Reply.d > import CodeEnum; > > unittest > { > auto.e = CodeEnum.OK; // Error: undefined identifier 'OK' > } > > > What I am doing wrong? The module and your enum have the same name. When the compiler sees the `CodeEnum` symbol, it considers you

Undefined identifier error with enum in the separate module

2014-02-01 Thread Nemanja Borić
t CodeEnum; unittest { auto.e = CodeEnum.OK; // Error: undefined identifier 'OK' } What I am doing wrong? Thanks, Nemanja

Re: undefined identifier doesn't make sense

2013-05-20 Thread evilrat
On Tuesday, 21 May 2013 at 04:17:26 UTC, Enjoys Math wrote: Should I put my static methods at module scope then? just don't give symbol(struct/class/function/variable) names same as module

Re: undefined identifier doesn't make sense

2013-05-20 Thread Enjoys Math
Should I put my static methods at module scope then?

Re: undefined identifier doesn't make sense

2013-05-20 Thread Enjoys Math
On Tuesday, 21 May 2013 at 03:15:46 UTC, Anthony Goins wrote: ?? ProjectFile.ProjectFile.loadLastProjectOrNew() ?? maybe. That did it!!! Lol crazy. :D Thx

Re: undefined identifier doesn't make sense

2013-05-20 Thread Anthony Goins
?? ProjectFile.ProjectFile.loadLastProjectOrNew() ?? maybe.

undefined identifier doesn't make sense

2013-05-20 Thread Enjoys Math
// create new ProjectFile using default constructor and return auto lastProjectDotTxt = new File("LastProject.txt"); return new ProjectFile; } } The error is: Building Debug\TheApp.exe... Gui.d(19): Error

Re: undefined identifier

2012-10-18 Thread Oleg
solved. its associated with access private for _data field. if I use alias compiler must replace call "a" (for my type) to "a._data" if it needs...

undefined identifier

2012-10-18 Thread Oleg
){ return _vects[1]; } @property void vel( vect b ){ _vects[1] = b; } //#2 } when compile I have error #1 Error: undefined identifier '_data' #2 Error: undefined identifier '_data' why code in mPoint want use identifier _data? unittests in vector.d use all of overriding operators well.

Re: undefined identifier getch()

2010-12-08 Thread Christopher Nicholson-Sauls
On 12/08/10 08:53, Stewart Gordon wrote: > On 08/12/2010 11:06, Nrgyzer wrote: >> Hey guys, >> >> I'm writing a console based tool for windows. To receive the users >> input, I >> try to use getch() but the compiler always says "Error: undefined >&

Re: undefined identifier getch()

2010-12-08 Thread Stewart Gordon
On 08/12/2010 13:25, Nrgyzer wrote: Okay, but what function can I use to get the pressed key? kbhit/_kbhit seems to do what I want, but hwo can I use it in D? I always get the error, that kbhit (or similar functions) are not available. kbhit just tests whether there's a keystroke waiting in th

Re: undefined identifier getch()

2010-12-08 Thread Stewart Gordon
On 08/12/2010 11:06, Nrgyzer wrote: Hey guys, I'm writing a console based tool for windows. To receive the users input, I try to use getch() but the compiler always says "Error: undefined identifier getch". When I use getchar() it compiles successfully, but getchar() doesn&#x

Re: undefined identifier getch()

2010-12-08 Thread Nrgyzer
Great, thanks :)

Re: undefined identifier getch()

2010-12-08 Thread Steven Schveighoffer
On Wed, 08 Dec 2010 08:57:40 -0500, Steven Schveighoffer wrote: extern(C) int kbhit(void); Um... sorry, D doesn't support void args (copy-paste problem): extern(C) int kbhit(); -Steve

Re: undefined identifier getch()

2010-12-08 Thread Steven Schveighoffer
On Wed, 08 Dec 2010 08:25:38 -0500, Nrgyzer wrote: Okay, but what function can I use to get the pressed key? kbhit/_kbhit seems to do what I want, but hwo can I use it in D? I always get the error, that kbhit (or similar functions) are not available. import std.stdio; import std.c.stdlib; impo

Re: undefined identifier getch()

2010-12-08 Thread Nrgyzer
Okay, but what function can I use to get the pressed key? kbhit/_kbhit seems to do what I want, but hwo can I use it in D? I always get the error, that kbhit (or similar functions) are not available. import std.stdio; import std.c.stdlib; import std.c.windows.windows; void main(string[] args) {

Re: undefined identifier getch()

2010-12-08 Thread Steven Schveighoffer
On Wed, 08 Dec 2010 06:06:18 -0500, Nrgyzer wrote: Hey guys, I'm writing a console based tool for windows. To receive the users input, I try to use getch() but the compiler always says "Error: undefined identifier getch". When I use getchar() it compiles successful

undefined identifier getch()

2010-12-08 Thread Nrgyzer
Hey guys, I'm writing a console based tool for windows. To receive the users input, I try to use getch() but the compiler always says "Error: undefined identifier getch". When I use getchar() it compiles successfully, but getchar() doesn't returns after a single input. Is

Re: undefined identifier with scope statement?

2010-06-14 Thread Trass3r
I'm going to guess that the given case is an accepts-invalid bug caused by scope getting re written as a try/finally with the writeln at the bottom of some scope containing res and the other cases put it outside the scope. File a bug and see what happens. http://d.puremagic.com/issues/show_

Re: undefined identifier with scope statement?

2010-06-13 Thread BCS
Hello Trass3r, import std.stdio; void main() { scope(exit) writeln(res); auto res = 0; } This compiles, but using failure or success in the scope guard statement gives "undefined identifier res". Is this intended? If yes, why? I'm going to guess that the given case is an acce

undefined identifier with scope statement?

2010-06-13 Thread Trass3r
import std.stdio; void main() { scope(exit) writeln(res); auto res = 0; } This compiles, but using failure or success in the scope guard statement gives "undefined identifier res". Is this intended? If yes, why?