• Print

Author Topic: "C++ Compilation failed" message  (Read 2016 times)

GSAC3

  • Newbie
  • *
  • Posts: 38
"C++ Compilation failed" message
« on: February 12, 2010, 10:37:20 AM »
Galleon:

Sorry, I originally uploaded this message to the NON-QB64 section of the forum by mistake.

I downloaded the latest WINDOWS version of QB64 and unzipped on my hard drive.  However, when I try to compile/run any source file, I get the "C++ Compilation failed" message.

I did not have this problem with my earlier .83 version, so I think I must have missed something along the way in setting up the new version.

Can you tell me what I am doing wrong?

Don

Pete

  • Moderator
  • Hero Member
  • *****
  • Posts: 6240
  • Cuz I sez so varmint!
Re: "C++ Compilation failed" message
« Reply #1 on: February 12, 2010, 10:45:33 AM »
Hal 9000: I'm getting tired of chasing you around cyberspace, Don.

I replied to your post in the Non-QB Forum, 2 minutes ago.  ;D

http://www.qb64.net/forum/index.php?topic=752.msg4781#msg4781
« Last Edit: February 12, 2010, 11:30:26 AM by Pete »
It's only rocket science; it's not Linux!

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: "C++ Compilation failed" message
« Reply #2 on: February 12, 2010, 11:02:08 AM »
What OS? Where did you unzip it? You need to move BAS files into the QB64 folder unless you use paths in the IDE. Are you using the IDE? There are now options to auto-indent and capitalize keywords. Are you testing modules that compiled in the older version?

Any info would help,

Ted
« Last Edit: February 12, 2010, 11:26:06 AM by Clippy »
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

GSAC3

  • Newbie
  • *
  • Posts: 38
Re: "C++ Compilation failed" message
« Reply #3 on: February 12, 2010, 11:53:18 AM »
1.  The OS is WINDOWS-XP.
2.  The complete QB64 distribution was unzipped to my hardrive with the as-zipped directory/sub-directory structure in-tact.
3.  The compilation error occurs when I try to run ANY of the QB64 sample files included in the distribution, or for that matter, even when I try to run Pete's CLS one-liner test file, entered via the IDE.
4.  I deleted the older version of QB64 before unzipping the new (yesterday's) version.

Don

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: "C++ Compilation failed" message
« Reply #4 on: February 12, 2010, 12:14:08 PM »
OK, so is there a DATA folder inside of the QB64 folder? I've had no problems on my XP.

I would not unzip the download directly to the C: drive, but try to re-download it again. Previous versions should not cause problems if they are in different folders. I unzip mine to the Basic64 folder I created for example. Sounds like something is missing.

Ted
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

GSAC3

  • Newbie
  • *
  • Posts: 38
Re: "C++ Compilation failed" message
« Reply #5 on: February 12, 2010, 01:33:48 PM »
Clippy:

Yes, DATA folder is present and populated with 5 files.

Will try to download latest version again.  On a dial-up line this takes a little time.

Will let you know what happens.

Thanks for you'r response.

Don

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: "C++ Compilation failed" message
« Reply #6 on: February 12, 2010, 01:55:55 PM »
I just downloaded it somewhere else and it works well for me.  QB64 does not mess with the Windows registry or anything.

Do you have some kind of dowload assist progam to prevent loss of data or connections?  I remember those phone line days! Where I live, you can get DSL for about $20 a month from Verizon. LOT faster PLUS no AOL, lol.
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: "C++ Compilation failed" message
« Reply #7 on: February 12, 2010, 03:43:07 PM »
I'm going to assume everything extracted perfectly in the correct structure and that something else might be the issue.

I want you to create a file in your main QB64 folder called 'cc.bat' with the following content:
Code: [Select]
cd .\internal\c
.\bin\g -w -Wall -I.\i -L.\l qbx.cpp -mwindows -lmingw32 -lq -ln -lmix -limg -lttf -lmn -lSDL -o ..\..\test.exe
cd ..\..
From a command window, navigate to your qb64 folder. Run qb64.exe and create a simple program. Try to run it (you should get C++ compilation failed as you stated). Exit the QB64 IDE back to the command prompt. Run 'cc.bat'. Report what happens next.

EDIT: Does the computer have a 64-bit processor?
« Last Edit: February 12, 2010, 03:52:45 PM by Galleon »
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: "C++ Compilation failed" message
« Reply #8 on: February 12, 2010, 04:08:32 PM »
Furthermore, if you have the time please download the previous version of QB64 and tell me if this works OK: 'Older Version of QB64 (V0.851, released 11th January 2010)'

When I switch the C++ compiler and I get multiple random reports of C++ compilation failure for no obvious reason, I start to smell a rat in the C++ compiler itself.
Something old... Something new... Something borrowed... Something blue...

GSAC3

  • Newbie
  • *
  • Posts: 38
Re: "C++ Compilation failed" message
« Reply #9 on: February 12, 2010, 04:35:34 PM »
Galleon:

I am using the 32 bit version of WINDOWS XP.  The system is an INTEL CORE 2, T7600 cpu @ 2.33 GHZ.

I did exactly as you prescribed, and when I ran CC.BAT, I got a message that says:

         undefined reference to '__strtod'

Don

P.S.  Previously I was using version .840 successfully.

GSAC3

  • Newbie
  • *
  • Posts: 38
Re: "C++ Compilation failed" message
« Reply #10 on: February 12, 2010, 04:50:53 PM »
Galleon:

FYI, I just installed version .851 on my system, and it works fine.
Apparently it uses the cc1plus compiler, which does not seem to be the one you are using in version .860.

Don

Pete

  • Moderator
  • Hero Member
  • *****
  • Posts: 6240
  • Cuz I sez so varmint!
Re: "C++ Compilation failed" message
« Reply #11 on: February 12, 2010, 06:00:27 PM »
I can run the newest compiler version just fine, and I also have a 32-bit XP, XP Home with SP2.

Unless the new C compiler requires some Windows file you don't have, I don't get it.

Pete

It's only rocket science; it's not Linux!

GSAC3

  • Newbie
  • *
  • Posts: 38
Re: "C++ Compilation failed" message
« Reply #12 on: February 12, 2010, 06:22:41 PM »
Galleon:

I have a screen shot of the CC.BAT test on my system that I could send to you, but don't know how to post it on the forum.

Don

Pete

  • Moderator
  • Hero Member
  • *****
  • Posts: 6240
  • Cuz I sez so varmint!
Re: "C++ Compilation failed" message
« Reply #13 on: February 12, 2010, 06:58:03 PM »
This should work...

1) Right click the open .bat window in the top blue field.

2) In the menu that opens, left click edit.

3) In the menu that opens, left click Mark.

4) Hold the left mouse button and drag the mouse cursor over all the text in the window.

5) Let go of the mouse and press the Enter key.

6) Return here, open a reply post, and hold Shift and press Insert to paste the contents of the .bat file window.

---------------

Pete
« Last Edit: February 13, 2010, 10:36:15 AM by Pete »
It's only rocket science; it's not Linux!

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: "C++ Compilation failed" message
« Reply #14 on: February 12, 2010, 10:53:13 PM »
Hi GSAC3,

Please go to the download page (link below) and download QB64 with the Mingw64(32) version:
http://www.qb64.net/forum/index.php?topic=725.0

Let me know how this goes.
Something old... Something new... Something borrowed... Something blue...

  • Print