Re: gcc -E -dD; dstep; sqlite3

2022-12-18 Thread j via Digitalmars-d-learn
On Thursday, 8 December 2022 at 16:55:34 UTC, johannes wrote: /we-/we/sqlite3/package.d(121): Error: semicolon expected following auto declaration, not `32` /we-/we/sqlite3/package.d(121): Error: declaration expected, not `32` /we-/we/sqlite3/package.d(122): Error: semicolon expected following

Re: gcc -E -dD; dstep; sqlite3

2022-12-14 Thread Siarhei Siamashka via Digitalmars-d-learn
On Thursday, 8 December 2022 at 14:28:02 UTC, johannes wrote: doing the following : (sqlite3 version 340) gcc -E -dD sqlite3ext.h > sqlite3ext.i dstep sqlit3ext.i -o/we/sqlite3/package.d when compiling a program using this interface (import we.sqlite3), I receive Errors l

Re: gcc -E -dD; dstep; sqlite3

2022-12-08 Thread Ali Çehreli via Digitalmars-d-learn
On 12/8/22 06:28, johannes wrote: > enum __FLT128_MAX__ = 1.18973149535723176508575932662800702e+4932F128; That literal is not legal D. The "F128" characters at the end are extra. Besides, D does not have a 128-bit floating point type. Ali (Sorry for double e-mail.)

Re: gcc -E -dD; dstep; sqlite3

2022-12-08 Thread johannes via Digitalmars-d-learn
/we-/we/sqlite3/package.d(121): Error: semicolon expected following auto declaration, not `32` /we-/we/sqlite3/package.d(121): Error: declaration expected, not `32` /we-/we/sqlite3/package.d(122): Error: semicolon expected following auto declaration, not `32` /we-/we/sqlite3/package.d(122): Erro

gcc -E -dD; dstep; sqlite3

2022-12-08 Thread johannes via Digitalmars-d-learn
doing the following : (sqlite3 version 340) gcc -E -dD sqlite3ext.h > sqlite3ext.i dstep sqlit3ext.i -o/we/sqlite3/package.d when compiling a program using this interface (import we.sqlite3), I receive Errors like : enum __FLT128_MAX__ = 1.18973149535723176508575932662800702e+4932F

Re: __init unresolved external when using C library structs converted with dstep

2020-04-17 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-04-17 09:06:44 +, Dominikus Dittes Scherkl said: On Friday, 17 April 2020 at 08:59:41 UTC, Robert M. Münch wrote: How would that look like? myStruct ms = void; // ??? Exactly. Cool... never saw this / thought about it... will remember it, hopefully. -- Robert M. Münch http://w

Re: __init unresolved external when using C library structs converted with dstep

2020-04-17 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Friday, 17 April 2020 at 08:59:41 UTC, Robert M. Münch wrote: How would that look like? myStruct ms = void; // ??? Exactly.

Re: __init unresolved external when using C library structs converted with dstep

2020-04-17 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-04-16 18:33:51 +, Basile B. said: On Tuesday, 14 April 2020 at 17:51:58 UTC, Robert M. Münch wrote: I use a C libary and created D imports with dstep. It translates the C structs to D structs. When I now use them, everything compiles fine but I get an unresolved external error

Re: __init unresolved external when using C library structs converted with dstep

2020-04-16 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 14 April 2020 at 17:51:58 UTC, Robert M. Münch wrote: I use a C libary and created D imports with dstep. It translates the C structs to D structs. When I now use them, everything compiles fine but I get an unresolved external error: WindowsApp1.obj : error LNK2019: unresolved

Re: __init unresolved external when using C library structs converted with dstep

2020-04-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/16/20 5:20 AM, Robert M. Münch wrote: On 2020-04-15 15:18:43 +, Steven Schveighoffer said: The difference is you are telling the compiler that it should generate any symbols for those types. If you just import them, then it's expecting something else to build those symbols. Maybe

Re: __init unresolved external when using C library structs converted with dstep

2020-04-16 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-04-15 15:18:43 +, Steven Schveighoffer said: The difference is you are telling the compiler that it should generate any symbols for those types. If you just import them, then it's expecting something else to build those symbols. Maybe I'm a bit confused, but that's quite different

Re: __init unresolved external when using C library structs converted with dstep

2020-04-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/15/20 8:38 AM, Robert M. Münch wrote: On 2020-04-14 18:44:55 +, Steven Schveighoffer said: On 4/14/20 2:29 PM, Robert M. Münch wrote: No. Is that the missing part? Probably. I think the compiler expects whatever is compiling the imported file to provide the symbol. If you aren't co

Re: __init unresolved external when using C library structs converted with dstep

2020-04-15 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-04-14 18:44:55 +, Steven Schveighoffer said: On 4/14/20 2:29 PM, Robert M. Münch wrote: Ah, ok. That's why the problem went (temporarly) away when I did a: myCstruct a = {0,0}; for example? I don't know what causes it to be emitted when. Sometimes it doesn't make a whole lot of

Re: __init unresolved external when using C library structs converted with dstep

2020-04-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/14/20 2:29 PM, Robert M. Münch wrote: On 2020-04-14 18:23:05 +, Steven Schveighoffer said: On 4/14/20 1:51 PM, Robert M. Münch wrote: I use a C libary and created D imports with dstep. It translates the C structs to D structs. When I now use them, everything compiles fine but I get

Re: __init unresolved external when using C library structs converted with dstep

2020-04-14 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-04-14 18:23:05 +, Steven Schveighoffer said: On 4/14/20 1:51 PM, Robert M. Münch wrote: I use a C libary and created D imports with dstep. It translates the C structs to D structs. When I now use them, everything compiles fine but I get an unresolved external error

Re: __init unresolved external when using C library structs converted with dstep

2020-04-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/14/20 1:51 PM, Robert M. Münch wrote: I use a C libary and created D imports with dstep. It translates the C structs to D structs. When I now use them, everything compiles fine but I get an unresolved external error: WindowsApp1.obj : error LNK2019: unresolved external symbol

__init unresolved external when using C library structs converted with dstep

2020-04-14 Thread Robert M. Münch via Digitalmars-d-learn
I use a C libary and created D imports with dstep. It translates the C structs to D structs. When I now use them, everything compiles fine but I get an unresolved external error: WindowsApp1.obj : error LNK2019: unresolved external symbol "myCstruct.__init" (_D7myCStruct6__initZ)

Re: OSX DStep / Standard Includes

2019-04-27 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-04-27 09:40:46 +, Jacob Carlborg said: I created an enhancement request for this. Hopefully it's possible to fix without having the user installing the SDK in /usr/include. https://github.com/jacob-carlborg/dstep/issues/227 Thanks! Your tip worked and yes, OSX out of th

Re: OSX DStep / Standard Includes

2019-04-27 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-04-26 17:14, Robert M. Münch wrote: I'm trying the new DStep version but have some problems with standard include files: => dstep --output ./d -v -I/opt/local/libexec/llvm-5.0/include/c++/v1 myinclude.h clang version 5.0.2 (tags/RELEASE_502/final) Target: x86_64-apple-darw

Re: OSX DStep / Standard Includes

2019-04-27 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-04-26 23:16, Jacob Carlborg wrote: You need to install the Xcode command line tools, by running "xcode-select --install". This will create the "/usr/include" directory. I'm guessing this is because DStep is linked against the open source version of Clang an

Re: OSX DStep / Standard Includes

2019-04-26 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-04-26 17:14, Robert M. Münch wrote: I'm trying the new DStep version but have some problems with standard include files: => dstep --output ./d -v -I/opt/local/libexec/llvm-5.0/include/c++/v1 myinclude.h clang version 5.0.2 (tags/RELEASE_502/final) Target: x86_64-apple-darw

OSX DStep / Standard Includes

2019-04-26 Thread Robert M. Münch via Digitalmars-d-learn
I'm trying the new DStep version but have some problems with standard include files: => dstep --output ./d -v -I/opt/local/libexec/llvm-5.0/include/c++/v1 myinclude.h clang version 5.0.2 (tags/RELEASE_502/final) Target: x86_64-apple-darwin18.5.0 Thread model: posix InstalledDir:

Re: DStep rocks [was Example of using C API from D?]

2018-09-03 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2018-09-03 at 12:45 +, Andrea Fontana via Digitalmars-d- learn wrote: > […] > > I use dpp to generate d code to import: > - Create a temp.dpp file with #include inside > - Run "d++ --preprocess-only temp.dpp" > > Now you have your .d file exactly like i

Re: DStep rocks [was Example of using C API from D?]

2018-09-03 Thread Andrea Fontana via Digitalmars-d-learn
On Monday, 3 September 2018 at 10:50:17 UTC, Russel Winder wrote: Interesting alternative to DStep. I came to D to avoid #include, but… I'll give it a whirl once I can get it compiled on Debian Sid. It seems the libclang-dev package does not install a libclang.so symbolic link, you have

Re: DStep rocks [was Example of using C API from D?]

2018-09-03 Thread Russel Winder via Digitalmars-d-learn
ehaviour at build time. > > Example here: > > https://run.dlang.io/?compiler=dmd&source=%23include%20%0Avoid%20main()%20%7B%0A%20%20%20%20printf("Hello%20dpp.");%0A%7D > > https://github.com/atilaneves/dpp Interesting alternative to DStep. I came to D to avoid #in

Re: DStep rocks [was Example of using C API from D?]

2018-09-02 Thread Laeeth Isharc via Digitalmars-d-learn
On Sunday, 2 September 2018 at 17:49:45 UTC, Russel Winder wrote: On Sun, 2018-09-02 at 18:28 +0100, Russel Winder wrote: […] It turns out that the GIR file is not usable, and so the girtod route is not feasible. I shall try the DStep route. Failing that it seems there is https

Re: DStep rocks [was Example of using C API from D?]

2018-09-02 Thread Russel Winder via Digitalmars-d-learn
On Sun, 2018-09-02 at 18:28 +0100, Russel Winder wrote: > […] > It turns out that the GIR file is not usable, and so the girtod route > is not feasible. I shall try the DStep route. Failing that it seems > there is > > https://github.com/WebFreak001/fontconfig-d > > whi

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-22 Thread Jacob Carlborg via Digitalmars-d-learn
On Thursday, 22 March 2018 at 09:55:44 UTC, Russel Winder wrote: I am guessing you mean against DStep rather than D :-) Yes :) Though clearly T and I would prefer version not to be a D keyword. I suspect I have seen one place where DStep has turned version into version_ where version was

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-22 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 21 March 2018 at 19:41:39 UTC, H. S. Teoh wrote: version(all) { ... } version(none) { ... } version(Posix) { ... } version(Windows) { ... } But yeah, using "version" for this purpose makes the very common identifier "version" unavailable for use. I

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-22 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2018-03-21 at 22:18 +0100, Jacob Carlborg via Digitalmars-d-learn wrote: > On 2018-03-21 20:30, Russel Winder wrote: > > > Thanks to Adam and Ali, it was clear and obvious. > > Please report and issue so it's not forgotten. I am guessing you mean against DStep ra

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-03-21 20:30, Russel Winder wrote: Thanks to Adam and Ali, it was clear and obvious. Please report and issue so it's not forgotten. -- /Jacob Carlborg

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-21 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Mar 21, 2018 at 07:30:28PM +, Russel Winder via Digitalmars-d-learn wrote: [...] > But :-( > > Why does version have to be a keyword? [...] version(all) { ... } version(none) { ... } version(Posix) { ... } version(Windows) { ... } But yeah, using "ver

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-21 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2018-03-21 at 18:11 +, Adam D. Ruppe via Digitalmars-d- learn wrote: > On Wednesday, 21 March 2018 at 18:00:38 UTC, Russel Winder wrote: > > ubyte, "version", 5, > > > version is a D keyword, so I would suggest trying "version_" > there instead and see if it works. (I'm guess

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-21 Thread Ali Çehreli via Digitalmars-d-learn
On 03/21/2018 11:00 AM, Russel Winder wrote: > The code I am playing with generated by DStep involves lots of lots of > structs with mixin bitfields. All of them seem to compile file, except > one. How is it that: > > mixin(bitfields!( > ubyte, "current_nex

Re: OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 21 March 2018 at 18:00:38 UTC, Russel Winder wrote: ubyte, "version", 5, version is a D keyword, so I would suggest trying "version_" there instead and see if it works. (I'm guessing btw, the error message was way to long and illegible, but this is an easy first guess

OK, I'm stumped on this one: dstep, struct, mixin, bitfields

2018-03-21 Thread Russel Winder via Digitalmars-d-learn
The code I am playing with generated by DStep involves lots of lots of structs with mixin bitfields. All of them seem to compile file, except one. How is it that: mixin(bitfields!( ubyte, "current_next", 1, ubyte, "version", 5, ubyte, "one

Re: dstep problem: "fatal error: 'limits.h' file not found"

2015-11-26 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-26 10:55, Joseph Rushton Wakeling wrote: OK, I'll do that this evening once I've had an opportunity to check the workaround etc. Thanks! Of course, a pull request is even more welcome. Should be very simple to fix. -- /Jacob Carlborg

Re: dstep problem: "fatal error: 'limits.h' file not found"

2015-11-26 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
https://github.com/jacob-carlborg/dstep#libclang OK, I'll do that this evening once I've had an opportunity to check the workaround etc. Thanks!

Re: dstep problem: "fatal error: 'limits.h' file not found"

2015-11-25 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-25 20:52, Joseph Rushton Wakeling wrote: I've just built and installed dstep (on Ubuntu 15.10, using libclang-3.7) but whenever I try to run it on a header file, I run into the error message: File(8AC8E0, "")/usr/include/limits.h:123:16: fatal error: 'limits.

dstep problem: "fatal error: 'limits.h' file not found"

2015-11-25 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
I've just built and installed dstep (on Ubuntu 15.10, using libclang-3.7) but whenever I try to run it on a header file, I run into the error message: File(8AC8E0, "")/usr/include/limits.h:123:16: fatal error: 'limits.h' file not found I suspect this is a libclang

Re: Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 5:17 PM, Dicebot via Digitalmars-d-learn wrote: > confirmed and commmented in that issue Thank you! That makes me feel better, but I guess Jacob has a valid bug on his hands. It will be interesting to see the fix. Best regards, -Tom

Re: Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Dicebot via Digitalmars-d-learn
confirmed and commmented in that issue

Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
I built dstep from this repo on a Debian Linux 64-bit system (after building and installing the dmd suite from its repos). But I'm having problems using it. Given a file t.h with sole contents: extern const char *const sys_errlist[]; I run dstep on it and get a core dump: $ dstep -x c -

Re: DStep

2013-11-24 Thread Jacob Carlborg
On 2013-11-24 16:02, Craig Dillabaugh wrote: So the following command works (at least on my system): dstep -I/usr/lib64/clang/3.2/include shapefil.h Thanks for your help. Great to hear. -- /Jacob Carlborg

Re: DStep

2013-11-24 Thread Craig Dillabaugh
On Sunday, 24 November 2013 at 14:04:32 UTC, Jacob Carlborg wrote: On 2013-11-24 14:58, Craig Dillabaugh wrote: I have clang installed on my machine. Is there anyway to point dstep to the right headers when I invoke it? Yes, use the -I flag. In addition to the listed flags, DStep accept

Re: DStep

2013-11-24 Thread Craig Dillabaugh
On Sunday, 24 November 2013 at 13:01:15 UTC, Gary Willoughby wrote: On Friday, 22 November 2013 at 14:35:45 UTC, Craig Dillabaugh wrote: I am trying to use DStep on OpenSuse 12.3. I downloaded one of the binaries (it was for Debian, so I guess that is my problem), and when I run DStep I get

Re: DStep

2013-11-24 Thread Jacob Carlborg
On 2013-11-24 14:01, Gary Willoughby wrote: I ran into the same issue and the documentation does cover it, but why on earth should a binary require a header file? It needs the header files when compiling C code. Up until after phase of creating the AST I assume the process would be exactly th

Re: DStep

2013-11-24 Thread Jacob Carlborg
On 2013-11-24 14:58, Craig Dillabaugh wrote: I have clang installed on my machine. Is there anyway to point dstep to the right headers when I invoke it? Yes, use the -I flag. In addition to the listed flags, DStep accept all flags Clang accepts. I already got Tango working - that was

Re: DStep

2013-11-24 Thread Craig Dillabaugh
Clang. stddef.h and stdarg.h are somewhat special headers, they're builtin includes and you need to get them from Clang. I have clang installed on my machine. Is there anyway to point dstep to the right headers when I invoke it? Is this issue supposed to be fixed with new versions of

Re: DStep

2013-11-24 Thread Jacob Carlborg
On 2013-11-24 06:37, Craig Dillabaugh wrote: Thanks. That is how I started out trying to fix it (Well, I used symlinks rather than copy the files, but basically the same). I got it to stop complaining about stddef.h and stdarg.h, but at the third header (can't recall something obscure though)

Re: DStep

2013-11-24 Thread Gary Willoughby
On Friday, 22 November 2013 at 14:35:45 UTC, Craig Dillabaugh wrote: I am trying to use DStep on OpenSuse 12.3. I downloaded one of the binaries (it was for Debian, so I guess that is my problem), and when I run DStep I get the following error: craigkris@linux-s9qf:~/code/DShape/D> ds

Re: DStep

2013-11-23 Thread Craig Dillabaugh
On Saturday, 23 November 2013 at 20:16:32 UTC, Jacob Carlborg wrote: On 2013-11-22 15:35, Craig Dillabaugh wrote: I am trying to use DStep on OpenSuse 12.3. I downloaded one of the binaries (it was for Debian, so I guess that is my problem), and when I run DStep I get the following error

Re: DStep

2013-11-23 Thread Jacob Carlborg
On 2013-11-22 15:35, Craig Dillabaugh wrote: I am trying to use DStep on OpenSuse 12.3. I downloaded one of the binaries (it was for Debian, so I guess that is my problem), and when I run DStep I get the following error: craigkris@linux-s9qf:~/code/DShape/D> dstep shapefil.h File(850

DStep

2013-11-22 Thread Craig Dillabaugh
I am trying to use DStep on OpenSuse 12.3. I downloaded one of the binaries (it was for Debian, so I guess that is my problem), and when I run DStep I get the following error: craigkris@linux-s9qf:~/code/DShape/D> dstep shapefil.h File(850DF8, "")/usr/include/stdio.h:33:11

Re: dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast(char[])field is not constant or does not evaluate to a bool

2012-01-24 Thread Jacob Carlborg
On 2012-01-24 09:43, Robert Lumley wrote: hi all :) i'm new to D and i'm trying to get step to compile on the Mac. below is the template that gives the error: dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast(char[])field is not constant or does not evaluat

Re: dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast(char[])field is not constant or does not evaluate to a bool

2012-01-24 Thread Jacob Carlborg
On 2012-01-24 13:26, Jacob Carlborg wrote: On 2012-01-24 09:43, Robert Lumley wrote: hi all :) i'm new to D and i'm trying to get step to compile on the Mac. below is the template that gives the error: dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast

dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast(char[])field is not constant or does not evaluate to a bool

2012-01-24 Thread Robert Lumley
hi all :) i'm new to D and i'm trying to get step to compile on the Mac. below is the template that gives the error: dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast(char[])field is not constant or does not evaluate to a bool private template has