Connecting Tech Pros Worldwide Help | Site Map

Watcom C

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 17th, 2008, 05:55 PM
Nickolai Leschov
Guest
 
Posts: n/a
Default Watcom C

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

  #2  
Old January 17th, 2008, 06:35 PM
Arlet Ottens
Guest
 
Posts: n/a
Default Re: Watcom C

Nickolai Leschov wrote:
Quote:
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.
  #3  
Old January 17th, 2008, 07:05 PM
Flash Gordon
Guest
 
Posts: n/a
Default Re: Watcom C

Arlet Ottens wrote, On 17/01/08 19:25:
Quote:
Nickolai Leschov wrote:
Quote:
>Hello,
>>
>I want to tried to use Open Watcom for programming my i188, and I have
>a couple of questions.
<snip>
Quote:
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
  #4  
Old January 17th, 2008, 07:35 PM
HT-Lab
Guest
 
Posts: n/a
Default Re: Watcom C


"Nickolai Leschov" <nleschov@gmail.comwrote in message
news:fmo866$ghc$1@aioe.org...
Quote:
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

Quote:
>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

  #5  
Old January 18th, 2008, 07:25 AM
Nickolai Leschov
Guest
 
Posts: n/a
Default Re: Watcom C

HT-Lab wrote:
Quote:
Perhaps my sequence can help you out :
< skip >
Quote:
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
  #6  
Old January 19th, 2008, 07:55 AM
HT-Lab
Guest
 
Posts: n/a
Default Re: Watcom C


"Nickolai Leschov" <nleschov@gmail.comwrote in message
news:fmpnh1$us2$1@aioe.org...
Quote:
HT-Lab wrote:
Quote:
>Perhaps my sequence can help you out :
< skip >
Quote:
>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
Quote:
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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.