Author Topic: Wont Build C code  (Read 39311 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Wont Build C code
« Reply #15 on: January 28, 2013, 02:59:01 pm »
I would say, it should work there.
Please verify that mingw32-g++.exe exists (in the bin-folder below the toolvhains masterpath) and is executable.

Offline Rich_P

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Wont Build C code
« Reply #16 on: January 28, 2013, 03:20:53 pm »
The only partition i have on the local machine is C:\

Running as administrator makes no difference

Looking into the directors for MinGW

The directory being ,

C:\MinGW\bin\ ( supposed file )

in this dir i have the following

mingw32-cc.exe
mingw32-gcc.exe
mingw32-gcc-4.6.2.exe
mingw32-make.exe

Cheers

Rich


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Wont Build C code
« Reply #17 on: January 28, 2013, 03:41:04 pm »
You (obviously) miss mingw32-g++.exe.
Pleaee install also the c++ compiler or (if you are really sure, that you never want to use c++) you can use migw32-gcc.exe as dynamic linker.

If you have installed codeblocks-12.11mingw-setup.exe, make sure the compilers masterpath points to the correct directoy.
It should be the MinGW-folder below C::B's installation directory.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Wont Build C code
« Reply #18 on: January 28, 2013, 03:46:08 pm »
You (obviously) miss mingw32-g++.exe.
Pleaee install also the c++ compiler or (if you are really sure, that you never want to use c++) you can use migw32-gcc.exe as dynamic linker.

If you have installed codeblocks-12.11mingw-setup.exe, make sure the compilers masterpath points to the correct directoy.
It should be the MinGW-folder below C::B's installation directory.

Remember most Mingw Installations will NOT work if there is a C:\MinGW MinGW installation in addition to the installation trying to be used.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Rich_P

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Wont Build C code
« Reply #19 on: January 28, 2013, 04:25:07 pm »
OK Guys

I am getting confused here and i have to apologise for my lack of experience,

I have now uninstalled C:B and removed any trace of MinGW from my computer,

I have downloaded the latest version of CodeBlocks  , codeblocks-12.11mingw-setup

Is this all i need to get started? or do i need to download something else?

Can you advise ?

Jens, Where do i get the C++ compiler from? do i need to download it?

Tim, i have now removed all trace, there was a MinGW folder in C:\ but i am pretty sure that CodeBlocks installed that there,

Thanks so far guys :)

Rich
Thanks

Rich

Offline Rich_P

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Wont Build C code
« Reply #20 on: January 28, 2013, 04:40:46 pm »
OK Guys , i am starting to win,

After reinstalling C::B  ( in admin mode ) :)

and checking all file paths, and clicking reset on the the compiler settings, i now have a working compilier,

I checked using a project i half built before, and it can compile and run,

When i tried to create a NEW project, and building it, i get this..


-------------- Build: Debug in Hello2 (compiler: GNU GCC Compiler)---------------

Linking stage skipped (build target has no object files to link)
Nothing to be done (all items are up-to-date).



I am not sure what a "linker" is, so maybe you could direct me

thankyou so much

Rich

Offline Rich_P

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Wont Build C code
« Reply #21 on: January 28, 2013, 05:01:04 pm »
Right, I have twigged it now

:-)

Its simply my complete lack of experience, i needed to add the source file to the project file for it to link and compile,

Thankyou guys, for all of the patience and help,

I am sure i willbe back to ask more questions,

I will try my hardest to work the answer out myself first :)

Thanks again

Rich