www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Renaming DMD File Extensions from C to C++

reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
Can we please change the file extensions in DMD from .c to .cpp 
for C++ sources?
Feb 02 2015
next sibling parent reply "eles" <eles eles.com> writes:
On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to .cpp 
 for C++ sources?
http://forum.dlang.org/post/peivwaklprmaafalbjuw forum.dlang.org
Feb 02 2015
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/2/15 4:23 PM, eles wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to .cpp for
 C++ sources?
http://forum.dlang.org/post/peivwaklprmaafalbjuw forum.dlang.org
Better change them straight to .d! -- Andrei
Feb 02 2015
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Tuesday, 3 February 2015 at 00:59:26 UTC, Andrei Alexandrescu 
wrote:
 On 2/2/15 4:23 PM, eles wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for
 C++ sources?
http://forum.dlang.org/post/peivwaklprmaafalbjuw forum.dlang.org
Better change them straight to .d! -- Andrei
https://github.com/deadalnix/SDC/ Care to contribute ?
Feb 02 2015
next sibling parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Tue, Feb 03, 2015 at 01:33:31AM +0000, deadalnix via Digitalmars-d wrote:
 On Tuesday, 3 February 2015 at 00:59:26 UTC, Andrei Alexandrescu wrote:
On 2/2/15 4:23 PM, eles wrote:
On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
Can we please change the file extensions in DMD from .c to .cpp for
C++ sources?
http://forum.dlang.org/post/peivwaklprmaafalbjuw forum.dlang.org
Better change them straight to .d! -- Andrei
https://github.com/deadalnix/SDC/ Care to contribute ?
Did you fix the build problems yet? Or at least make them more robust? The last time I tried to build SDC, I had to manually hack a lot of things to work in my environment, and eventually I gave up. T -- Give me some fresh salted fish, please.
Feb 02 2015
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Tuesday, 3 February 2015 at 01:39:31 UTC, H. S. Teoh wrote:
 Did you fix the build problems yet? Or at least make them more 
 robust?
 The last time I tried to build SDC, I had to manually hack a 
 lot of
 things to work in my environment, and eventually I gave up.


 T
This is the only issue I have on the subject: https://github.com/deadalnix/SDC/issues/55 I can't fix what I don't know is broken.
Feb 02 2015
parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Tue, Feb 03, 2015 at 01:49:52AM +0000, deadalnix via Digitalmars-d wrote:
 On Tuesday, 3 February 2015 at 01:39:31 UTC, H. S. Teoh wrote:
Did you fix the build problems yet? Or at least make them more
robust?  The last time I tried to build SDC, I had to manually hack a
lot of things to work in my environment, and eventually I gave up.


T
This is the only issue I have on the subject: https://github.com/deadalnix/SDC/issues/55 I can't fix what I don't know is broken.
OK, I'll file bugs when I get around to trying SDC again. Right now I'm too busy with other things, sorry... T -- One reason that few people are aware there are programs running the internet is that they never crash in any significant way: the free software underlying the internet is reliable to the point of invisibility. -- Glyn Moody, from the article "Giving it all away"
Feb 02 2015
prev sibling next sibling parent reply "Atila Neves" <atila.neves gmail.com> writes:
On Tuesday, 3 February 2015 at 01:33:32 UTC, deadalnix wrote:
 On Tuesday, 3 February 2015 at 00:59:26 UTC, Andrei 
 Alexandrescu wrote:
 On 2/2/15 4:23 PM, eles wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for
 C++ sources?
http://forum.dlang.org/post/peivwaklprmaafalbjuw forum.dlang.org
Better change them straight to .d! -- Andrei
https://github.com/deadalnix/SDC/ Care to contribute ?
How would one go about starting to be a contributor? Atila
Feb 03 2015
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Tuesday, 3 February 2015 at 15:38:06 UTC, Atila Neves wrote:
 How would one go about starting to be a contributor?

 Atila
I'll start by getting the thing to build, figure out something that is not working and come to me so we can have a battle plan (or directly make a PR if this is simple) :)
Feb 03 2015
parent reply "Atila Neves" <atila.neves gmail.com> writes:
On Wednesday, 4 February 2015 at 02:41:11 UTC, deadalnix wrote:
 On Tuesday, 3 February 2015 at 15:38:06 UTC, Atila Neves wrote:
 How would one go about starting to be a contributor?

 Atila
I'll start by getting the thing to build, figure out something that is not working and come to me so we can have a battle plan (or directly make a PR if this is simple) :)
I guess the issue here is figuring out what does't work! :) Should I just try compiling code with sdc every now and again? I don't even know how much of the language works. The tests help a bit I guess. Atila
Feb 04 2015
parent "deadalnix" <deadalnix gmail.com> writes:
On Wednesday, 4 February 2015 at 09:51:27 UTC, Atila Neves wrote:
 I guess the issue here is figuring out what does't work! :) 
 Should I just try compiling code with sdc every now and again? 
 I don't even know how much of the language works. The tests 
 help a bit I guess.

 Atila
You should run into something not working fast enough, don't worry for that :) Looking at the test suite should give you a good idea of what works.
Feb 04 2015
prev sibling parent "Stefan Koch" <uplink.coder googlemail.com> writes:
On Tuesday, 3 February 2015 at 01:33:32 UTC, deadalnix wrote:
 On Tuesday, 3 February 2015 at 00:59:26 UTC, Andrei 
 Alexandrescu wrote:
 On 2/2/15 4:23 PM, eles wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for
 C++ sources?
http://forum.dlang.org/post/peivwaklprmaafalbjuw forum.dlang.org
Better change them straight to .d! -- Andrei
https://github.com/deadalnix/SDC/ Care to contribute ?
I think more people would contribute, if you were more open to contributers. Shooting everything down, does not help to build a contributer-base. Nor does hostility.
Feb 08 2015
prev sibling next sibling parent Jacob Carlborg <doob me.com> writes:
On 2015-02-02 22:51, "Nordlöw" wrote:
 Can we please change the file extensions in DMD from .c to .cpp for C++
 sources?
Just for the record, this is deprecated in Clang: clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated -- /Jacob Carlborg
Feb 03 2015
prev sibling next sibling parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to .cpp 
 for C++ sources?
If someone (maybe me) "is allowed" to change this I can complete my PR at https://github.com/D-Programming-Language/dmd/pull/4379 that enables developing DMD in Eclipse with full intellisense and debugging support.
Feb 04 2015
next sibling parent reply Daniel Kozak via Digitalmars-d <digitalmars-d puremagic.com> writes:
"Nordlöw" via Digitalmars-d píše v St 04. 02. 2015 v 10:25 +0000:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to .cpp 
 for C++ sources?
If someone (maybe me) "is allowed" to change this I can complete my PR at https://github.com/D-Programming-Language/dmd/pull/4379 that enables developing DMD in Eclipse with full intellisense and debugging support.
This is already possible without this change
Feb 04 2015
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 4 February 2015 at 12:08:18 UTC, Daniel Kozak wrote:
 "Nordlöw" via Digitalmars-d píše v St 04. 02. 2015 v 10:25 
 +0000:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for C++ sources?
If someone (maybe me) "is allowed" to change this I can complete my PR at https://github.com/D-Programming-Language/dmd/pull/4379 that enables developing DMD in Eclipse with full intellisense and debugging support.
This is already possible without this change
I've tried modifying "File Types" section in Properties for DMD project as: *.c - C++ Source File *.h - C++ Header File and src/*.c - C++ Source File src/*.h - C++ Header File but neith has any affect and Intellisense still fails. What do I have to do to make this work? Please help.
Feb 04 2015
parent reply "Daniel Kozak" <kozzi11 gmail.com> writes:
On Wednesday, 4 February 2015 at 20:32:35 UTC, Nordlöw wrote:
 On Wednesday, 4 February 2015 at 12:08:18 UTC, Daniel Kozak 
 wrote:
 "Nordlöw" via Digitalmars-d píše v St 04. 02. 2015 v 10:25 
 +0000:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for C++ sources?
If someone (maybe me) "is allowed" to change this I can complete my PR at https://github.com/D-Programming-Language/dmd/pull/4379 that enables developing DMD in Eclipse with full intellisense and debugging support.
This is already possible without this change
I've tried modifying "File Types" section in Properties for DMD project as: *.c - C++ Source File *.h - C++ Header File and src/*.c - C++ Source File src/*.h - C++ Header File but neith has any affect and Intellisense still fails. What do I have to do to make this work? Please help.
Project->Properties here select use project settings and setup *.c as c++ source files and *.h as c++ header files than Project->C/C++ Index-> Rebuild
Feb 04 2015
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 4 February 2015 at 20:48:33 UTC, Daniel Kozak wrote:
 What do I have to do to make this work? Please help.
Project->Properties here select use project settings and setup *.c as c++ source files and *.h as c++ header files than Project->C/C++ Index-> Rebuild
Thanks. So I shouldn't specify src/*.[ch] just *.[ch] then. BTW: I still can't the debugger to find source information. How and where do I the debug build configuration to call make with ENABLE_DEBUG=1 as argument?
Feb 04 2015
parent reply "Dicebot" <public dicebot.lv> writes:
On Wednesday, 4 February 2015 at 21:16:15 UTC, Nordlöw wrote:
 BTW: I still can't the debugger to find source information.
 How and where do I the debug build configuration to call make 
 with

 ENABLE_DEBUG=1

 as argument?
I tend to simply edit posix.mak and change CFLAGS there :)
Feb 04 2015
next sibling parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 4 February 2015 at 21:24:22 UTC, Dicebot wrote:
 On Wednesday, 4 February 2015 at 21:16:15 UTC, Nordlöw wrote:
 BTW: I still can't the debugger to find source information.
 How and where do I the debug build configuration to call make 
 with

 ENABLE_DEBUG=1

 as argument?
I tend to simply edit posix.mak and change CFLAGS there :)
I finally got everything to work in my latest commit at https://github.com/D-Programming-Language/dmd/pull/4379 I solved at Project Properties => C/C++ Build => Build command: make ENABLE_DEBUG=1 -j8 Try it out! Thanks once again, D folks.
Feb 04 2015
parent =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 4 February 2015 at 21:29:17 UTC, Nordlöw wrote:
 I solved at

 Project Properties =>
 C/C++ Build =>
 Build command: make ENABLE_DEBUG=1 -j8

 Try it out!

 Thanks once again, D folks.
Further, to make expression.c (14klines!) by analyzed Intellisense change the limit at Preferences => Editor => Scalability to 20000 lines :) Works fine for me on a three year old laptop.
Feb 04 2015
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 2/4/2015 1:24 PM, Dicebot wrote:
 On Wednesday, 4 February 2015 at 21:16:15 UTC, Nordlöw wrote:
 BTW: I still can't the debugger to find source information.
 How and where do I the debug build configuration to call make with

 ENABLE_DEBUG=1

 as argument?
I tend to simply edit posix.mak and change CFLAGS there :)
A technique I use is to create a 'makefile' and use it to drive 'posix.mak'. That way I can tweak the settings without editing posix.mak. ---- TK=tk ROOT=root C=ztc MODEL=64 MAKE=make MODEL=$(MODEL) TK=$(TK) ROOT=$(ROOT) C=$C RELEASE=1 -f posix.mak targets : $(MAKE) all -j 4 dmd : $(MAKE) dmd -j 4 dmd64 : $(MAKE) MODEL=64 dmd -j 4 profile : $(MAKE) MODEL=64 dmd -j 4 PROFILE=-pg gcov : $(MAKE) gcov zip : $(MAKE) zip clean : $(MAKE) clean
Feb 04 2015
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2015-02-04 11:25, "Nordlöw" wrote:

 that enables developing DMD in Eclipse with full intellisense and
 debugging support.
Is that not possible to override? I've done that in the Xcode projects, works fine. -- /Jacob Carlborg
Feb 04 2015
parent "Daniel Kozak" <kozzi11 gmail.com> writes:
On Wednesday, 4 February 2015 at 13:47:02 UTC, Jacob Carlborg 
wrote:
 On 2015-02-04 11:25, "Nordlöw" wrote:

 that enables developing DMD in Eclipse with full intellisense 
 and
 debugging support.
Is that not possible to override? I've done that in the Xcode projects, works fine.
Of course it is possible in eclipse too :)
Feb 04 2015
prev sibling parent reply "deadalnix" <deadalnix gmail.com> writes:
On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to .cpp 
 for C++ sources?
If I make a PR to make these file cpp, what are the chances for it to be accepted ? git is capable of tracking renaming, so it should create any conflict.
Feb 04 2015
next sibling parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 4 February 2015 at 21:45:02 UTC, deadalnix wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for C++ sources?
If I make a PR to make these file cpp, what are the chances for it to be accepted ? git is capable of tracking renaming, so it should create any conflict.
I managed to get things working in my latest commit in PR I mentioned above so its not critical for Eclipse integration to work.
Feb 04 2015
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Wednesday, 4 February 2015 at 22:09:04 UTC, Nordlöw wrote:
 On Wednesday, 4 February 2015 at 21:45:02 UTC, deadalnix wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for C++ sources?
If I make a PR to make these file cpp, what are the chances for it to be accepted ? git is capable of tracking renaming, so it should create any conflict.
I managed to get things working in my latest commit in PR I mentioned above so its not critical for Eclipse integration to work.
I still think this is something that needs fixing. The cost used to be prohibitive, but now we migrated to git, the cost is very low, and that improve the situation for contributors. Doing it.
Feb 04 2015
parent "deadalnix" <deadalnix gmail.com> writes:
On Wednesday, 4 February 2015 at 22:41:29 UTC, deadalnix wrote:
 On Wednesday, 4 February 2015 at 22:09:04 UTC, Nordlöw wrote:
 On Wednesday, 4 February 2015 at 21:45:02 UTC, deadalnix wrote:
 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for C++ sources?
If I make a PR to make these file cpp, what are the chances for it to be accepted ? git is capable of tracking renaming, so it should create any conflict.
I managed to get things working in my latest commit in PR I mentioned above so its not critical for Eclipse integration to work.
I still think this is something that needs fixing. The cost used to be prohibitive, but now we migrated to git, the cost is very low, and that improve the situation for contributors. Doing it.
https://github.com/D-Programming-Language/dmd/pull/4382
Feb 04 2015
prev sibling parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Wed, 04 Feb 2015 21:45:01 +0000, deadalnix wrote:

 On Monday, 2 February 2015 at 21:51:42 UTC, Nordl=C3=B6w wrote:
 Can we please change the file extensions in DMD from .c to .cpp for C++
 sources?
=20 If I make a PR to make these file cpp, what are the chances for it to be accepted ? git is capable of tracking renaming, so it should create any conflict.
it's "moving things for the sake of moving things". i hope that "don't=20 move things for nothing" is the universal rule. i hate fixing all my=20 scripts and links.=
Feb 05 2015
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Thursday, 5 February 2015 at 09:03:40 UTC, ketmar wrote:
 On Wed, 04 Feb 2015 21:45:01 +0000, deadalnix wrote:

 On Monday, 2 February 2015 at 21:51:42 UTC, Nordlöw wrote:
 Can we please change the file extensions in DMD from .c to 
 .cpp for C++
 sources?
If I make a PR to make these file cpp, what are the chances for it to be accepted ? git is capable of tracking renaming, so it should create any conflict.
it's "moving things for the sake of moving things". i hope that "don't move things for nothing" is the universal rule. i hate fixing all my scripts and links.
Well you are talking for talking, we are waiting on your awesome PRs.
Feb 06 2015
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Fri, 06 Feb 2015 18:48:16 +0000, deadalnix wrote:

 Well you are talking for talking, we are waiting on your awesome PRs.
easy deal. and i'm waiting for Andrei and Walter preapprovement. i'm not=20 interested in writing code for nothing. ah, and forbidding patch=20 attachements to bugzilla. i'm still waiting for my $25 bounty, code for=20 which keeps rotting there.=
Feb 06 2015
parent reply "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Saturday, 7 February 2015 at 06:23:43 UTC, ketmar wrote:
 On Fri, 06 Feb 2015 18:48:16 +0000, deadalnix wrote:

 Well you are talking for talking, we are waiting on your 
 awesome PRs.
easy deal. and i'm waiting for Andrei and Walter preapprovement. i'm not interested in writing code for nothing. ah, and forbidding patch attachements to bugzilla. i'm still waiting for my $25 bounty, code for which keeps rotting there.
Ketmar as a kid: https://www.youtube.com/watch?v=iayLBI7nsE0
Feb 07 2015
parent ketmar <ketmar ketmar.no-ip.org> writes:
On Sat, 07 Feb 2015 13:02:58 +0000, Craig Dillabaugh wrote:

 On Saturday, 7 February 2015 at 06:23:43 UTC, ketmar wrote:
 On Fri, 06 Feb 2015 18:48:16 +0000, deadalnix wrote:

 Well you are talking for talking, we are waiting on your awesome PRs.
easy deal. and i'm waiting for Andrei and Walter preapprovement. i'm not interested in writing code for nothing. ah, and forbidding patch attachements to bugzilla. i'm still waiting for my $25 bounty, code for which keeps rotting there.
=20 Ketmar as a kid: https://www.youtube.com/watch?v=3DiayLBI7nsE0
yes! you've got nowhere to hide!=
Feb 08 2015