Re: how to declare C's static function?

2016-03-27 Thread aki via Digitalmars-d-learn
On Monday, 28 March 2016 at 04:33:06 UTC, Rikki Cattermole wrote: You have two choices. Change the name in code (so manual mangling) or use pragma(mangle, ...) to change it instead. So... You mean there are no way to declare functions without exporting the symbol? There are so many instances

Re: how to declare C's static function?

2016-03-27 Thread Rikki Cattermole via Digitalmars-d-learn
On Monday, 28 March 2016 at 04:27:27 UTC, aki wrote: On Monday, 28 March 2016 at 04:12:56 UTC, Rikki Cattermole wrote: Do you need it to use extern(C)? Because if you don't, just drop that. D's mangling will fix it. Yes, I do need extern(C) for some reason like: alias Hook = extern(C) void

Re: how to declare C's static function?

2016-03-27 Thread aki via Digitalmars-d-learn
On Monday, 28 March 2016 at 04:12:56 UTC, Rikki Cattermole wrote: Do you need it to use extern(C)? Because if you don't, just drop that. D's mangling will fix it. Yes, I do need extern(C) for some reason like: alias Hook = extern(C) void function(); void sethook(Hook func) { ... } ...

Re: how to declare C's static function?

2016-03-27 Thread Rikki Cattermole via Digitalmars-d-learn
Do you need it to use extern(C)? Because if you don't, just drop that. D's mangling will fix it.

how to declare C's static function?

2016-03-27 Thread aki via Digitalmars-d-learn
Hello, When I porting legacy app. written in C to D, I have a problem. file a.d: extern (C) private void foo() {} file b.d: extern (C) private void foo() {} Error 1: Previous Definition Different : _foo In C language, "static void foo(){}" does not export the symbol out side the compilation

Re: Vibelog: dyaml compilation problems

2016-03-27 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 27 March 2016 at 09:57:40 UTC, Nicholas Wilson wrote: So I'm trying to run vibelog and have cloned the repo used $dub run. One dependency is dyaml. This doesn't compile, but looks like the latest commit to master fixes this. where in the dependency chain is this? Or in other words:

Re: Strange behavior in console with UTF-8

2016-03-27 Thread Jonathan Villa via Digitalmars-d-learn
On Saturday, 26 March 2016 at 16:34:34 UTC, Steven Schveighoffer wrote: On 3/25/16 6:47 PM, Jonathan Villa wrote: At this point, I think knowing exactly what input you are sending would be helpful. Can you attach a file which has the input that causes the error? Or just paste the input into

Re: Strange behavior in console with UTF-8

2016-03-27 Thread Jonathan Villa via Digitalmars-d-learn
On Saturday, 26 March 2016 at 16:34:34 UTC, Steven Schveighoffer wrote: On 3/25/16 6:47 PM, Jonathan Villa wrote: On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer wrote: [...] OK, the following inputs I've tested: á, é, í, ó, ú, ñ, à, è, ì, ò, ù. Just one input is enough to

Re: SDL Error: identifier expected following '.', not 'version'

2016-03-27 Thread Pedro Lopes via Digitalmars-d-learn
Thanks!

Re: SDL Error: identifier expected following '.', not 'version'

2016-03-27 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 27 March 2016 at 08:52:11 UTC, Mike Parker wrote: When using Derelict, BTW, I should caution that the Sys_WM stuff in Derelict may be buggy. If you run into any odd behavior, feel free to blame it on Derelict (as long as you report it!).

Re: SDL Error: identifier expected following '.', not 'version'

2016-03-27 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 27 March 2016 at 07:55:10 UTC, Pedro Lopes wrote: BTW, i'm following the SDL official documentation (written for C): https://wiki.libsdl.org/SDL_GetWindowWMInfo Derelict SDL is fine, I have compiled SDL code before. I Know that the word "version" is reserved for D, but how do I

SDL Error: identifier expected following '.', not 'version'

2016-03-27 Thread Pedro Lopes via Digitalmars-d-learn
Hello, whenever I try to compile this chunk of code: [code] SDL_SysWMinfo info; SDL_VERSION(); if(SDL_GetWindowWMInfo(win,)) { writeln(info.subsystem); } [/code] this error shows up: Error: identifier expected following '.', not 'version' BTW, i'm following the SDL official documentation

Re: Does something like std.algorithm.iteration:splitter with multiple seperators exist?

2016-03-27 Thread ParticlePeter via Digitalmars-d-learn
On Wednesday, 23 March 2016 at 20:00:55 UTC, wobbles wrote: Again, totally untested, but I think logically it should work. ( No D compiler on this machine so it mightn't even compile :] ) Thanks Wobbles, I took your approach. There were some minor issues, here is a working version: auto