Author Topic: D language support  (Read 6808 times)

StefanLi

  • Guest
D language support
« on: April 24, 2006, 12:52:27 pm »
With the build from 23-04-2006 there is already "some" D support.
However, as both a newbie to D and C::B I didn´t got to compile, link and run.
I have everything installed what is neccessary to compile and link. For my application I used Derek Parnels "build" tool available on http://dsource.org/.
My main source of confusion is the "Settings"-Dialog with all those paths for C and C++. Can anyone give me an advice?

Stefan


Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: D language support
« Reply #1 on: April 24, 2006, 01:06:29 pm »
Hello,

Just a fast suggestion. Try to search in the forum. There should be some useful posts.

Best wishes,
Michael

StefanLi

  • Guest
Re: D language support
« Reply #2 on: April 24, 2006, 01:15:12 pm »
Thanks for that suggestion. But this is what I always do before I post something.
Unfortunatelly, I did not find a post that helped me.

Stefan

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: D language support
« Reply #3 on: April 24, 2006, 01:21:04 pm »
Thanks for that suggestion. But this is what I always do before I post something.
Unfortunatelly, I did not find a post that helped me.

Ok.

It could be useful to post which C::B revision are you using and the errors you get. I am not a D expert and never used Derek Parnels tools (anyway, when I click the link I get "FATAL: connection limit exceeded for non-superusers"), but may be a user with more experience could then help you.

Best wishes,
Michael

StefanLi

  • Guest
Re: D language support
« Reply #4 on: April 24, 2006, 02:39:16 pm »
Michael, I was using C::B build from 23-04-2006. I just mentioned Derek´s build tool to show that my D environment is complete. Unfortunatelly, dsource.org is not always available. So, if you are interested you have to retry at different times of the day.

However, I "reinstalled" C::B, setup a D project with the D wizzard, tweaked the compiler paths with caution and than it worked!!!
My next attempt was to create a project for my existing D app. and this fails now when I try to use the resource compiler (Digital Mars Resource Compiler 7.50B5). C::B here tells me:

Execution of 'rcc.exe obj\Debug\de\compeople\smartup\boot.res  de\compeople\smartup\boot.rc' in 'C:\projekte\smartup5\de.compeople.smartup.boot' failed.

I think the problem is that C::B does not know how the resource compiler has to be called correctly.
The correct calling would look like:

rcc.exe <IN> -o<OUT> -32 -r

Is there a place where I can define that?

Stefan

takeshimiya

  • Guest
Re: D language support
« Reply #5 on: April 24, 2006, 03:04:29 pm »
rcc.exe <IN> -o<OUT> -32 -r

Is there a place where I can define that?
Yes, Settings->Compiler and Debugger->Tab "Other"->Advanced Options.

If you change it to the correct version, please submit a patch.

StefanLi

  • Guest
Re: D language support
« Reply #6 on: April 24, 2006, 03:50:05 pm »
I changed the "win32 compile resource file" to:
$rescomp $file -o$resource_output -32 -r

and I changed the "Link object files to executable" to:
$linker $exe_output $link_options $link_objects $link_resobjects $libs

With that it builds!!!

Sorry, but I have no idea what to do for submitting a patch and additionally I am very unsure whether my changes are "universally" enough!

Stefan

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: D language support
« Reply #7 on: April 24, 2006, 04:25:57 pm »
Sorry, but I have no idea what to do for submitting a patch and additionally I am very unsure whether my changes are "universally" enough!

You can submit your patch here on BerliOS.

Best wishes,
Michael

StefanLi

  • Guest
Re: D language support
« Reply #8 on: April 25, 2006, 10:53:57 am »
Sadly, this did not solve all my problems. What now is missing is the ability to pass a *.def file to the linker, so that the app. gets linked as a windows GUI executable.
Within the "advanced options" I tried it with $def_output but that did not work.
Any ideas, advices?

Stefan

StefanLi

  • Guest
Re: D language support
« Reply #9 on: April 25, 2006, 02:19:57 pm »
Found a solution for my problem. I placed the required .def file in the project root, gave it the name of my project (plus .def) and than I changed the "Link object files to executable" to:
$linker $exe_output $link_options $link_objects $(PROJECT_DIR)/$(PROJECT_NAME).def $link_resobjects $libs

Michael, I do not have any C::B sources and obviously I do not know where these settings go in. So creating a diff is not that easy for me. Do you know whom I could forward these "patches".

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: D language support
« Reply #10 on: April 25, 2006, 02:48:56 pm »
Michael, I do not have any C::B sources and obviously I do not know where these settings go in. So creating a diff is not that easy for me. Do you know whom I could forward these "patches".

Hello,

I think (and a dev can correct me if I am wrong :)) that you can post your "patches" on BerliOS (see Takeshi Miya's post).

Best wishes,
Michael

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: D language support
« Reply #11 on: April 25, 2006, 02:50:48 pm »
Found a solution for my problem. I placed the required .def file in the project root, gave it the name of my project (plus .def) and than I changed the "Link object files to executable" to:
$linker $exe_output $link_options $link_objects $(PROJECT_DIR)/$(PROJECT_NAME).def $link_resobjects $libs
have you ever noticed the
Project->Build Options->Linker(tab)->Other linker options: ???

StefanLi

  • Guest
Re: D language support
« Reply #12 on: April 25, 2006, 06:21:07 pm »
Yes, I also played with this, but I did not find a good idea for what to enter.
The idea to use the "$(PROJECT_DIR)/$(PROJECT_NAME).def" just arised while
playing with the "Link object files to executable".
However, I moved this entry from their to the "Other linker options" and I also noticed that $(PROJECT_DIR)$(PROJECT_NAME).def" is enough (the slash is not neccessary).

Thanks for your advice!

Stefan