Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Setup with Borland C++ Command-Line Compiler

This topic is 6070 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have read through many of the posts regarding #includes, paths, etc, but still cannot seem to get any code to compile correctly with the free Borland C++ compiler (v.5.51) which should be the same core compiler that C++ Builder uses. Here''s what I have so far: C:\winnt\system32\gl\ glut.h glut32.dll glut32.lib opengl32.lib glaux.lib glaux.h windows.h I even ran several of the two of the libs through the coff2omf to convert MS libs to Borland. No avail. After resolving all the path errors, and converting the libs I finally get the error: ---- Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland Example.cpp: Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external ''_main'' referenced from C:\PROGRAM FILES\BORLAND\BCC55\LIB\C0X32.OBJ ----- If you have any suggestions, particularly anyone who is using a command line compiler under Windows/Win2k, please let me know. Thanks! Jon jreisch02@hotmail.com

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Um... I certainly hope you don''t have all those development files in a subdirectory of C:\Winnt\system32 ... That''s the last place for those files - Seeing that suggests that either you''re joking or you''re clueless. But giving you the benefit of the doubt.

Create a new directory to act as the root directory for your development efforts - C:\Dev or C:\Projects for example. Then make a subdirectory for each particular project - ie C:\Dev\MyProjectX - move the .h and .lib files there - move glut32.dll to C:\winnt\system32 - that''s where it should be.

You also need to verify that the compiler directory has been added to your PATH environment variable. Open a console window - (Dos Box) and type "SET" then locate the line starting with the word "PATH" - if C:\PROGRAM FILES\BORLAND\BCC55\BIN isn''t listed you''ll need to add it. An autoexec.bat file is the easiest way to do this - but not the "proper" way on NT - instructions on how to do this should be located with the BCC docs.

Once you''ve got your PATH properly set up you''ll be able to run the compiler from any directory of your chosing.

I suggest that you read all of the documents available to you - especially those regarding setting up your dev environment - before doing any of this. Once you''ve got that down - continue reading the docs - the sections pertaining to "makefiles" should be helpful. In the course of your reading you will discover the answers to your questions about include files. Trust the compiler docs more than any discussion posts. Once you''ve got the hang of things you''ll be better able to sort through the posts for good advice.

There''s also a couple of free GUI dev tools designed to work with BCC - VIDEand Mini IDE. The VIDE docs are good although I''ve read that people have had troubles getting it to work properly on windows.

You might also want to visit Borland because I believe that 5.5.2 is available - and they''ve also made their debugger available for free as well.

Best of luck!

Share this post

Link to post
Share on other sites
I think I can tell you exactly what''s going wrong (I did this too when I first started using the free borland command line complier). Basically your program is compiling fine, but the compiler is trying to compile into a console program and so is looking for a main method. You''re probably building a windows application and so have a winmain method. All you need to do is use the compiler''s -W option to compile to a windows application, i.e.:

bcc32 -W source.cpp lib.lib .....

Hope that helps

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!