Advertisement

Help a harmless newbie out please

Started by October 26, 2001 04:22 PM
2 comments, last by Useless Newbie 23 years, 4 months ago
Ok, I downloaded the free Borland C++ compilier, but I can''t seem to get any of the tutorials to compile. Here''s the error messages: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland C:\WINDOWS\Desktop\New Folder\Lesson1.cpp: Error E2209 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 14: Unable to open include file ''vcl.h'' Error E2303 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 17: Type name expected Error E2034 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 17: Cannot convert ''char *'' to ''int'' Warning W8060 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 190: Possibly incorrect assignment in function CreateGLWindow(char *,int,int,int,bool) Warning W8060 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 231: Possibly incorrect assignment in function CreateGLWindow(char *,int,int,int,bool) Warning W8060 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 238: Possibly incorrect assignment in function CreateGLWindow(char *,int,int,int,bool) Warning W8060 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 252: Possibly incorrect assignment in function CreateGLWindow(char *,int,int,int,bool) Warning W8057 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 405: Parameter ''hInstance'' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) Warning W8057 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 405: Parameter ''hPrevInstance'' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) Warning W8057 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 405: Parameter ''lpCmdLine'' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) Warning W8057 C:\WINDOWS\Desktop\New Folder\Lesson1.cpp 405: Parameter ''nCmdShow'' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) *** 3 errors in Compile *** Tool completed with exit code 1 If I comment out lines 14 and 17, I don''t get the first 3 errors, but the rest of the warnings are still there and I get a linker error: Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external ''_main'' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ Also, when I try to run the executable for the first leson I get a error message: A required .DLL file, BORLANDMM.DLL, was not found. Can someone help me out? I''d love to start learning OpenGl, but I can''t unless I can get the code to compile.
vcl.h???

Looks like that's there for compatability with version 4

Try just downloading and compiling the Visual C++ code, worked for me - I may have made changes though, if the Visual C++ code doesn't work, post back and i'll e-mail you the full source code that does compile under the free Borland compiler.

Sudden realisation:

The '#include ' and 'USELIB ("glaux.lib");' are unnecessary, remove them. Then compile by bcc32 -W filename.cpp.
The -W is important, it tells the compiler to try to build a windows program rather than a dos console program and therefore to look for a winmain rather than a main function. At the moment the compiler is giving you a linker error because it thinks you want a dos console program, but can't find the 'main' method.

Edited by - Enigma on October 26, 2001 6:12:02 PM
Advertisement
vcl is ''visual component library'' and is at the heart of borland builder - it is their class library in a somewhat similar ( but arguably better) way that mfc (microsoft foundation classes) are for visual c++. The point is that the borland bcc5.5 command line tools don''t come with the vcl or any other library - they are just the core utilities you need to build applications.

Follow Enigma''s suggestion and use the basic win32 code as found in the visual c++ examples.

At the risk of appearing to be self-plugging, you could visit my wee humble website which has simple win32 examples of using the bcc5.5 cmd line tools (and DevC++/mingw). If you download one of the later examples (eg from the gdi section) you will get a handy makefile and method for building apps that will make life easier for you when using this tool. Earlier examples on my site use configuration or response files. Go here for a look if you want.

There is also an excellent intro to bcc5.5 cmd line tools here.

If you prefer to use an ide with the cmd line tools then try out VIDE which is free and works fine. I have links to other such things on my site.

Hope you find something useful in all of that. Good luck.
Country: Scotland [not listed in the ''Country'' combobox].
Hey thanks, I got the tut''s compiling now.
And thanks for that tip on VIDE, I''m gonna try it out for a while and see how it works (gotta be better than notepad eh? )

This topic is closed to new replies.

Advertisement