Watcom C

Discussion in 'C Programming' started by Nickolai Leschov, Jan 17, 2008.

  1. Hello,

    I want to tried to use Open Watcom for programming my i188, and I have a
    couple of questions.

    How do I make simple project compile? I created a project with DOS
    target ( " DOS - 16 bit executable (.exe)" ), but it doesn't see
    the header files; neither mine nor standard ones.
    Output looks like this:
    < skip >
    Error! E2028: _atexit is an undefined reference
    Error! E2028: InitLib_ is an undefined reference
    < skip >
    The first line belongs to standard function, second one is function of
    my device's system library.

    How do I contact the developers of Open Watcom?
    I can see their emails through bug tracker on the site, but maybe they
    can be found on separate newsgroup or here?

    Regards,
    Nickolai Leschov
    Nickolai Leschov, Jan 17, 2008
    #1
    1. Advertising

  2. Nickolai Leschov

    Arlet Ottens Guest

    Nickolai Leschov wrote:
    > Hello,
    >
    > I want to tried to use Open Watcom for programming my i188, and I have a
    > couple of questions.
    >
    > How do I make simple project compile? I created a project with DOS
    > target ( " DOS - 16 bit executable (.exe)" ), but it doesn't see
    > the header files; neither mine nor standard ones.
    > Output looks like this:
    > < skip >
    > Error! E2028: _atexit is an undefined reference
    > Error! E2028: InitLib_ is an undefined reference
    > < skip >
    > The first line belongs to standard function, second one is function of
    > my device's system library.
    >
    > How do I contact the developers of Open Watcom?
    > I can see their emails through bug tracker on the site, but maybe they
    > can be found on separate newsgroup or here?
    >
    > Regards,
    > Nickolai Leschov


    I don't know about the second reference, but _atexit() is usally a
    function that gets called when the program exits. For embedded platforms
    where the program never exits, this can be safely replaced by a dummy
    void _atexit(void) { } in your source code.
    Arlet Ottens, Jan 17, 2008
    #2
    1. Advertising

  3. Nickolai Leschov

    Flash Gordon Guest

    Arlet Ottens wrote, On 17/01/08 19:25:
    > Nickolai Leschov wrote:
    >> Hello,
    >>
    >> I want to tried to use Open Watcom for programming my i188, and I have
    >> a couple of questions.


    <snip>

    > I don't know about the second reference, but _atexit() is usally a
    > function that gets called when the program exits. For embedded platforms
    > where the program never exits, this can be safely replaced by a dummy
    > void _atexit(void) { } in your source code.


    This could well not be the correct way to do it (it would not be on some
    embedded compilers I have used). The correct way could be to get the
    code to link to an appropriate version of the standard library. The OP
    needs to find whatever support forums exist for Open Watcom, and there
    is even a link to such places in the most obvious place which is
    http://www.openwatcom.org/index.php/Main_Page which was the first hit
    Google gave for "open watcom".

    Details on how specific tools work are not topical on comp.lang.c or
    comp.lang.c++
    --
    Flash Gordon
    Flash Gordon, Jan 17, 2008
    #3
  4. Nickolai Leschov

    HT-Lab Guest

    "Nickolai Leschov" <> wrote in message
    news:fmo866$ghc$...
    > Hello,
    >
    > I want to tried to use Open Watcom for programming my i188, and I have a
    > couple of questions.
    >
    > How do I make simple project compile?


    Perhaps my sequence can help you out :

    1) I updated the wlsystem file in the binw directory with the following
    addition:

    system begin embedded8086
    end

    2) I then created a very simple startup (cstart.obj, modified from
    src\startup\dos) and small clib (clib88.lib).

    3) To compile I do:

    wcl -q -c -0 -fpc -mt -s -d0 -od -l=COM myfile.c

    4) To link I do:

    wlink file myfile.obj name myfile.bin @cc.lk

    were cc.lk consist of:

    system embedded8086
    option NOCASEEXACT
    option NODEFAULTLIBS
    option map
    option stack=1k
    format dos com
    libfile ...\mystartup\cstart.obj
    library ...\myclib\clib88.lib

    5) and finally I convert the bin file to Intel hex and upload it to my
    board.

    Hans
    www.ht-lab.com


    >I created a project with DOS target ( " DOS - 16 bit executable (.exe)" ),
    >but it doesn't see
    > the header files; neither mine nor standard ones.
    > Output looks like this:
    > < skip >
    > Error! E2028: _atexit is an undefined reference
    > Error! E2028: InitLib_ is an undefined reference
    > < skip >
    > The first line belongs to standard function, second one is function of my
    > device's system library.
    >
    > How do I contact the developers of Open Watcom?
    > I can see their emails through bug tracker on the site, but maybe they can
    > be found on separate newsgroup or here?
    >
    > Regards,
    > Nickolai Leschov
    HT-Lab, Jan 17, 2008
    #4
  5. HT-Lab wrote:
    > Perhaps my sequence can help you out :

    < skip >
    > 5) and finally I convert the bin file to Intel hex and upload it to my
    > board.

    Thanks for help.
    What is your platform? I guess my case is even simpler than this, as I
    can link standard c libraries and produce standard dos exe binaries,
    only the specific I/O should be done via manufacturer's library.

    I simply couldn't build a DOS exe program.

    Regards,
    Nickolai Leschov
    Nickolai Leschov, Jan 18, 2008
    #5
  6. Nickolai Leschov

    FreeRTOS.org Guest

    > How do I contact the developers of Open Watcom?
    > I can see their emails through bug tracker on the site, but maybe they can
    > be found on separate newsgroup or here?


    ? - Third paragraph of the OpenWatcom homepage:

    ----------------
    + The contributors and many users read the Open Watcom news groups
    regularly. They are the best place to get questions answered and to
    participate in the Open Watcom community. Point your news reader at the
    server news://news.openwatcom.org and subscribe to the groups that interest
    you.

    -+ openwatcom.users.c_cpp - Users of the Open Watcom C and C++ products
    -+ openwatcom.users.fortran - Users of the Open Watcom Fortran products
    -+ openwatcom.contributors - Developers of all Open Watcom languages, tools,
    and documentation
    -+ openwatcom.bugzilla - Automatically generated notifications about newly
    reported bugs and new additions to bug
    descriptions in the Bugzilla tracking system. Read only.

    + There is also an Open Watcom Announcements email list. This is a low
    volume list providing the latest news about the Open Watcom project.

    + The #watcom channel on irc.freenode.net is a place where users and
    contributors gather to chat about Open Watcom in real time.
    ----------------

    --
    Regards,
    Richard.

    + http://www.FreeRTOS.org & http://www.FreeRTOS.org/shop
    14 official architecture ports, 5000 downloads per month.

    + http://www.SafeRTOS.com
    Certified by TÜV as meeting the requirements for safety related systems.
    FreeRTOS.org, Jan 18, 2008
    #6
  7. Lyeshov-

    Y bac net forum za watcom C? Ecm odun za popularniu C extension.

    I can neither tranliterate nor get into those fido fora to save my life.
    Tja.

    --

    Reagan Revision

    To sum up: 1. The cosmos is a gigantic fly-wheel making 10,000 revolutions a
    minute. 2. Man is a sick fly taking a dizzy ride on it. 3. Religion is the
    theory that the wheel was designed and set spinning to give him the ride.
    -- H L Mencken, "Coda," in Smart Set (New York, Dec. 1920; repr. in A
    Mencken Chrestomathy, pt. 1, 1949).

    "Nickolai Leschov" <> wrote in message
    news:fmo866$ghc$...
    > Hello,
    >
    > I want to tried to use Open Watcom for programming my i188, and I have a
    > couple of questions.
    >
    > How do I make simple project compile? I created a project with DOS target
    > ( " DOS - 16 bit executable (.exe)" ), but it doesn't see
    > the header files; neither mine nor standard ones.
    > Output looks like this:
    > < skip >
    > Error! E2028: _atexit is an undefined reference
    > Error! E2028: InitLib_ is an undefined reference
    > < skip >
    > The first line belongs to standard function, second one is function of my
    > device's system library.
    >
    > How do I contact the developers of Open Watcom?
    > I can see their emails through bug tracker on the site, but maybe they can
    > be found on separate newsgroup or here?
    >
    > Regards,
    > Nickolai Leschov
    Regan Revised, Jan 18, 2008
    #7
  8. Nickolai Leschov

    HT-Lab Guest

    "Nickolai Leschov" <> wrote in message
    news:fmpnh1$us2$...
    > HT-Lab wrote:
    >> Perhaps my sequence can help you out :

    > < skip >
    >> 5) and finally I convert the bin file to Intel hex and upload it to my
    >> board.

    > Thanks for help.
    > What is your platform?


    http://www.ht-lab.com/hardware/drigmorn1/drigmorn1.html

    Regards,
    Hans
    www.ht-lab.com

    I guess my case is even simpler than this, as I
    > can link standard c libraries and produce standard dos exe binaries, only
    > the specific I/O should be done via manufacturer's library.
    >
    > I simply couldn't build a DOS exe program.
    >
    > Regards,
    > Nickolai Leschov
    HT-Lab, Jan 19, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?Philipp_Cla=DFen?=

    Open watcom supporting C++ STL

    =?ISO-8859-1?Q?Philipp_Cla=DFen?=, Sep 1, 2003, in forum: C++
    Replies:
    1
    Views:
    546
    Pavel Vozenilek
    Sep 1, 2003
  2. Spike

    Watcom and ELF...

    Spike, Jul 23, 2004, in forum: C++
    Replies:
    1
    Views:
    408
    Christopher Benson-Manica
    Jul 23, 2004
  3. Basat
    Replies:
    0
    Views:
    380
    Basat
    Dec 1, 2004
  4. just4me
    Replies:
    1
    Views:
    287
    Mark A. Odell
    Jul 16, 2004
  5. bine
    Replies:
    1
    Views:
    515
    Alan Balmer
    Jan 28, 2005
Loading...

Share This Page