Subdomain Posts
D | 3 days ago
D | 8 days ago
D | 8 days ago
D | 9 days ago
D | 9 days ago
D | 9 days ago
None | 18 days ago
D | 18 days ago
JavaScript | 35 days ago
D | 431 days ago
Recent Posts
None | 1 sec ago
None | 12 sec ago
JavaScript | 22 sec ago
None | 26 sec ago
HTML | 27 sec ago
None | 30 sec ago
None | 44 sec ago
HTML | 49 sec ago
None | 56 sec ago
T-SQL | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By LanoxxthShaddow on the 12th of Jan 2009 03:00:06 AM Download | Raw | Embed | Report
  1. ================================================================================
  2. How to Code::Blocks with Tango on Ubuntu 8.10 (amd64)
  3. ================================================================================
  4.  
  5. I write this assuming you want to write in Digitalmars D with Code:Blocks as
  6. your IDE and gdc as compiler. It took me quite a while my self to figure
  7. out on how to get things set up properly. To I decieded to write this.
  8. I use Ubuntu 8.10 my self, but this should apply to other distries too.
  9.  
  10. 1. Install gdc and codeblocks through the paket manager:
  11.  sudo aptitude install gdc
  12.  sudo aptitude install codeblocks
  13.  
  14. #you might need this too, also im not sure
  15.  sudo aptitude install build-essential
  16.  
  17. 2. Next we install the tango library:
  18. For amd64 run:
  19.  wget http://downloads.dsource.org/projects/tango/0.99.7/tango-0.99.7-gdcr243-gdc-x86_64-unknown-linux-gnu.sh
  20.  
  21. Note: If you happen to have downloaded installers that include dsss you might not
  22. have libgtango.a which we will need later.
  23.  
  24. 2.1 Install Tango:
  25.  chmod u+x tango-0.99.7-gdcr243-gdc-x86_64-unknown-linux-gnu.sh
  26.  sudo ./tango-0.99.7-gdcr243-gdc-x86_64-unknown-linux-gnu.sh
  27. This will install tango on your computer, most likely the files are then in /usr/lib
  28. and /usr/include/d but it might also be possible that they are in /usr/local/lib or
  29. /usr/local/include/d
  30.  
  31. 3. Add the right configuration settings to Codeblocks:
  32. In Codeblocks go to Settings->Compiler and Debugger... there you select the "GDC D Compiler".
  33.  
  34. 3.1 Compiler Settings
  35. In the first tab "Compiler Settings" go to #defines and add:
  36. type "Posix" and "Tango" into the field.
  37.  
  38. 3.2 Linker Settings
  39. In the Tab "Linker Settings" add "/usr/lib/libgtango.a" and "/usr/lib/libgphobos.a"
  40. or use "/usr/local/lib/libgphobos.a" and "/usr/local/lib/libgtango.a", depending
  41. on where the installer put your libraries.
  42.  
  43. 3.3 Search Directories
  44. In the Tab "Search Directories" you have to add "/usr/include/d" or "/usr/local/include/d"
  45. depending on where the tango stuff got installed
  46.  
  47. 3.4 Toolchain executables
  48. Then go to the Tab "Toolchain executables" which might be hidden further right. gdc is either in
  49. /usr/bin or /usr/local/bin. If its not there just run:
  50.  which gdc
  51. And it will tell you.
  52.  
  53. Adjust the compilers installation directory according, if its not set right.
  54.  
  55. 4. Testing your settings:
  56. Create a new D Project and try to compile the test code. Also add a line like:
  57. import tango.io.Console; and compile it, to see if the libraries are installed correctly.
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: