LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2007, 12:31 PM   #1
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Rep: Reputation: 30
Problem with Mingw


OK, so I have Slack 11.0, and have installed a mingw package.

I created a hello, world program to test it out, but I guess I don't know how to tell the compiler to compile the source into win32 binaries.

This is all I have done:
Code:
(when I installed mingw, while in root)
%installpkg mingw32-3.4.5-i586-1.tgz
*no errors*
...

%g++ hello.cpp -o hello.exe
*no errors*

%./hello.exe
Hello, World!

%wine <directory prog was in>/hello.exe
wine: could not load L"I:\\Desktop\\80725051\\test.exe": Bad EXE format for
So I can think I can safely assume that g++ is still compiling the program into Linux binaries.
 
Old 04-20-2007, 12:32 PM   #2
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
lol ended too soon, what should I do? I tried installing mingw from binaries, with nothing but failure
 
Old 04-20-2007, 05:20 PM   #3
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
MINGW g++ hello.cpp -o hello.exe
 
Old 04-25-2007, 12:09 PM   #4
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by tuxdev
MINGW g++ hello.cpp -o hello.exe
Great, I have a good feeling that'll do the trick. Linux is currently unbootable, but I'll try that ASAP
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mingw package davidguygc Slackware 2 04-20-2007 09:44 AM
MinGW or Cygwin??? montylee Programming 2 06-14-2006 01:07 AM
minGW: cross platform using g77? shengchieh Programming 4 01-03-2005 12:13 PM
WxWindows and MingW Genjix Programming 0 01-01-2005 05:35 AM
MingW and Windows Libraries bobwall Programming 0 09-22-2004 03:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration