newbie MinGW

Q How to start MinGW in Linux

Page 1 of 1

9 Replies - 1336 Views - Last Post: 21 February 2006 - 08:25 PM Rate Topic: -----

#1 rlf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-February 06

newbie MinGW

Posted 13 February 2006 - 01:03 PM

:) I downloaded (MinGW) W32api-3.6.tar.gz and unziped it (in windows 2000) and never could find an .exe file. So repeated the process with the same result.
The instructions suggested that you could install it with "./configure &&" so I copied the files to a Linux enviornment and opened a consule and typed in the above in different diffectories with the same result: ">".
It is my assumption that it wants something more - but what? :D
I have tried "./configure && MinGW" wich gives the error: "no such file or dir" (even when there is that dir in the same folder). So two questions:
1. What am I doing wrong?
2. What do I need to do to get the tools (preferably on Linux) to learn c++

Thanks for having this great form. Looking forward to some advice a newbie can understand. :D

Is This A Good Question/Topic? 0
  • +

Replies To: newbie MinGW

#2 dec1pher  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 116
  • Joined: 27-January 06

Re: newbie MinGW

Posted 13 February 2006 - 01:09 PM

first off hi what's your distro? GCC comes with some distros like Pardus Linux if you can give more info i'll be glad to help...
Was This Post Helpful? 0
  • +
  • -

#3 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: newbie MinGW

Posted 13 February 2006 - 04:10 PM

GCC and G++ can be downloaded and installed for any distro, although many do come with it already imstalled. If you want to use the ./configure && option, you'll need to istall MSYS as well.
Was This Post Helpful? 0
  • +
  • -

#4 rlf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-February 06

Re: newbie MinGW

Posted 13 February 2006 - 05:14 PM

:)
1. Thank you dec1pher. My perferred distro is Xandros (Linux). I have c++ installed (with QT which is probably a terrific program - but I wanted something simplier for a starter. I followed one of the examples times 2 and got errors which left me sans a clue what to do). I can open a consule and type "cc" or "gcc" and get a response sans an error message. However, I don't know what to do after that!.
2. Thank you Amadeus :) I will try downloading MSYS and see what happens. Thanks.
:D
RF
Was This Post Helpful? 0
  • +
  • -

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: newbie MinGW

Posted 13 February 2006 - 07:46 PM

No problem...but if you want to use gcc or g++, you can simply compile your program, then run it (this assumes you are in the directory the c file is):
gcc -o yourfile yourfile.c


will compile into a file named yourfile
./yourfile


will run the compiled code.
Was This Post Helpful? 0
  • +
  • -

#6 dec1pher  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 116
  • Joined: 27-January 06

Re: newbie MinGW

Posted 14 February 2006 - 06:15 AM

and for compiling multiple files with linking additional libs at a time you can use

gcc -c first.c second.c third.c fourth.c fifth.c ... -lfirst -lsecond -lthird
gcc -o binaryName first.o second.o third.o fourth.o fifth.o ...



and for compiling a dll with a lib file:

gcc -c -DBUILD_DLL dllFiles0.c ... dllFilesN.c -ladditionallibsifyouwant
gcc -shared -o dllName.dll -Wl,--out-implib,libName.a dllFiles0.o ... dllFilesN.o


This post has been edited by dec1pher: 14 February 2006 - 06:16 AM

Was This Post Helpful? 0
  • +
  • -

#7 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: newbie MinGW

Posted 14 February 2006 - 07:10 AM

Or you could check out all gcc command line options here:
http://gcc.gnu.org/o...voking-GCC.html
:)
Was This Post Helpful? 0
  • +
  • -

#8 rlf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-February 06

Re: newbie MinGW

Posted 14 February 2006 - 01:14 PM

:D Thanks much for replies. To date have had no success getting MSYS to do anything. Downloaded ok - had to un-tar etc in Linux and copy to MS machine - but no joy yet.
I will try the latest advice and let you know what is happening.
Thanks heaps :)

RF
Was This Post Helpful? 0
  • +
  • -

#9 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: newbie MinGW

Posted 14 February 2006 - 04:33 PM

Do you want a compiler for windows? Or linux? The GCC compiler that you have on your lnux machine should contain all that you require...or were you looking for something with a bit more of a GUI?
Was This Post Helpful? 0
  • +
  • -

#10 rlf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-February 06

Re: newbie MinGW

Posted 21 February 2006 - 08:25 PM

:rolleyes: My preference is a Linux compiler. I appreciate the advice and support. So far I am making progress with your help and help from my 12 year old grandson (and one other helper). The book I am going through is C++ weekend crash course by Stephen R. Davis. The block I faced was that nothing was working. It seems that two points have made the difference:
a) Don't pay too much attention to the warnings! The warnings I get on a regular basis are:
In file included from /usr/include/c++/3.3/backward/iostream.h:31,
from NestedDemo.cpp:7:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider usingone of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
I tried to disable the warning and got more than a page of warnings and errors! :huh:
B) I get only the above error (if everything else is OK) if I use (in my console on my Linux machine) if I use c++ -o etc as apposed to gcc or cc - which give me many more warnings and errors.
So as at this time I am on page 96 and well under way of learning something. :D

Thanks all. I'll shout some more when I get stuck too badly.
:D

RF
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1