From: "Elias Pschernig" Newsgroups: comp.os.msdos.djgpp Subject: Re: Pascal units in c++ Date: Thu, 16 Apr 1998 07:17:40 +0200 Organization: magnet Internet Services Lines: 27 Message-ID: <6h5eg3$dhp$1@orudios.magnet.at> References: <01bd6894$499fcd60$151601bf AT cb001687> <6h4hu8$hba AT news DOT u-strasbg DOT fr> <01bd694d$74dbc4c0$151601bf AT cb001687> NNTP-Posting-Host: 195.3.67.41 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk ... What i meant was how i should >program structures like units in c++, what the equivalent of a unit is in >c++, and how i should use it. > I think a pascal-unit is the same as a c++ -library or an -object-file. I changed from pascal to c, and what were units in pascal now are other c-programs as well. for example: i had a program "test.pas", which used the unit "mouse.tpu". (from which i had the source code "mouse.pas") now i have "test.c", which needs the object file "mouse.o" ( which is generated from "mouse.c"). And i coud make a library "mouse.a" from mouse.o if i wanted to. To use a .c file like a unit, you need to declare all functions and variables in a separate header file (example: "mouse.h") and include this in your program ("test.c"), as you include the "uses ..." in pascal. hope this is of any help, Elias Pschernig