How can I compile C++ code made in M$ Visual C++ 2008

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
bark_bark_bark
Posts: 1885
Joined: Tue 05 Jun 2012, 12:17
Location: Wisconsin USA

How can I compile C++ code made in M$ Visual C++ 2008

#1 Post by bark_bark_bark »

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?
....

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

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

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#3 Post by don570 »

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: Select all

#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.

________________________________________________

bark_bark_bark
Posts: 1885
Joined: Tue 05 Jun 2012, 12:17
Location: Wisconsin USA

#4 Post by bark_bark_bark »

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.
....

Post Reply