Author Topic: Canīt even install it  (Read 13518 times)

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Canīt even install it
« on: February 20, 2007, 04:04:47 am »
I know, there are 100s of help pages all over the web explaining how to install C::B and MinGW, but it looks like Iīm too dumb to do it right

Now this is not really a big deal, Iīm using the 1.0RC2, it installs all I need in a simple installation and everything works just fine, after all Iīm not a real coder, just messing around with a few small tools Iīm writing for myself, so its more out of principle that I want to figure out how to use a nightly build

During the last year or so, Iīve tried maybe a dozen times, always a dozen different ways, always failed, always went back to 1.0-RC2
Iīve been reading this forum from bottom to top, anything I could find at the gcc website, the mingw website, at Wiki and several dozen other sites, Iīve followed all kinds of instructions, always with a different result, but never successful, I can get each single part to work, i.e. running gcc from command line is no problem, but never the combination
Partially I found the solution through other posts in here or elsewhere, but Iīd really love if I could get the whole thing to work for once

Depending what and how I install it, from all manually up to the automated download and install for MinGW what I get is always different, I just never get it to work
Usually it begins with invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] or something like that, solved in the Toolchain executables
Next comes some no such file error, solved by adding MinGW\bin to the path
Next comes cannot exec cc1plus, there I figured out, its not in MinGW\bin but in MinGW\libexec\gcc\mingw32\3.4.2, and so on and so on
Iīve tried copy files around and adding further folders to the path, but it seems an endless chain, every error fixed leads to several new ones, like no resources or further no such file errors, I donīt even remember all of them, and sooner or leter I give up and go back to 1.0RC2

I realize, lots of others are using C:B without problems, so I figured it must be me and since most explanations tell me, it really not so complicated to install a nightly, I must be overlooking some very basic settings

Can anyone help me out there?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #1 on: February 20, 2007, 05:02:17 am »
I can help you get it setup if you want?
But, I will need you to do a new minGW install of 3.4.5 version of GCC the 3.4.2 has been having some issues for me in the last two months (I use wxWidgets 2.8, this is where all the issues happen on.)

Step 1, rename the folder C:\mingw to mingw.save (this is for you to go back to if needed.)
Step 2A, Download, the new minGW installer 5.1.3, 
  http://prdownloads.sourceforge.net/mingw/MinGW-5.1.3.exe?download
Step 2B, Download, the make 3.80, 
  http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download
Step 2C, Download, the gdb
  http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download
Step 2D, Download, the which command
  http://prdownloads.sf.net/gnuwin32/which-2.16-4.exe?download

Step 3. Remove minGW register entries, this makes it easier to install a second copy on minGW on the PC.
Create a file called "MinGW-remove.reg" using a text editor and paste the code below in it. Save it. Run it.
Note, the reg code below should work in NT 4.0 or later machines.
Note, this step is optional, so if you don't feel conformable doing it you can skip it. But, then be extra careful to pick the correct destination folder of C:\MinGW
Code: [Select]
REGEDIT4

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MinGW]


Step 4. run the installer, pick "Download Only"
       A. Select "Candidate" Package
       B1. Select "MinGW Base Tools"
       B2. Select "g++ Compiler"

Step 5. run the installer, pick "Download & Install"
       A. Select "Candidate" Package
       B1. Select "MinGW Base Tools"
       B2. Select "g++ Compiler"
       C. Enter "C:\MinGW" as destination folder

Step 6. Run mingw32-make-3.80.0-3.exe
       6B. Enter "C:\MinGW" as destination folder

Step 7. Run gdb-6.3-2.exe
       7B. Enter "C:\MinGW" as destination folder

Now, we should have a known state of minGW install

Tim S

Note, My Directions is a highly modified version from
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Windows
To continue on I need to know your OS? (XP, 9x or etc.)

Note, I also need to known if you are going to create projects using wxWidgets?

Warning, it is highly suggested that minGW, wxWidgets and Code::Blocks be installed in folders that do NOT have spaces in their names. In other words, C:\Program Files\codeblocks causes problems and should NOT be used.

Tim S

       
           
« Last Edit: February 20, 2007, 05:30:11 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Canīt even install it
« Reply #2 on: February 20, 2007, 05:47:32 am »
fist of all, thanks for the quick answer

basically Iīve done all the things from your list several times over already, but just to make sure Iīve done it once more just now
Iīm aware of folder names with spaces, so no problem there
Only thing I usually do different is to install to D:\MinGW, but for this time Iīve made it C:\MinGW, just to make sure

Result:
I run C::B, it opens, wow, 1st step working
I create some folder, and begin a new project, Win32 GUI projext, name it test1
I donīt type any code but simply use the default code of a blank window C::B creates
I right click the project, choose build (Ctrl-F9)
I get a whole bunch of errors beginning with "stdarg.h: No such file or directory"
I search and find stdarg.h deep in a subfolder of MinGW, but no matter whether I add its path or copy the file into the bin, it doesnīt find it

Iīve been using XP pro so far, yesterday Iīve got Vista, but after I saw how many problems there are with it, I havenīt installed it yet (I would, if theres a chance to get C::B working with it?)

For the projects Iīm creating, well, most of it isnīt even a real project, but just an attempt to learn how to mess around with windows under windows

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #3 on: February 20, 2007, 05:56:39 am »
fist of all, thanks for the quick answer

basically Iīve done all the things from your list several times over already, but just to make sure Iīve done it once more just now
Iīm aware of folder names with spaces, so no problem there
Only thing I usually do different is to install to D:\MinGW, but for this time Iīve made it C:\MinGW, just to make sure

Note, you can use D:\MinGW if you want, but you need to tell me because some extra steps are need if that is used. The most important step is that the folder C:\MinGW must NOT exist if you are not using C:\MinGW because minGW always looks for C:\MinGW first in some cases.

Quote
Result:
I run C::B, it opens, wow, 1st step working
I create some folder, and begin a new project, Win32 GUI projext, name it test1
I donīt type any code but simply use the default code of a blank window C::B creates
I right click the project, choose build (Ctrl-F9)
I get a whole bunch of errors beginning with "stdarg.h: No such file or directory"
I search and find stdarg.h deep in a subfolder of MinGW, but no matter whether I add its path or copy the file into the bin, it doesnīt find it

We need to verify the C::B setup for minGW is correct, what version of C::B are you using SVN number or Date

Quote
Iīve been using XP pro so far, yesterday Iīve got Vista, but after I saw how many problems there are with it, I havenīt installed it yet (I would, if theres a chance to get C::B working with it?)

For the projects Iīm creating, well, most of it isnīt even a real project, but just an attempt to learn how to mess around with windows under windows
MinGW is NOT working using default settings for any body under Windows Vista!

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

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Canīt even install it
« Reply #4 on: February 20, 2007, 05:59:29 am »
I downloaded the last nightly today, CB_20070217_rev3614_win32

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #5 on: February 20, 2007, 06:08:29 am »
"Settings" -> "Compiler and Debugger"
We need to verify the "ToolChain Executable"
SET "Compiler's Installation Directory" to "C:\minGW"

We need to verify the "Search Directories" Also.
"compiler" tab should have "C:\minGW\include"
"linker" tab should have "C:\minGW\lib"
"resource compiler" tab should have "C:\minGW\include"

Tim S

Note, I am most likely going to need to use which command that I gave directions on how to download in prior directions.

Quote
Step 2D, Download, the which command
  http://prdownloads.sf.net/gnuwin32/which-2.16-4.exe?download
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #6 on: February 20, 2007, 06:21:03 am »
If the test GUI Project still does not work do this.

run which-2.16-4.exe to install which.
Add C:\Program Files\GnuWin32\bin to your PATH so the which command will work

open DOS BOX and enter following commands
cd C:\
which --all mingw32-gcc.exe

I want you to get "which: no mingw32-gcc.exe in (....."
If it lists a path that has mingw32-gcc.exe in it.
Edit your path variable to NOT have it. Note, after editing the PATH environment variable you may have to close and re-open the DOS box for changes to happen

cd C:\
which --all mingw32-g++.exe

I want you to get "which: no mingw32-g++.exe in (....."
If it lists a path that has mingw32-g++.exe in it.
Edit your path variable to NOT have it.

cd C:\
which --all mingw32-make.exe

I want you to get "which: no mingw32-make.exe in (....."
If it lists a path that has mingw32-make.exe in it.
Edit your path variable to NOT have it.

NOTE: Make sure that if you have cygwin installed that it is NOT in your path.

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #7 on: February 20, 2007, 06:26:22 am »
I downloaded the last nightly today, CB_20070217_rev3614_win32

Did you extract this to an empty folder except for DLLs mingw10.dll and wxmsw26u_gcc_cb.dll and the .7z files.
If, not please re-do it because installing it over RC2 does NOT work.

Tim S
« Last Edit: February 20, 2007, 06:28:49 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #8 on: February 20, 2007, 06:34:24 am »
If the test GUI Project still does not work do this.

"Settings" -> "Compiler and Debugger"

Select "other settings"
Change "Compiler logging" to "Full command Line"

Cut and Paste your re-build [CTRL][F11] of your Test GUI Project in a message, below is what I got.

Tim S

Code: [Select]
-------------- Build: Debug in Test ---------------
mingw32-g++.exe -Wall -g  -IC:\MinGW\include  -c c:\test\Test\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LC:\MinGW\lib  -o bin\Debug\Test.exe obj\Debug\main.o    -lgdi32 -luser32 -lkernel32
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings

« Last Edit: February 20, 2007, 06:43:18 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Canīt even install it
« Reply #9 on: February 20, 2007, 07:02:52 am »
all done, all confirmed (I never had an RC2 on this machine, after a harddisk crash 3 days ago)

here is the log:

-------------- Build: Debug in Test1 ---------------
mingw32-g++.exe -Wall -g  -IC:\MinGW\include  -c E:\Test1\main.cpp -o obj\Debug\main.o
In file included from E:\Test1\main.cpp:1:
C:/MinGW/include/windows.h:47:20: stdarg.h: No such file or directory
In file included from C:/MinGW/include/winnt.h:37,
                 from C:/MinGW/include/windef.h:253,
                 from C:/MinGW/include/windows.h:48,
                 from E:\Test1\main.cpp:1:
C:/MinGW/include/string.h:24:20: stddef.h: No such file or directory
In file included from C:/MinGW/include/winnt.h:37,
                 from C:/MinGW/include/windef.h:253,
                 from C:/MinGW/include/windows.h:48,
                 from E:\Test1\main.cpp:1:
C:/MinGW/include/string.h:36: error: `size_t' has not been declared
C:/MinGW/include/string.h:37: error: `size_t' has not been declared
C:/MinGW/include/string.h:38: error: `size_t' has not been declared
C:/MinGW/include/string.h:39: error: `size_t' has not been declared
C:/MinGW/include/string.h:40: error: `size_t' has not been declared
C:/MinGW/include/string.h:46: error: expected constructor, destructor, or type conversion before "strcspn"
C:/MinGW/include/string.h:49: error: expected constructor, destructor, or type conversion before "strlen"
C:/MinGW/include/string.h:50: error: `size_t' has not been declared
C:/MinGW/include/string.h:51: error: `size_t' has not been declared
C:/MinGW/include/string.h:52: error: `size_t' has not been declared
C:/MinGW/include/string.h:55: error: expected constructor, destructor, or type conversion before "strspn"
C:/MinGW/include/string.h:58: error: expected constructor, destructor, or type conversion before "strxfrm"
C:/MinGW/include/string.h:65: error: `size_t' has not been declared
C:/MinGW/include/string.h:66: error: `size_t' has not been declared
C:/MinGW/include/string.h:72: error: `size_t' has not been declared
C:/MinGW/include/string.h:73: error: `size_t' has not been declared
C:/MinGW/include/string.h:77: error: `size_t' has not been declared
C:/MinGW/include/string.h:80: error: `size_t' has not been declared
C:/MinGW/include/string.h:81: error: `size_t' has not been declared
C:/MinGW/include/string.h:90: error: `size_t' has not been declared
C:/MinGW/include/string.h:91: error: `size_t' has not been declared
C:/MinGW/include/string.h:100: error: `size_t' has not been declared
C:/MinGW/include/string.h:102: error: `size_t' has not been declared
C:/MinGW/include/string.h:104: error: `size_t' has not been declared
C:/MinGW/include/string.h:109: error: `size_t' has not been declared
C:/MinGW/include/string.h:125: error: expected constructor, destructor, or type conversion before "wcscspn"
C:/MinGW/include/string.h:127: error: expected constructor, destructor, or type conversion before "wcslen"
C:/MinGW/include/string.h:128: error: `size_t' has not been declared
C:/MinGW/include/string.h:129: error: `size_t' has not been declared
C:/MinGW/include/string.h:130: error: `size_t' has not been declared
C:/MinGW/include/string.h:133: error: expected constructor, destructor, or type conversion before "wcsspn"
C:/MinGW/include/string.h:136: error: expected constructor, destructor, or type conversion before "wcsxfrm"
C:/MinGW/include/string.h:150: error: `size_t' has not been declared
C:/MinGW/include/string.h:151: error: `size_t' has not been declared
C:/MinGW/include/string.h:157: error: `size_t' has not been declared
C:/MinGW/include/string.h:158: error: `size_t' has not been declared
C:/MinGW/include/string.h:175: error: `size_t' has not been declared
C:/MinGW/include/string.h:176: error: `size_t' has not been declared
In file included from C:/MinGW/include/windows.h:50,
                 from E:\Test1\main.cpp:1:
C:/MinGW/include/winbase.h:1367: error: `va_list' has not been declared
C:/MinGW/include/winbase.h:1368: error: `va_list' has not been declared
In file included from C:/MinGW/include/windows.h:55,
                 from E:\Test1\main.cpp:1:
C:/MinGW/include/winuser.h:4034: error: `va_list' has not been declared
C:/MinGW/include/winuser.h:4035: error: `va_list' has not been declared
In file included from C:/MinGW/include/objbase.h:12,
                 from C:/MinGW/include/ole2.h:9,
                 from C:/MinGW/include/windows.h:114,
                 from E:\Test1\main.cpp:1:
C:/MinGW/include/stdlib.h:332: error: expected constructor, destructor, or type conversion before "wcstombs"
C:/MinGW/include/stdlib.h:335: error: `size_t' has not been declared
C:/MinGW/include/stdlib.h:336: error: expected constructor, destructor, or type conversion before "mbstowcs"
C:/MinGW/include/stdlib.h:337: error: `size_t' has not been declared
C:/MinGW/include/stdlib.h:342: error: `size_t' was not declared in this scope
C:/MinGW/include/stdlib.h:342: error: `size_t' was not declared in this scope
Process terminated with status 1 (0 minutes, 0 seconds)
50 errors, 0 warnings
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #10 on: February 20, 2007, 07:19:52 am »
Open Dos Box and run following commands

cd c:\mingw\bin
which --all mingw32-g++
mingw32-g++.exe --version

What version does it give?

I get this
Code: [Select]
C:/MinGW/bin/mingw32-g++.EXE

mingw32-g++.exe (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Canīt even install it
« Reply #11 on: February 20, 2007, 07:33:45 am »
must be something wrong in the input, it gives me the version number of which (v2.16) but nothing from mingw

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #12 on: February 20, 2007, 07:39:32 am »
minGW was installed in C:/MinGW correct?

Try this

Open Dos Box and run following commands for when c: is not your default drive

c:
cd c:\mingw\bin
which --all mingw32-g++
mingw32-g++.exe --version

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

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Canīt even install it
« Reply #13 on: February 20, 2007, 07:46:20 am »
ahh sorry, my error, got it now, exact same as yours

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: Canīt even install it
« Reply #14 on: February 20, 2007, 08:03:59 am »
Do you have another minGW folder on your computer? Especially on the root folder like E:\mingw?
Do you have Cygwin on your computer?


Open Dos Box and run following commands

c:
cd c:\mingw\bin
mingw32-g++.exe --print-search-dirs

I got this or about this I had to edit it to make it readable
Code: [Select]
install: /mingw/lib/gcc/mingw32/3.4.5/
programs: =../libexec/gcc/mingw32/3.4.5/;../libexec/gcc/;/mingw/libexec/gcc/mingw32/3.4.5/;/mingw/libexec/gcc/mingw32/3.4.5/;/mingw/libexec/gcc/mingw32/;/mingw/lib/gcc/mingw32/3.4.5/;/mingw/lib/gcc/mingw32/;/usr/libexec/gcc/mingw32/3.4.5/;/usr/libexec/gcc/mingw32/;/usr/lib/gcc/mingw32/3.4.5/;/usr/lib/gcc/mingw32/;../lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/mingw32/3.4.5/;../lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/;/mingw/lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/mingw32/3.4.5/;/mingw/lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/
libraries: =../lib/gcc/mingw32/3.4.5/;../lib/gcc/;/mingw/lib/gcc/mingw32/3.4.5/;/usr/lib/gcc/mingw32/3.4.5/;../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/mingw32/3.4.5/;../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/;/mingw/lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/mingw32/3.4.5/;/mingw/lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/;/mingw/lib/mingw32/3.4.5/;/mingw/lib/;../lib/gcc/mingw32/3.4.5/../../../mingw32/3.4.5/;../lib/gcc/mingw32/3.4.5/../../../;/mingw/lib/gcc/mingw32/3.4.5/../../../mingw32/3.4.5/;/mingw/lib/gcc/mingw32/3.4.5/../../../;/lib/mingw32/3.4.5/;/lib/;/usr/lib/mingw32/3.4.5/;/usr/lib/

Note: The data right after install: is the most important part right now.


Tim S
« Last Edit: February 20, 2007, 08:17:54 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org