Re: D with CygWin

2016-12-06 Thread unDEFER via Digitalmars-d
So it was not finish :-( mkdir("C:\\cygwin\\home\\undefer\\TEST") is working mkdir("/home/undefer/TEST") creates directory and hangs, doesn't pass control to the next instruction. DirEntry("/") works in my simple program, but doesn't work in big program.. windbg, gdb doen't help at all. It

Re: D with CygWin

2016-12-04 Thread unDEFER via Digitalmars-d
DONE!!! === $ cat try.d import std.stdio; import std.string; import cygwin.std.file; import cygwin.loader; void main() { CygwinInit(); foreach (string name; dirEntries("/", SpanMode.shallow)) { writefln(name); }

Re: D with CygWin

2016-12-04 Thread unDEFER via Digitalmars-d
I have found. I have to use cygwin_dll_init == $ cat try.d import std.stdio; import std.string; import core.sys.windows.windows; extern(C) { alias int function(const (char)*, int, ...) open_t; alias void function() init_t; alias void functi

Re: D with CygWin

2016-12-03 Thread unDEFER via Digitalmars-d
So, just another attempt.. = import std.stdio; import std.string; import core.sys.windows.winbase; extern(C) { alias int function(in char*, int, ...) open_t; open_t _my_open; extern uint errno; } void main() { writefln("Open Li

Re: D with CygWin

2016-11-23 Thread unDEFER via Digitalmars-d
On Tuesday, 22 November 2016 at 15:00:44 UTC, Adam D. Ruppe wrote: On Monday, 21 November 2016 at 06:38:00 UTC, unDEFER wrote: 1) recompile all dmd libraries including snn.lib with replacing open->_open, close->_close, remove->_remove. What if you just wrote wrapper functions or better yet, li

Re: D with CygWin

2016-11-22 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 21 November 2016 at 06:38:00 UTC, unDEFER wrote: 1) recompile all dmd libraries including snn.lib with replacing open->_open, close->_close, remove->_remove. What if you just wrote wrapper functions or better yet, linker aliases?

Re: D with CygWin

2016-11-20 Thread unDEFER via Digitalmars-d
On Monday, 21 November 2016 at 04:06:31 UTC, rikki cattermole wrote: No, snn.lib is the exact thing that you don't need. I need to resolve conflict between snn.lib and cygwin1.dll. And I can see only 2 methods: 1) recompile all dmd libraries including snn.lib with replacing open->_open, close-

Re: D with CygWin

2016-11-20 Thread rikki cattermole via Digitalmars-d
On 21/11/2016 4:47 AM, unDEFER wrote: On Sunday, 20 November 2016 at 14:39:24 UTC, Mike Parker wrote: Not impossible. It's just going to require some backend work. It's not something you can make happen from the command line. Possible of course.. But looks like it needed at least snn.lib sour

Re: D with CygWin

2016-11-20 Thread unDEFER via Digitalmars-d
On Sunday, 20 November 2016 at 14:39:24 UTC, Mike Parker wrote: Not impossible. It's just going to require some backend work. It's not something you can make happen from the command line. Possible of course.. But looks like it needed at least snn.lib sources and maybe something more.

Re: D with CygWin

2016-11-20 Thread Mike Parker via Digitalmars-d
On Sunday, 20 November 2016 at 11:55:49 UTC, rikki cattermole wrote: So work with cygwin under D is impossible.. Not impossible. It's just going to require some backend work. It's not something you can make happen from the command line.

Re: D with CygWin

2016-11-20 Thread rikki cattermole via Digitalmars-d
On 21/11/2016 12:46 AM, unDEFER wrote: On Friday, 18 November 2016 at 17:33:41 UTC, unDEFER wrote: Wow, Thank you! I have bought. I'm waiting instructions for download. Google is a stranger to fear: it have sent to spam the message from Walter Bright himself! Walter prompt to me LIB.EXE utilit

Re: D with CygWin

2016-11-20 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 17:33:41 UTC, unDEFER wrote: Wow, Thank you! I have bought. I'm waiting instructions for download. Google is a stranger to fear: it have sent to spam the message from Walter Bright himself! Walter prompt to me LIB.EXE utility, and I have removed from snn.lib "io

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 16:53:02 UTC, Adam D. Ruppe wrote: On Friday, 18 November 2016 at 16:40:14 UTC, unDEFER wrote: Where snn.lib sources??? http://digitalmars.com/shop.html It is considered part of the proprietary compiler source. You can't build it yourself without buying a licen

Re: D with CygWin

2016-11-18 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 18 November 2016 at 16:40:14 UTC, unDEFER wrote: Where snn.lib sources??? http://digitalmars.com/shop.html It is considered part of the proprietary compiler source. You can't build it yourself without buying a license.

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
So, I know now, that dmd, druntime and phobos are three different repositories... I have compiled druntime, phobos, but never found snn.lib. Where snn.lib sources???

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
So, I seems need to rebuild dmd, exactly snn.lib without open/remove/close. Now I have the next error: $ make -fwin32.mak cd src make -f win32.mak auto-tester-build make -fwin32.mak C=backend TK=tk ROOT=root MAKE="make" HO

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
So.. I have changed my cygwin/core/sys/posix/config.d enum _FILE_OFFSET_BITS = 64; to enum _FILE_OFFSET_BITS = 32; and now I have only these 3 problems: === $ dmd `find . -iname "*.d"` C:\\cygwin\\bin\\Cygwin1.lib OPTLINK (R) for Win32 Release 8.00.17 Copyrig

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 10:43:09 UTC, unDEFER wrote: Error 1: Previous Definition Different : _close Error 1: Previous Definition Different : _remove Also there is these 2 problem. How to make linker to choose functions from cygwin.dll and ignore other definitions?

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 10:54:52 UTC, Stefan Koch wrote: You have to link with the cygwin.dll to get the symbols. That is not not done by default I presume. Look attentive, I have done on the last message, cygwin1.lib, which I have created with implib. But 64-bit functions was not foun

Re: D with CygWin

2016-11-18 Thread Stefan Koch via Digitalmars-d
On Friday, 18 November 2016 at 10:43:09 UTC, unDEFER wrote: [...] You have to link with the cygwin.dll to get the symbols. That is not not done by default I presume.

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
Look again, now there is only 5 not defined symbols: $ dmd `find . -iname "*.d"` C:\\cygwin\\bin\\Cygwin1.lib OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html C:\D\dmd2\window

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 10:04:28 UTC, Daniel Kozak wrote: No it does not require it. Your error seems like you do not links against your cygwin stdio, where do you place your cygwin.std.* files? Did you rename module std.whatever to module cygwin.std.whatever ? Oh, you are right, it is

Re: D with CygWin

2016-11-18 Thread rikki cattermole via Digitalmars-d
On 18/11/2016 10:53 PM, unDEFER wrote: On Friday, 18 November 2016 at 09:40:25 UTC, rikki cattermole wrote: Perhaps you should treat it as a port to a new platform. So start with getting druntime going (which means recompiling it). No, no recompile. The idea is very simple: 1. The cygwin provi

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 09:33:58 UTC, unDEFER wrote: === $ dmd try.d OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html try.obj(try) Error 42: Symbol Undefined _D6cygwin

Re: D with CygWin

2016-11-18 Thread Daniel Kozak via Digitalmars-d
Dne 18.11.2016 v 10:53 unDEFER via Digitalmars-d napsal(a): On Friday, 18 November 2016 at 09:40:25 UTC, rikki cattermole wrote: Perhaps you should treat it as a port to a new platform. So start with getting druntime going (which means recompiling it). No, no recompile. The idea is very simpl

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
On Friday, 18 November 2016 at 09:40:25 UTC, rikki cattermole wrote: Perhaps you should treat it as a port to a new platform. So start with getting druntime going (which means recompiling it). No, no recompile. The idea is very simple: 1. The cygwin provides libraries 2. I can rewrite dirEntri

Re: D with CygWin

2016-11-18 Thread rikki cattermole via Digitalmars-d
On 18/11/2016 10:33 PM, unDEFER wrote: Hello, again! I'm long have thought and have decided to try to do the next thing: I'm trying to list "/" of cygwin environment with the next code: === import std.stdio; import cygwin.std.file; void main() { foreach (stri

Re: D with CygWin

2016-11-18 Thread unDEFER via Digitalmars-d
Hello, again! I'm long have thought and have decided to try to do the next thing: I'm trying to list "/" of cygwin environment with the next code: === import std.stdio; import cygwin.std.file; void main() { foreach (string name; dirEntries("/", SpanMode.shal

Re: D with CygWin

2016-11-14 Thread unDEFER via Digitalmars-d
On Monday, 14 November 2016 at 12:36:53 UTC, Chris wrote: It is. I'd recommend MinGW, though. Else you will have to ship the cygwin.dll. However, you can compile your D app directly on windows with dmd/dub, depending on the app. What kinda application is it? I still think how to better port m

Re: D with CygWin

2016-11-14 Thread Chris via Digitalmars-d
On Monday, 14 November 2016 at 12:24:17 UTC, unDEFER wrote: Hello! I want to port my D application to Windows using CygWin. Is it possible? How? It is. I'd recommend MinGW, though. Else you will have to ship the cygwin.dll. However, you can compile your D app directly on windows with dmd/dub

D with CygWin

2016-11-14 Thread unDEFER via Digitalmars-d
Hello! I want to port my D application to Windows using CygWin. Is it possible? How?