Thread: Digital Mars + Code::Blocks

  1. #1
    Registered User
    Join Date
    Jun 2007
    Location
    Maringá-PR-Brazil
    Posts
    2

    Digital Mars + Code::Blocks

    Hi there,

    I'm pretty new to c++ programming, although I had programmed in C for microcontrollers.

    I need now to build some tiny systems to run on Freedos. The problem is I get a message "Requires Win32" when trying to execute them.

    I've installed the Digital Mars 16Bit stuff in the right places, but in some forums I've read I must include some things on a "definition file", for the linker to use. (EXETYPE DOS - to be more detailed)

    I just can't get what it means.
    I've created a file called "teste.def", but where must it go? How can I make the linker see it, from inside the Code::Blocks?

    Thanks in advance.
    Regards,
    Arttie.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Quote Originally Posted by arttie_br View Post
    I've created a file called "teste.def", but where must it go? How can I make the linker see it, from inside the Code::Blocks?
    If you've created a project, then I would try adding the "teste.def" to the project, and see what happens. Hopefully the linker will then see it.

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    24
    If you need Win32 then you could download the free microsoft visual c++ express edition and the psdk fllow the instructions and you can now write in win32

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    I am somewhat blur on these things myself, but if you require Win32, the 16 bit compiler seems like the wrong choice. It seems to me that you should install the Win32 Digital Mars compiler instead, or perhaps use the MinGW port of GCC (g++) that is commonly used with Code Blocks. MS Visual C++ 2005 Express will probably also work for you.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    It appears he wants to work from windows but create dos programs (actually freedos - but I am guessing compatible). But after he compiles it, he's ending up with win32 executables. I've never used Mars so I couldn't tell you how to compile and link for 16 bit programs, but I would suggest first try to use Mars from the command line and get that working first then try to incorporate using code::blocks
    Last edited by Darryl; 06-29-2007 at 01:52 PM.

  6. #6
    Registered User
    Join Date
    Jun 2007
    Location
    Maringá-PR-Brazil
    Posts
    2
    Hi everybody.
    Yes, Darryl war right. I wanted to use code::blocks in windows to compile Dos programs. But simply couldn't handle it.
    It is all so new to me.. command line compilation using linkers, definition files... I got used to program in Java using eclipse and PHP using aptana. They handled everything for me, but now, when I am approching the best stuff, I get lost. *sigh* frustrating....

    I'll try a bit more. If I can't do it, I'll bring a few more doubts.
    Thanks everyone for trying to help!

    Regards,
    Arthur.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 04-29-2009, 06:42 AM
  2. dmc (digital mars compiler)
    By NeonBlack in forum C++ Programming
    Replies: 7
    Last Post: 12-01-2007, 03:04 PM
  3. Digital Mars Compiler: compiling for DOS?
    By Waldo2k2 in forum C++ Programming
    Replies: 1
    Last Post: 09-15-2002, 02:06 PM
  4. Digital Mars Compiler
    By Powerfull Army in forum C++ Programming
    Replies: 9
    Last Post: 06-26-2002, 07:54 PM
  5. Anyone reccomend Digital Mars compiler?
    By joshuaman in forum C++ Programming
    Replies: 7
    Last Post: 06-19-2002, 11:22 PM