DJGPP project fails to compile

Started by
3 comments, last by Caesar 22 years, 1 month ago
Hi, I know this may be a little bit off topic and that DOS DJGPP is now obsolete, but I tried to a school project and I don''t know how to manage the projects there. Assume I have ie 3 files, mylib.h mylib.cpp main.cpp i the mylib.h i have a lock of course (#ifndef MYLIB_H #define MYLIB_H ...code... #endif) and I include it in the mylib.cpp like #include"mylib.cpp". When i tried to compile those, I got a "XXXXX already defiend in mylib.h), this is the way it works under MSVC but how about djgpp (RHIDE)? Thanks
Advertisement
Don''t declare variables or objects in header files - only in source files.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]
umm, i have only a class definition there, and even if i cut-past it into the cpp file, in stil keeps telling already defined (for methods)
if you''re using rhide, make sure your header files aren''t included in the project(in the window with the list of files that make up the project)

i''d also advise using dev-c++ w/ mingw(mingw is included) if you want to use a free c/c++ compiler+ide



~Gumpus P. Maximus~
um, that was prolly the cause, I added them all... thanks a lot

This topic is closed to new replies.

Advertisement