473,411 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Porting libmodbus to 16-bit DOS

Hello,

I'm working on a project that involves embedded controllers
communicating over modbus. I would like to use a well-written modbus
library to add modbus functionality to my project and I found
libmodbus:
https://launchpad.net/libmodbus/

My controllers are in fact embedded PCs running DOS-compatible OS, CPU
is Intel 80188-compatible. My compiler is Borland C++ 5.02 on Windows,
generating 16-bit DOS code.

When I tried to drop-in the library to my project, I got the following
errors:

Info :Building...
Info :Compiling Z:\WORK\ICP\libmodb\modbus.c
Error: modbus.c(30,2):Unable to open include file 'TERMIO.H'
Error: modbus.c(31,2):Unable to open include file 'SYS\TIME.H'
Error: modbus.c(32,2):Unable to open include file 'UNISTD.H'
Error: modbus.c(34,2):Unable to open include file 'GLIB.H'
Error: modbus.c(38,2):Unable to open include file 'SYS\SOCKET.H'
Error: modbus.c(39,2):Unable to open include file 'SYS\IOCTL.H'
Error: modbus.c(40,2):Unable to open include file 'NETINET\IN.H'
Error: modbus.c(41,2):Unable to open include file 'NETINET\IP.H'
Error: modbus.c(42,2):Unable to open include file 'NETINET\TCP.H'
Error: modbus.c(44,2):Unable to open include file 'MODBUS.H'
Error: modbus.c(125,44):'modbus_param_t' cannot start a parameter
declaration
Error: modbus.c(129,69):Type name expected
Warn : modbus.c(982,13):Constant is long
Warn : modbus.c(985,13):Constant is long
Warn : modbus.c(988,13):Constant is long

How do I resolve these problems?
Can Borland C++ 5.02 be considered good enough compiler today?

Sincerely,
Nickolai Leschov
Dec 13 '07 #1
5 4083
nl******@gmail.com wrote:
Hello,

I'm working on a project that involves embedded controllers
communicating over modbus. I would like to use a well-written modbus
library to add modbus functionality to my project and I found
libmodbus:
https://launchpad.net/libmodbus/

My controllers are in fact embedded PCs running DOS-compatible OS, CPU
is Intel 80188-compatible. My compiler is Borland C++ 5.02 on Windows,
generating 16-bit DOS code.

When I tried to drop-in the library to my project, I got the following
errors:

Info :Building...
Info :Compiling Z:\WORK\ICP\libmodb\modbus.c
[snip errors]
How do I resolve these problems?
The compiler can't find the include files mentioned in the very
explicit error messages.

Use the -I directive to instruct the compiler where to find those files.
Can Borland C++ 5.02 be considered good enough compiler today?
For generating 16 bit DOS code probably yes...

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Dec 13 '07 #2
>
Use the -I directive to instruct the compiler where to find those files.
Thank you. Can you tell where are those files supposedly be found?
(except glib; I know that I need to install it by myself)

I.e. what are the files contained in the sys/ and netinet/ directories?
Are they to be provided by the OS, compiler or otherwise?
What are termio.h and unistd.h ?
Dec 13 '07 #3
Nickolai Leschov wrote:
>>
Use the -I directive to instruct the compiler where to find those files.
Thank you. Can you tell where are those files supposedly be found?
(except glib; I know that I need to install it by myself)
I.e. what are the files contained in the sys/ and netinet/ directories?
Are they to be provided by the OS, compiler or otherwise?
These are likely to be Unix-specific and relate to the networking
implementation provided.
What are termio.h and unistd.h ?
These are Unix-specific.

A quick view of the original site shows that the package you are looking
at is explicitly for Linux. Porting it to another unix-like platform is
likely to be reasonably straightforward, but porting it elsewhere could
be quite a challenge.

You are probably heading out of the scope of this group.

You should probably try to find assistance specifically related to
libmodbus - is there a mailing list or forum?

Alternatively you could look at whether cygwin would help you get
this package running under DOS.
Dec 13 '07 #4
Nickolai Leschov wrote:
>>
Use the -I directive to instruct the compiler where to find those files.
Thank you. Can you tell where are those files supposedly be found?
(except glib; I know that I need to install it by myself)

I.e. what are the files contained in the sys/ and netinet/ directories?
Are they to be provided by the OS, compiler or otherwise?
What are termio.h and unistd.h ?
Well, <unistd.hare unix standard functions... Unlikely to be
present in your DOS 16 bit system.

You are attempting to compile code that was written for another,
completely different environment. You will have to port it
to your 16 bit DOS environment.

Good luck.

(You will need it)
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Dec 13 '07 #5
Mark Bluemel wrote:
Nickolai Leschov wrote:
>>>
Use the -I directive to instruct the compiler where to find those
files.
Thank you. Can you tell where are those files supposedly be found?
(except glib; I know that I need to install it by myself)
>I.e. what are the files contained in the sys/ and netinet/
directories? Are they to be provided by the OS, compiler or
otherwise?

These are likely to be Unix-specific and relate to the networking
implementation provided.
>What are termio.h and unistd.h ?

These are Unix-specific.

A quick view of the original site shows that the package you are
looking at is explicitly for Linux. Porting it to another unix-like
platform is likely to be reasonably straightforward, but porting it
elsewhere could be quite a challenge.

You are probably heading out of the scope of this group.

You should probably try to find assistance specifically related to
libmodbus - is there a mailing list or forum?

Alternatively you could look at whether cygwin would help you get
this package running under DOS.
Not Cygwin but it *could* be possible with DJGPP.
<http://www.delorie.com/>

Provided necessary network drivers, TCP/IP stack etc. are added for DOS
(third party software is available for all this).

The OP's best bet is to seek assistance in a DOS newsgroup.

Dec 14 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Wolfgang Keller | last post by:
Hello, as a non-developer I am currently participating in an industrial "research" project to develop a so-called "web application". This application serves at the same time as middleware to...
2
by: nitin | last post by:
g++ -c $INCLUDES ActualPEResult.cpp In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, from /home/pradeepks/Linux_Porting/dcpfrontier/dcpdev/dcp_components/trap...
5
by: Ryan Liu | last post by:
Hi All, Now I am porting CC to GCC and I have some problems. Would you mind tell me some document which have some description how to port CC to GCC ?? Thank you very much. Ryan
4
by: golu | last post by:
Has any body done the porting from oracle to sql server, what were the issues in porting the data bases? Also suggest some resources which can be helpful in the porting project TIA Golu
11
by: Errol Neal | last post by:
Hi all, Not sure if this is a question for a php list or this one, but I'll give it a shot and if I am wrong, please do not crucify me. :-) There is a php based sourceforge project called...
4
by: Chris Travers | last post by:
Hi all; A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light,...
4
by: Ian | last post by:
I would like to hear from others who have considered and/or ported code from traditional C++ to C++/CLI. The class library I am considering porting to C++/CLI was written in traditional C++ with...
34
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
11
by: Jordan | last post by:
I am trying to rewrite some C source code for a poker hand evaluator in Python. Putting aside all of the comments such as just using the C code, or using SWIG, etc. I have been having problems...
0
by: Michael Palmer | last post by:
On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@gmail.comwrote: I haven't tried it myself, but I came across a blog post the other day that describes a way of building windows installers for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.