Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Oct 2014, 03:00
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How can I compile C++ code made in M$ Visual C++ 2008
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
bark_bark_bark

Joined: 05 Jun 2012
Posts: 835
Location: USA

PostPosted: Wed 04 Dec 2013, 16:59    Post_subject:  How can I compile C++ code made in M$ Visual C++ 2008
Sub_title: on Linux
 

I have been taking a high school elective that teaches C++ programming. I have to use the school's computer for all of my classes, which has Windows 7. I want to know if I could compile the little tiny programs I made with GCC. Also how do I modify a program that uses the windows gui, to instead use GTK 2/3 or QT 4/5?
_________________
Desktop: Intel 945PSN Motherboard, 3.2Ghz P-IV "Prescott 2M", 2GB RAM, 500GB WD HDD, Windows 7
(Slacko) Puppy Arcade 11 on USB Stick, Kali Linux 1.0.9a in Vbox.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8344

PostPosted: Wed 04 Dec 2013, 18:12    Post_subject:  

Well I use mingw on linux to cross compile windows programs which is not as awkward as it at first seems. You use the usual dev package to get gcc / make and so on and a mingw package for the win32 build tools. You can test the results in windows or wine.

As for porting to gtk/qt4 that would be a major rewrite though in theory do-able.

mike
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3337
Location: Ontario

PostPosted: Wed 04 Dec 2013, 20:15    Post_subject:  

off topic , but it might be of interest...

For people learning C++ coding there is a free course available at
http://en.wikiversity.org/wiki/C%2B%2B/Introduction

Lesson 1 has the following program

Code:

#include <iostream>
 
using namespace std;
 
int main()
{
   cout << "Hello World!" << endl;
   cin.get();
 
   return 0;
}


Instructions to compile:

I was able to get geany to work in Precise Puppy and Wheezy Puppy
by doing the following....

1 ) Load devx file
2 ) Save the geany text to /root as example.cpp
3 ) Select 'Build' from menu ---> this runs c++ example.cpp -o example
4 ) Select 'Execute' from menu and terminal will launch automatically
and Hello World will show.

________________________________________________
Back to top
View user's profile Send_private_message 
bark_bark_bark

Joined: 05 Jun 2012
Posts: 835
Location: USA

PostPosted: Wed 04 Dec 2013, 20:46    Post_subject:  

mikeb wrote:
Well I use mingw on linux to cross compile windows programs which is not as awkward as it at first seems. You use the usual dev package to get gcc / make and so on and a mingw package for the win32 build tools. You can test the results in windows or wine.


I wanted to compile natively on a linux system.

_________________
Desktop: Intel 945PSN Motherboard, 3.2Ghz P-IV "Prescott 2M", 2GB RAM, 500GB WD HDD, Windows 7
(Slacko) Puppy Arcade 11 on USB Stick, Kali Linux 1.0.9a in Vbox.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0550s ][ Queries: 11 (0.0091s) ][ GZIP on ]