From: "Chia" Newsgroups: comp.os.msdos.djgpp Subject: More Library Stuff Date: Sun, 22 Nov 1998 13:10:37 -0600 Organization: 404 Software Lines: 49 Message-ID: <739nae$k5f@nnrp2.farm.idt.net> NNTP-Posting-Host: flex-47.top.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.0810.800 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I've got all the library sources compiling successfully, and I ar'd them into libjgui.a. I then ranlib'd it and copied it to my /djgpp/lib directory. I then took the main header file, jgui.h, and copied that to my /djgpp/include directory. Then, I tried to compile a simple program with it, which used the "Desktop" class from the library. The program had #include #include And was compiled with: gxx test.cpp -o test.exe -ljgui -lalleg This gave me a message that the Desktop class was undeclared. Now, the desktop class was in a file called jg_desk.cpp, and jg_desk.h. It was converted into jg_desk.o through gxx -c jg_desk.cpp And included into the library just like all the other files. So I'm wondering why it won't find it. I also tried with my other files and they don't work either. The way I've got them right now, each .cpp file contains a single class implementation and includes a .h file for its definition. Now, that header includes whatever classes the class is derived from / uses and also includes the main header. Is this the way it's supposed to be, or am I supposed to include all of the class headers from the main source code, or... I guess I just don't know. I guess my question is how do I lay out the classes so that they will all be correctly implemented in the library? Do I turn them into .o files like I have been and just ar them into a library, or do I have the main header include them all, or do I do something else? Thanks! Jared [ chia AT top DOT net ] [ jared AT underdark DOT net ] [ ab031 AT thor DOT unomaha DOT edu ]