diff options
| author | Carl E. Thompson <devel-fltk@carlthompson.net> | 1999-03-29 17:39:46 +0000 |
|---|---|---|
| committer | Carl E. Thompson <devel-fltk@carlthompson.net> | 1999-03-29 17:39:46 +0000 |
| commit | 81c7d9b2156da7495668132a96e63e994be0d19d (patch) | |
| tree | 7e1c3dc9dbc0fd7cde40759301bb7bf99483a10c /src/fl_call_main.c | |
| parent | 617a7ee619493a1b07df49058509922bae48f559 (diff) | |
Changes needed to get FLTK to compile on Borland C++ 5 under Windows. I
compiled this on BC++ 5.0 upgraded to 5.0B via the two monster patches.
I didn't turn on optimization because my version of BC++ doesn't seem to
do much in the way of optimization (FLUID was only 1k smaller when
optimized for size). VC++ generates smaller code.
The examples that use OpenGL don't work because Borland's linker can't find
"wglShareLists". I'm sure this is a simple problem, but I don't know how
to fix it.
Borland's C++ compiler won't allow you to call main() from C++, so I had
to add a c function in "fl_call_main.c" to call it so that you don't have
to do that WinMain crap. However, when I added this file to the Visual C++
project it converted the whole thing from 5.0 format to 6.0 format. The
files look the nearly identical so I don't think this should be a problem
for 5.0 users, but if it is then you can revert them back to the previous
version and just add this one source file.
Borland really doesn't suck that bad. It doesn't look as polished as VC++
and it refused to supress some warnings for no reason, but I forgot how
much I liked the feel of Borlands compilers... Much more intuitive then
MS VC++.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_call_main.c')
| -rw-r--r-- | src/fl_call_main.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/fl_call_main.c b/src/fl_call_main.c new file mode 100644 index 000000000..ee4c8c73d --- /dev/null +++ b/src/fl_call_main.c @@ -0,0 +1,40 @@ +/* + * "$Id: fl_call_main.c,v 1.1.2.1 1999/03/29 17:39:29 carl Exp $" + * + * Copyright 1998-1999 by Bill Spitzak and others. + * + * fl_call_main() calls main() for you Windows people. Needs to be done in C + * because Borland C++ won't let you call main() from C++. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems to "fltk-bugs@easysw.com". + */ + +#if defined(WIN32) && !defined(FL_DLL) +extern int main(int, char *[]); +extern int __argc; +extern char **__argv; + +int fl_call_main() { + return main(__argc, __argv); +} +#endif + +/* + * End of "$Id: fl_call_main.c,v 1.1.2.1 1999/03/29 17:39:29 carl Exp $". + */ + |
