Quantcast

Maximum PC

It is currently Wed May 22, 2013 8:20 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Any C++ IDEs that run on Linux but create *.exe?
PostPosted: Thu Aug 25, 2005 2:41 pm 
Max [Ph]otographer
Max [Ph]otographer
User avatar

Joined: Mon Jun 28, 2004 4:10 pm
Posts: 5200
Hey all.

I'm taking an introductory course to C++ this fall at my local community college. I was kind of hoping that I could just use Linux to do all my work. (Debian 3.1 Sarge).

Anyway, I installed Anjuta but I couldn't figure out how to create an EXE. I guess it can't be done in Anjunta?

Are there any IDEs that will create EXE's from Linux?

My second option was to WINE one of the IDEs that came with the book. However, both of them failed to install on WINE.

They were:
Microsoft Visual C++ 6.0 Introductory Edition
Borland Visual C++ Builder, v.5

Is there a decent Windows based IDE that runs well on WINE?

Thanks,
Dan O.


Top
  Profile  
 
 Post subject: Re: Any C++ IDEs that run on Linux but create *.exe?
PostPosted: Thu Aug 25, 2005 2:54 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
Belboz99 wrote:
Hey all.

I'm taking an introductory course to C++ this fall at my local community college. I was kind of hoping that I could just use Linux to do all my work. (Debian 3.1 Sarge).

Anyway, I installed Anjuta but I couldn't figure out how to create an EXE. I guess it can't be done in Anjunta?

Are there any IDEs that will create EXE's from Linux?

My second option was to WINE one of the IDEs that came with the book. However, both of them failed to install on WINE.

They were:
Microsoft Visual C++ 6.0 Introductory Edition
Borland Visual C++ Builder, v.5

Is there a decent Windows based IDE that runs well on WINE?

Thanks,
Dan O.


There's Anjuta or KDevelop. However, as far you're problem is concerned, you have to understand the file system of Linux. A file is an executable, a text file, an image file, et al. UNIX/Linux doesn't need file suffixes (*.exe's, *.txt's, et al), instead, it knows the file is an executable because the file in itself is an executable.

If you want to know what the file type is, use the file command:

#file myFile

This should give you an output. Now, if you want to write C++ code in BASH (using nano or your preferred text editor), just use the following command:

#g++ mysource.cpp

This should give you a file titled a.out, however, if you want to specify your own file name, use the following command:

#g++ -o myExecutable mysource.cpp

This should give you an executable file called myExecutable. If you want to run it, just use the ./ format:

#g++ -o myExecutable mysource.cpp
#./myExecutable


Top
  Profile  
 
 Post subject:
PostPosted: Thu Aug 25, 2005 8:25 pm 
Max [Ph]otographer
Max [Ph]otographer
User avatar

Joined: Mon Jun 28, 2004 4:10 pm
Posts: 5200
DJSPIN, I don't think you read my full post.

I know full well that Linux doesn't care what extension (if any) is being used.

The problem is that I need to turn in an *.EXE to my professor at the end of every week. He is going to execute it on a Windows based OS.

Now, is there any IDE that can link my code to Bill Gate's code on Linux?

If there isn't (which I wouldn't be surprised) is there a decent IDE that I can run on WINE to create *.EXE files?

Put simply, I need to compile Windows Executables in a Linux environment.

Thanks,
Dan O.


Top
  Profile  
 
 Post subject:
PostPosted: Thu Aug 25, 2005 8:42 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
Belboz99 wrote:
DJSPIN, I don't think you read my full post.

I know full well that Linux doesn't care what extension (if any) is being used.

The problem is that I need to turn in an *.EXE to my professor at the end of every week. He is going to execute it on a Windows based OS.

Now, is there any IDE that can link my code to Bill Gate's code on Linux?

If there isn't (which I wouldn't be surprised) is there a decent IDE that I can run on WINE to create *.EXE files?

Put simply, I need to compile Windows Executables in a Linux environment.

Thanks,
Dan O.


Then just port your code over to Windows and compile it again. It wouldn't matter, when you run the C++ compiler, it produces executable files that run on Linux and not Windows. So just copy/paste your code from Linux to whatever IDE you're using. I have yet to encounter a C++ IDE for Linux that produces Windows *.exe's.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 9:48 am 
Coppermine
Coppermine

Joined: Wed Jul 07, 2004 11:07 am
Posts: 664
Location: Woodland Hills, CA
DJSPIN80 wrote:
I have yet to encounter a C++ IDE for Linux that produces Windows *.exe's.


Well, time for you to learn something new today...

The compiler:
http://www.mingw.org/

and an IDE:
http://visual-mingw.sourceforge.net/


Top
  Profile  
 
 Post subject: Re: Any C++ IDEs that run on Linux but create *.exe?
PostPosted: Fri Aug 26, 2005 9:48 am 
Coppermine
Coppermine

Joined: Wed Jul 07, 2004 11:07 am
Posts: 664
Location: Woodland Hills, CA
See above post.
Belboz99 wrote:
Hey all.

I'm taking an introductory course to C++ this fall at my local community college. I was kind of hoping that I could just use Linux to do all my work. (Debian 3.1 Sarge).

Anyway, I installed Anjuta but I couldn't figure out how to create an EXE. I guess it can't be done in Anjunta?

Are there any IDEs that will create EXE's from Linux?

My second option was to WINE one of the IDEs that came with the book. However, both of them failed to install on WINE.

They were:
Microsoft Visual C++ 6.0 Introductory Edition
Borland Visual C++ Builder, v.5

Is there a decent Windows based IDE that runs well on WINE?

Thanks,
Dan O.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 9:54 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
kkith wrote:
DJSPIN80 wrote:
I have yet to encounter a C++ IDE for Linux that produces Windows *.exe's.


Well, time for you to learn something new today...

The compiler:
http://www.mingw.org/

and an IDE:
http://visual-mingw.sourceforge.net/



Did you read what you posted? He's asking for a LINUX C++ IDE that can compile C++ code to a Windows executable. He wants to write code in Linux C++ IDE and have it produce Windows executable.

I didn't need to learn anything, YOU need to learn something new today, the Ming is a WINDOWS port of GCC.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 9:56 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
kkith wrote:
DJSPIN80 wrote:
I have yet to encounter a C++ IDE for Linux that produces Windows *.exe's.


Well, time for you to learn something new today...

The compiler:
http://www.mingw.org/

and an IDE:
http://visual-mingw.sourceforge.net/


BTW, read what I posted, I HAVE YET TO ENCOUNTER A C++ IDE FOR LINUX (i.e., something that runs in Linux) THAT PRODUCES WINDOWS *.EXE's

Read->Comprehend->Think->Post.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 1:59 pm 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4734
Location: In the monkey's litterbox
sudo apt-get install mingw32

"To build for Windows, simply prefix every command with i586-mingw32msvc-"

Source, and more info: http://rooster.stanford.edu/~ben/linux/crosshowto.php

This is a how-to for C++ compiler for LINUX that produces WINDOWS binaries...

It doesn't have IDE integration, but that's ok...


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 2:05 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
smartcat99s wrote:
sudo apt-get install mingw32

http://rooster.stanford.edu/~ben/linux/crosshowto.php

This is a how-to for C++ compiler for LINUX that produces WINDOWS binaries...

It doesn't have IDE integration, but that's ok...


Ha! That's interesting. However, no IDE integration is kind of a bummer. Oh well.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 2:29 pm 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4734
Location: In the monkey's litterbox
DJSPIN80 wrote:
Ha! That's interesting. However, no IDE integration is kind of a bummer. Oh well.


I think that it can be made to work... You just have to specify the compiler in the project methinks...

Anyways, don't you test in linux then only make 1 windows exe?


Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 2:45 pm 
Coppermine
Coppermine

Joined: Wed Jul 07, 2004 11:07 am
Posts: 664
Location: Woodland Hills, CA
Are you serious? Did you bother looking through the site. I've USED minGW and have first hand experience with compiling WINDOWS CODE under a LINUX environment. It compiles windows code UNDER Linux and produces a WIN32 executable. THIS IS EXACTLY WHAT the author of this thread is looking for.

You can download the mingw package. Install it, write a windows program (using the WIN32 API), compile the program, copy the resulting .exe to a windows partition. Reboot into windows, and execute it.

Let me repeat this...I have done this! Many people have done this. It is well known in the compilers community.

Apparently you didn't understand that this mingw works UNDER Linux. It was also ported TO windows, but it's aim is to be a compiler that runs under _Linux_ (as well as other OS) and produce WINDOWS binary executables.

As far as an IDE goes...well...does it matter? Any IDE should do. I coded my Windows program using vim (again...under Linux...Slackware 9.1 to be exact). I'm sure since you think you know it all, you can point him in the direction of IDE's under Linux, I'm sure there are plenty of them.

Once again...you learn something new today.
DJSPIN80 wrote:
Did you read what you posted? He's asking for a LINUX C++ IDE that can compile C++ code to a Windows executable. He wants to write code in Linux C++ IDE and have it produce Windows executable.

I didn't need to learn anything, YOU need to learn something new today, the Ming is a WINDOWS port of GCC.


Last edited by kkith on Fri Aug 26, 2005 3:02 pm, edited 2 times in total.

Top
  Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 5:38 pm 
Thunderbird
Thunderbird

Joined: Sun Jun 19, 2005 12:42 pm
Posts: 862
Location: Omaha, Ne
nano is my IDE. The only good gtk+ based IDE is anjuta and it was absolutely horrible. The canvas can't seem to draw itsellf to save it's life.

Anyway, a suggestion for Belboz99:

Never ask if with linux. Always ask how.

Anyway, if you are a kde user, I think kdevelop has a project that lets you create a project template for a windows executable. :\


Top
  Profile  
 
 Post subject:
PostPosted: Wed Aug 31, 2005 10:41 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11602
Aynjell wrote:
nano is my IDE. The only good gtk+ based IDE is anjuta and it was absolutely horrible. The canvas can't seem to draw itsellf to save it's life.

Anyway, a suggestion for Belboz99:

Never ask if with linux. Always ask how.

Anyway, if you are a kde user, I think kdevelop has a project that lets you create a project template for a windows executable. :\
nano is not an IDE.... (Integrated Development Enviornment, ?)

Nano cannot compile.... it is just a text editor (a nice one at that)

He would still need a compiler... Which is what mingw would be for


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group