Thread: beginner attempting to compile hello world. having problems

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    47

    beginner attempting to compile hello world. having problems

    when trying to compile with code::blocks IDE and the borland compiler. I get this error..
    Code:
    Project   : Console application
    Compiler  : Borland C++ Compiler 5.5 (called directly)
    Directory : C:\CBProjects\
    --------------------------------------------------------------------------------
    Switching to target: default
    Linking console executable: C:\CBProjects\HelloWorld.exe
    Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    Error: Unresolved external '___CRTL_VCL_Init' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_MEM_UseBorMM' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_VCLLIB_Linkage' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__ExceptInit' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external 'GetModuleHandleA' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__startup' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external 'HeapAlloc' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_TLS_SetValue' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_TLS_InitThread' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_TLS_Alloc' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_TLS_GetValue' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external 'GetProcessHeap' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external 'HeapFree' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_TLS_ExitThread' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '___CRTL_TLS_Free' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >::put(char)' referenced from C:\CBPROJECTS\.OBJS\MAIN.O
    Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >::flush()' referenced from C:\CBPROJECTS\.OBJS\MAIN.O
    Error: Unresolved external 'std::cout' referenced from C:\CBPROJECTS\.OBJS\MAIN.O
    Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >& std::operator <<(std::basic_ostream<char, std::char_traits<char> >&, const char *)' referenced from C:\CBPROJECTS\.OBJS\MAIN.O
    Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >::operator <<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))' referenced from C:\CBPROJECTS\.OBJS\MAIN.O
    Error: Unresolved external '__matherr' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__matherrl' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__fmode' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__argv_expand_ptr' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__wargv_expand_ptr' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__handle_setargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__handle_exitargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__handle_wsetargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__handle_wexitargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__fileinfo' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__setargv__' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__setenvp__' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Error: Unresolved external '__turboFloat' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
    Process terminated with status 1 (0 minutes, 0 seconds)
    0 errors, 0 warnings

    Please help me out so i can beggin my programming experience.
    Last edited by Salem; 12-03-2007 at 03:58 AM. Reason: code tagged the error messages

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    please post your complete code. did your compiler come with the C++ libraries/headers?

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    47
    i used the default code that came with code::blocks.:

    Code:
    #include <iostream>
    
    int main()
    {
    	std::cout << "Hello world!" << std::endl;
    	return 0;
    }
    unfortunately im not able to answer the question about the libraries/headers.. i followed the direction on a web site to install the borland compiler and assumed it was correct..

  4. #4
    The larch
    Join Date
    May 2006
    Posts
    3,573
    It seems that the code compiled but failed to link. May-be you haven't set the (correct) path to the compiler's libraries (linker paths).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  5. #5
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    well the code shouldnt have an error, so its something wrong with either your setup or software (or lack of).

    on the download page for code blocks, there seems to be two downloads:
    Code::Blocks IDE, without compiler
    Filesize: 3,977,959 Bytes | Version: 1.0rc2
    MD5 Hash: 377e430eb6fcbf5566478b49628a5706

    Code::Blocks IDE, with MINGW compiler
    Filesize: 13,597,181 Bytes | Version: 1.0rc2
    MD5 Hash: 7638bdd4fd087b3168be4f0f968d1f3c
    i would download and install the second one with mingw compiler.

    you likely downloaded the one without a compiler, because you want to use a different compiler. if thats the case, you have to do some configuring. whenever i download an ide, i download the compiler that comes with it (if any) so i dont have to do any configuring.

  6. #6
    Registered User
    Join Date
    Nov 2007
    Posts
    47
    if someone could lead me to a good website that can teach me how to install compile and make a hello world program in borland c++ that would be great! ive been having bad luck

  7. #7
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    there are many free and much newer compilers than borland 5.5 (is that ~8 years old?) i would use a new compiler that comes with an ide.

  8. #8
    Registered User
    Join Date
    Dec 2007
    Posts
    20
    well doesnt he need to include
    using namespace std;

    then u can just be like
    cout<< "Hello WORLDDDDDDDD" ;
    return 0;
    ?

  9. #9
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    or prefix cout and endl with std:: like he has done.

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You can try Visual Studio 2008 Express. IDE & Compiler in one, complete with a debugger and very easy to use.

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Did you follow all the setup instructions for the compiler?
    http://www.cprogramming.com/borland.html

    It seems to me that it can't find any of the standard library stuff.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #12
    Registered User
    Join Date
    Nov 2007
    Posts
    47
    i tried the tutorial for setting it up (whcih matched exactly how i set it up earlier. and everything works if compiling from cmd prompt.. but my goal is to use a ide so i don't have to jump back and forth to test out programs..

  13. #13
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    There's an alternative setup here which involves adding the BCB directory to the PATH environment variable.

    Or you could try running the IDE from the command prompt you set up for the compiler, rather than double clicking on it.

    Then the IDE will be aware of all the environment variables necessary to run the compiler correctly, when it (the IDE) runs the compiler.

    If that works, then we can work on making it a "smoother" process.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  14. #14
    Registered User Ktulu's Avatar
    Join Date
    Oct 2006
    Posts
    107
    What is wrong with Dev-C++? http://www.bloodshed.net/devcpp.html
    This parameter is reserved

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 08-13-2003, 04:35 AM
  2. beginner problems with array elements...
    By grnphrog in forum C Programming
    Replies: 4
    Last Post: 01-27-2003, 02:38 PM
  3. problems as a beginner 1
    By Moffesto in forum C++ Programming
    Replies: 4
    Last Post: 06-21-2002, 11:16 PM
  4. world of problems with poker game
    By blight2c in forum C++ Programming
    Replies: 5
    Last Post: 04-21-2002, 08:00 PM
  5. Compile Problems
    By Eber Kain in forum C++ Programming
    Replies: 1
    Last Post: 08-26-2001, 01:50 PM