Wikiposts
Search

Notices
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Compiling

Thread Tools
 
Search this Thread
 
Old 14th January 2009 | 15:44
  #1 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
Compiling

Having drawn a 'zero reply' to both my earlier posts about Perl and Javscript (No 1 son sorted that out) I am wondering if there any REAL computer programmers on here? I am seeking help on compiling C++ with Dev-C++ if anyone knows what that is?
BOAC is offline  
Reply
Old 14th January 2009 | 16:48
  #2 (permalink)  
50 Countries Visited
25 Anniversary
 
Joined: Dec 2000
Posts: 320
Likes: 54
From: Northumberland, England
I've not seen much here in that detail, but there are quite a few techie types on the Flyer forums (Non-aviation) - Aviation Forums for pilots - from FLYER Magazine
Tocsin is offline  
Reply
Old 14th January 2009 | 17:50
  #3 (permalink)  


Moderator
 
Joined: Mar 2003
Posts: 2,586
Likes: 0
From: Orlando, Florida
At least you got a reply this time.
Keygrip is offline  
Reply
Old 14th January 2009 | 20:10
  #4 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
Thanks, Tocsin - will check that out. Bunch of Gui-faced mousers you lot, grump grump grump......
BOAC is offline  
Reply
Old 14th January 2009 | 21:35
  #5 (permalink)  


Moderator
 
Joined: Mar 2003
Posts: 2,586
Likes: 0
From: Orlando, Florida
Bunch of Gui-faced mousers
Have to admit - I am a big Disney fan, yesh.

"Hi, my name's keygrip - and I'm a mouse-a-holic".
Keygrip is offline  
Reply
Old 14th January 2009 | 21:49
  #6 (permalink)  
 
Joined: Jun 2006
Posts: 526
Likes: 0
From: BRISTOL!
I have asked C and C++ and maybe even VB questions on here before, and got a reply.

My C and C++ has come on a little since then, so maybe i can reply or help.

Perl is a lost code to me, as i use PHP, even though some coders i know say Perl is better for automation.

I use Dev C++ too, V5 think it is, best freebie compiler i have found, prefer it to C++ Express.
planecrazy.eu is offline  
Reply
Old 14th January 2009 | 22:52
  #7 (permalink)  

Official PPRuNe Chaplain
 
Joined: Apr 2001
Posts: 3,498
Likes: 0
From: Witnesham, Suffolk
I'm too lazy to mess with Perl and all that C+/- stuff.

Which is another way of saying I'm not clever enough, either. I did write an enormous machine code program years ago to send and receive radio teleprinter using a BBC "B" (so you can tell how long ago that was). It worked, too. I had about ten contacts using it and decided I prefer to talk to people rather than type at them (reprise: how long ago...)
Keef is offline  
Reply
Old 15th January 2009 | 00:17
  #8 (permalink)  
bnt
15 Anniversary
 
Joined: Feb 2007
Posts: 755
Likes: 26
From: Dublin, Ireland. (No, I just live here.)
Caution: I'm not a "real programmer", and I never learned C/C++, but I have compiled code successfully. I've had a look at the Dev-C++ website, and have a fairly good handle on what it is.

First of all: you don't need Dev-C++ at all to simply compile code: it's a development package (code editor etc.), not a compiler. It calls a separate compiler (gcc), which you need to get from somewhere: the website says that a Mingw32 environment (which I don't know) is bundled in the package - and I presume that includes gcc - fine by me if it works.

The website also mentions Cygwin, which I have used before to compile code I've downloaded. Cygwin is a complete UNIX shell for Windows, where you can install the bits you need, including gcc and other compilation programs, pretty easily. (Also great for learning UNIX commands before you try e.g. Linux.)

Whether that's your solution or not depends depends on what you're working with: are you trying to compile a program you wrote, or is it a package of code that you downloaded from somewhere? The reason I ask is that the compilation process is usually controlled by a "Makefile", sometimes with a configuration step before that. If you don't have a Makefile supplied, it looks like Dev-C++ has some way of creating one or helping you do so. In a typical compilation session, you don't actually compile the whole program at once, but lots of code modules which are "linked" to create the final program, and the Makefile automates this process.

If it's a downloaded code package, it should come with instructions in an INSTALL file or README. It might give you a sequence of commands to run, such as the following example:
open a command window, change to code directory
./configure (configuration step - not always required)
make (compiles the code - may take some time)
make install (installs the compiled program)

Configure or Make might stop, complaining that it can't find some library or command, so you have to find and install that bit - the requirements are usually in the code documentation.
Or, if you do it inside Dev-C++, it probably has some configuration dialogs where it asks you where to find the required bits - but the effect is the same. For all that compilation to work, all the required bits need to be findable i.e. the "path" must be set up to point to the various locations: the compilation programs (make, gcc, etc.), standard libraries, and any libraries required by that specific program.

It might just be easier for you to compile the code from the Mingw32 or Cygwin command shell directly, not from inside Dev-C++ - especially if it's a package you downloaded, not created in Dev-C++. And if you're none-the-wiser after all that, well, it's a bit hard to tell just what you need from that question..!

Last edited by bnt; 15th January 2009 at 00:52.
bnt is offline  
Reply
Old 15th January 2009 | 07:45
  #9 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
Thanks all for the responses. I take back all the oooi-gui nasty stuff I said.....

My problem was:

Trying to get 'into' C from scratch as a cross-platform language, needing to complie to check progress and unable to get Dev-C to compile a simple prog written with a C++Gui module (damn - I've admitted it...). 'Normal' C code compiling seems to be hacked at an elementary level for me.

I find all the 'traditional' command line stuff like 'makefile' etc a total black hole at the moment, so was looking for a Windows interface (shame on me) to get going. I'll take a breather for now, thanks, as I have just discovered a new 'beta' called QTCreator which appears to do the whole lot in a oner.
BOAC is offline  
Reply
Old 15th January 2009 | 10:12
  #10 (permalink)  
 
Joined: Nov 2000
Posts: 3,443
Likes: 1
From: Cambridge, England, EU
I am wondering if there any REAL computer programmers on here?
Yes. Been using C and C++ professionally since each was invented.

But you wouldn't like my rates, I suspect.
Gertrude the Wombat is offline  
Reply
Old 15th January 2009 | 10:25
  #11 (permalink)  
bnt
15 Anniversary
 
Joined: Feb 2007
Posts: 755
Likes: 26
From: Dublin, Ireland. (No, I just live here.)
OK, so you're talking about compiling a program that you've written yourself. You don't say what happens when you try to compile it, just that you can't compile it, so it's hard to know what to suggest. If we assume that Dev-C++ is configured correctly, and all the bits are in their places, then could it be the program itself?

(As a general rule, if you ask for tech support of any kind, always describe what is happening, not what isn't happening!)

Last edited by bnt; 15th January 2009 at 10:38.
bnt is offline  
Reply
Old 15th January 2009 | 11:14
  #12 (permalink)  
bnt
15 Anniversary
 
Joined: Feb 2007
Posts: 755
Likes: 26
From: Dublin, Ireland. (No, I just live here.)
I just fired up the old Windows box and did the following:
- installed Dev-C++ v4.992, the Full package with the gcc compiler etc. Default settings, including creating the header cache.
- Ran it, created a new Windows Application project (in its own directory). The project already contains the basic code you need to create a Windows application.
- compiled it (Ctrl-F9), saving main.cpp in the process, without touching the code at all. No errors.
- ran it (Ctrl-F10): a blank "Windows App" with nothing in the window, which was pretty much what I expected.

See what I did there? I tested the basic installation of Dev-C++, one thing at a time, and described what happened. It shows that, in my case, it's installed and configured correctly. So, since all that works for me, then I can be pretty sure that problems I have later are not Dev-C++, or the compilation process, but in the code I write. At that point, I start looking for a Real Programmer...
bnt is offline  
Reply
Old 15th January 2009 | 11:48
  #13 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
bnt - the post was my putting my toe in the water, since there had been no response to the previous enqs. hence the lack of info. I'm fairly sure no-one would want the 502 errors posted here.

The issue is using QTGUI with Dev-c to produce a GUI programme. I am certain it is the Dev set up too - it is knowing what to change that is the problem. Anyway - I'm playing with 'Creator' and it looks easier!
BOAC is offline  
Reply
Old 15th January 2009 | 12:35
  #14 (permalink)  
 
Joined: Jun 2001
Posts: 530
Likes: 0
From: Island of Aphrodite
BOAC,

You are a (ex) pilot. Leave all this programming stuff to the experts!!!!!! and get them (or a clever son) to do all that tricky stuff.

Keep well and enjoy your second retirement.

BD
beerdrinker is offline  
Reply
Old 15th January 2009 | 16:23
  #15 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
Cheers, BD!
or a clever son
- aha - now there's a problem...

Still, got to keep the old cells active - don't want to get into golfing.....
BOAC is offline  
Reply
Old 15th January 2009 | 18:52
  #16 (permalink)  


Moderator
 
Joined: Mar 2003
Posts: 2,586
Likes: 0
From: Orlando, Florida
Bunch of Gui-faced mousers
to produce a GUI programme
"Do as I say, not as...."

Keygrip is offline  
Reply
Old 15th January 2009 | 20:37
  #17 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
Originally Posted by kg
"Do as I say, not as...."
Originally Posted by BOAC
to compile a simple prog written with a C++Gui module (damn - I've admitted it...).
-'nuff sed?
BOAC is offline  
Reply
Old 15th January 2009 | 22:08
  #18 (permalink)  
 
Joined: Feb 2003
Posts: 144
Likes: 0
From: Scotland
There seems to be some uncertainty over the language is it C or C++? The compiler for one will not compile the other.
cdtaylor_nats is offline  
Reply
Old 15th January 2009 | 22:21
  #19 (permalink)  
Thread Starter
Per Ardua ad Astraeus
 
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
C++, CD - just saving typing. Widgets are QT
BOAC is offline  
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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.