Author Topic: Unable To Compile  (Read 10008 times)

Shattered_Farewell

  • Guest
Unable To Compile
« on: March 02, 2006, 01:08:53 am »
I'm fairly new at C++ and to test it out I wrote the following into the compiler.
Code
#include <iostream> 
using namespace std;
int main()
{
     cout << "Hello World From About\n";
}
I saved it as a file named "hello world" and clicked Build>>Compile current file.
As I said I'm really new at this, isnt it suppose to compile into a program?

Shattered_Farewell

  • Guest
Re: Unable To Compile
« Reply #1 on: March 02, 2006, 01:15:26 am »
Okay actually I did all that but I put it in a project and clicked build and run. It doesnt work and I get:

Project   : Untitled1
Compiler  : GNU GCC Compiler (called directly)
Directory : ****************************************
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: C:\**********\Untitled1.exe
mingw32-g++.exe: no input files
Process terminated with status 1 (0 minutes, 0 seconds)

Note: By the way, I just blocked out the directory with those stars.

sethjackson

  • Guest
Re: Unable To Compile
« Reply #2 on: March 02, 2006, 02:45:49 am »
I'm fairly new at C++ and to test it out I wrote the following into the compiler.
Code
#include <iostream> 
using namespace std;
int main()
{
     cout << "Hello World From About\n";
}
I saved it as a file named "hello world" and clicked Build>>Compile current file.
As I said I'm really new at this, isnt it suppose to compile into a program?

Yeah. Are you using RC2? If so get a nightly from here.

http://forums.codeblocks.org/index.php?board=20.0

Hmm also the project file could be messed up.... Could you post it here? It is XML (that is what I want to see open the project with Notepad or something).

Shattered_Farewell

  • Guest
Re: Unable To Compile
« Reply #3 on: March 02, 2006, 02:56:24 am »
Yes, I am. The newest one. Should I just download http://download.berlios.de/codeblocks/CB_20060301_rev2102_win32.7z to it? And I don't know how you want me to post the project

sethjackson

  • Guest
Re: Unable To Compile
« Reply #4 on: March 02, 2006, 03:05:10 am »
Yes, I am. The newest one. Should I just download http://download.berlios.de/codeblocks/CB_20060301_rev2102_win32.7z to it? And I don't know how you want me to post the project

Ok. Umm just post the .cbp file here. :)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Unable To Compile
« Reply #5 on: March 02, 2006, 05:32:55 am »
No need to post your project file, just change the Compiler logging to "Full command line" under the Other tab of your global compiler settings and copy'n'paste the build log.

Deja vu...
« Last Edit: March 02, 2006, 05:58:10 am by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Shattered_Farewell

  • Guest
Re: Unable To Compile
« Reply #6 on: March 02, 2006, 10:28:18 pm »
Like I said I'm new like this, I just got Code::Blocks two days ago. I don't quite understand anything you ment in this:
No need to post your project file, just change the Compiler logging to "Full command line" under the Other tab of your global compiler settings and copy'n'paste the build log.

Deja vu...

And like I said, should I just put the following file  http://download.berlios.de/codeblocks/CB_20060301_rev2102_win32.7z in the code blocks main folder for the nightly build to work?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Unable To Compile
« Reply #7 on: March 02, 2006, 10:43:53 pm »
well let's start again from scratch (assuming you are on windows) :

1) install Mingw manually (for example in C:\MingW) (below I will post a link on how to do that)
2) add C:\MingW\bin to your path
3) download the nightly build and extraxt it in a directory (foe example C:\codeblocks)
4) download the wx dll (a link is provided at the post of every nightly build) and extract it next to the codeblocks.exe you got from the extracting process in step 3)

--- > ready ;-)

The link as promised, the cookbook of the nightly builds explains how to install MingW and the nightly, you can forget about te rest for now.
http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook

Cheers,
Lieven



Shattered_Farewell

  • Guest
Re: Unable To Compile
« Reply #8 on: March 02, 2006, 10:53:57 pm »
well let's start again from scratch (assuming you are on windows) :

1) install Mingw manually (for example in C:\MingW) (below I will post a link on how to do that)
So can I just not download it manually because I can't extract .tar.gz. Can't I just download http://prdownloads.sf.net/mingw/MinGW-5.0.2.exe?download  instead? And If I do in the installer do I only need MinGW base tools?

sethjackson

  • Guest
Re: Unable To Compile
« Reply #9 on: March 02, 2006, 10:55:34 pm »
well let's start again from scratch (assuming you are on windows) :

1) install Mingw manually (for example in C:\MingW) (below I will post a link on how to do that)
So can I just not download it manually because I can't extract .tar.gz. Can't I just download http://prdownloads.sf.net/mingw/MinGW-5.0.2.exe?download  instead? And If I do in the installer do I only need MinGW base tools?

Get 7-zip it will extract .tar.gz.

http://7-zip.org/

Shattered_Farewell

  • Guest
Re: Unable To Compile
« Reply #10 on: March 02, 2006, 10:57:00 pm »
Yes but you see I don't want to go downloading any more programs or anything, I was just wondering that wouldnt it be easier for me to download the .exe? And if I can, what tools in the installer should I download?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Unable To Compile
« Reply #11 on: March 02, 2006, 11:02:50 pm »
well I have never installed MingW with an installer from MingW itself.
I had it coming on my system twice : the first time with dev-cpp installer, and with Code::Blocks installer.

But the manual install is so much nicer, it is just unzipping, you can really trust it, no registry settings behind your back, you are in full control (well the gdb is with an installer). Really it is worth the effort.
It sounds cumbersome, but once you've done it you'll look back at it, and think, hey that's all. ;-)

[EDIT] : oh oh oh, did I mention the powerfull uninstall, no minutes waiting on add/remove programs, you can just delete the MingW directory and that's it. ;-)
« Last Edit: March 02, 2006, 11:04:27 pm by killerbot »

sethjackson

  • Guest
Re: Unable To Compile
« Reply #12 on: March 02, 2006, 11:05:59 pm »
well I have never installed MingW with an installer from MingW itself.
I had it coming on my system twice : the first time with dev-cpp installer, and with Code::Blocks installer.

But the manual install is so much nicer, it is just unzipping, you can really trust it, no registry settings behind your back, you are in full control (well the gdb is with an installer). Really it is worth the effort.
It sounds cumbersome, but once you've done it you'll look back at it, and think, hey that's all. ;-)

[EDIT] : oh oh oh, did I mention the powerfull uninstall, no minutes waiting on add/remove programs, you can just delete the MingW directory and that's it. ;-)

Yup. :)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Unable To Compile
« Reply #13 on: March 02, 2006, 11:12:17 pm »
Or...

1. MinGW-5.0.2.exe, install to C:\MinGW
2. 7z432.exe, install anywhere
3. CB_20060302_rev2119_win32.7z, extract to C:\CodeBlocks
4. wxmsw26u_gcc_cb.7z, extract to C:\CodeBlocks

and you're finished. (C:\CodeBlocks\codeblocks.exe to run.)

Or, you could just follow my original instructions. Open up your global compiler settings (Settings -> Compiler, if I remember correctly), switch to the Other tab, and change the Compiler logging option to "Full command line". Then try to build your project again. When it's finished showing all the errors, switch to the "Build Log" tab down at the bottom of the Code::Blocks window, highlight the entire contents, hit Ctrl+C to copy it, then come to the forums here, create a new post, and hit Ctrl+V to paste.
« Last Edit: March 02, 2006, 11:16:55 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)