Code Blocks compiling errors

I recently started into the world of C++. I downloaded and installed code::blocks (the one with mingw). I was following a tutorial and made a very simple program as to teach myself. I click build and click "compile" and it gives this huge pile of errors:

bcc32.exe -q -IC:\Borland\BCC55\include -IC:\Borland\BCC55 -o"C:\programming\my first program.obj" -c "C:\programming\my first program.cpp"
C:\programming\my first program.cpp:
ilink32.exe -q -ap -LC:\Borland\BCC55\lib -LC:\Borland\BCC55\lib\psdk c0x32 "C:\programming\my first program.obj","C:\programming\my first program.exe",,,,
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::cout' referenced from C:\PROGRAMMING\MY FIRST PROGRAM.OBJ
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:\PROGRAMMING\MY FIRST PROGRAM.OBJ
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 2 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)

I have no clue what is going on, some help would be really appreciated
You compiled the program with old Borland C++ compiler. It looks like that you included a header with Vcl library and the linker can not find the corresponding library.
does that mean i need to reinstall the borland compiler?
It means that you should use the compiler you downloaded and check headers included in the program.:)
Last edited on
Ok I am very new to C++ and the like and still quite confused as to what you mean with headers. Here is the code I used to make the program:

//my first program in c++ version 3

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
cout << "I'm a C++ program!";
return 0;
}

Is it something i messed up in this code or elseware. I followed the readme file that came with the compiler and got it set up correctly. I tried running the other 2 "first programs" i made to see if it worked. It appeared to launch the application but just gave me a window saying

"Process returned 0 (0x0), Execution time 1.248 s Press any key to continue..."

I saved a copy of the file with the extension .exe and got a window saying NTVDM.EXE has stopped working. That seems to come up if i launch any DOS type application in windows 7 Not that it is relevant to the problem i am having... is it?
Footknight, you have probably moved on greatly in the last 6 weeks, but just for the record the following works well without errors. I also use code::blocks with the MinGW compiler.

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
cout << "\n\nI'm a C++ program!"; // \n gives a new line each time
cin.get (); // stops the program from flashing off the screen
return 0;
}

Cheers, Don
Topic archived. No new replies allowed.