Xcode problem

Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
Hi. I got my first Apple product (an iMac) a few days ago. I used to run a version of the BASIC programming language called QB64 on my PC and have now downloaded the Mac version. It is in my Downloads folder and the setup and start programs (Terminal shell script files) are also in my Developer folder. To run this software I have had to also install Xcode. I seem to have done this successfully in that I get a "welcome to Xcode" screen when I launch it although I do not know where Xcode is sitting on my computer. All I can find in Finder are aliases in the Downloads, Applications, and Documents folders.

When I run the QB64 setup program a Terminal window appears. This contains a message “g++: command not found” which effectively causes the setup process to fail. If I enter g++ at the prompt in Terminal I get the same message whereas I understand that I should get a message reading “g++ no input files” or similar.

Any ideas as to how I can fix this please? Thanks.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Welcome to the Mac Forums.

Hang on for a bit until one our members who is into development can lend you a hand with QBasic.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
g++, the C++ compiler for GCC, is installed as part of the Xcode developer tools. It's possible that the symlinks weren't created properly so let's take a look.

Take a look in /Developer/usr/bin. Do you see g++ there? It should be there but the icon should have an arrow in the bottom left hand corner. This is because it's actually a link to /Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
I do not have a usr/bin that shows up in Developer using Finder. I have listed everything that shows up in Finder below. I am not familiar at all with Unix but have tried entering cd /developer at the Terminal prompt & got a "no such file or directory"message. I should have said that I am using OS X 10.7.3 and Xcode version 4.3.

qb64_start.command
recompile.command
setup.command
recompile.command
common.cpp
libqbx.cpp
qbx.cpp
myip.cpp
mtri1.cpp
mtri1s.cpp
mtri1t.cpp
mtri1ts.cpp
mtri2.cpp
mtri2s.cpp
mtri2t.cpp
mtri2ts.cpp
mtri3.cpp
mtri3s.cpp
mtri3t.cpp
mtri3ts.cpp
mtri4.cpp
mtri4s.cpp
mtri4t.cpp
mtri4ts.cpp
freetype_buildB_detect.cpp
freetype_buildA_detect.cpp
begin_code.h
close_code.h
InfoPlist.strings
InfoPlist.strings
mikmod.h
mikmod.h
MPEG.h
MPEG.h
MPEGaction.h
MPEGaction.h
MPEGaudio.h
MPEGaudio.h
MPEGerror.h
MPEGerror.h
MPEGfilter.h
MPEGfilter.h
MPEGlist.h
MPEGlist.h
MPEGring.h
MPEGring.h
MPEGstream.h
MPEGstream.h
MPEGsystem.h
MPEGsystem.h
MPEGvideo.h
MPEGvideo.h
SDL_active.h
SDL_audio.h
SDL_byteorder.h
SDL_cdrom.h
SDL_config_dreamcast.h
SDL_config_macos.h
SDL_config_macosx.h
SDL_config_os2.h
SDL_config_win32.h
SDL_config.h
SDL_copying.h
SDL_cpuinfo.h
SDL_endian.h
SDL_error.h
SDL_events.h
SDL_getenv.h
SDL_image.h
SDL_joystick.h
SDL_keyboard.h
SDL_keysym.h
SDL_loadso.h
SDL_main.h
SDL_mixer.h
SDL_mouse.h
SDL_mutex.h
SDL_name.h
SDL_net.h
SDL_opengl.h
SDL_platform.h
SDL_quit.h
SDL_rwops.h
SDL_stdinc.h
SDL_syswm.h
SDL_thread.h
SDL_timer.h
SDL_ttf.h
SDL_types.h
SDL_version.h
SDL_video.h
SDL.h
smpeg.h
smpeg.h
makelib.command
sfb2 guide part - a.html
sfb2 guide part - b.html
hgm30e.exe
bdv11readme.html
msbin.c
SDL_image.h
mikmod.h
MPEG.h
MPEGaction.h
MPEGaudio.h
MPEGerror.h
MPEGfilter.h
MPEGlist.h
MPEGring.h
MPEGstream.h
MPEGsystem.h
MPEGvideo.h
SDL_mixer.h
smpeg.h
begin_code.h
close_code.h
SDL_active.h
SDL_audio.h
SDL_byteorder.h
SDL_cdrom.h
SDL_config_dreamcast.h
SDL_config_macos.h
SDL_config_macosx.h
SDL_config_os2.h
SDL_config_win32.h
SDL_config.h
SDL_copying.h
SDL_cpuinfo.h
SDL_endian.h
SDL_error.h
SDL_events.h
SDL_getenv.h
SDL_joystick.h
SDL_keyboard.h
SDL_keysym.h
SDL_loadso.h
SDL_main.h
SDL_mouse.h
SDL_mutex.h
SDL_name.h
SDL_opengl.h
SDL_platform.h
SDL_quit.h
SDL_rwops.h
SDL_stdinc.h
SDL_syswm.h
SDL_thread.h
SDL_timer.h
SDL_types.h
SDL_version.h
SDL_video.h
SDL.h
SDLMain.h
SDLMain.h
SDLMain.m
SDLMain.m
SDL_ttf.h
SDL_net.h
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I am not familiar at all with Unix but have tried entering cd /developer at the Terminal prompt & got a "no such file or directory"message.
Unix is case sensitive - that should be /Developer.

Use Finder for this - open up "Macintosh HD" (unless you've renamed it in which case go to your HD) > Developer > usr > bin. If you don't have a usr folder in Developer, something went terribly wrong with your Xcode install.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
Using Finder and selecting "This Mac" which I guess is equivalent to Mackintosh HD I get three sections - the first called Applications which has the Xcode picture in (a hammer on a blue square), the second called Developer which has the QB64 setup script file and various other files that were last opened before I got the iMac, and the third called Documents which has a few text and Pages files.

Adding > usr to the search cuts the results down to one file (an HTML document).
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If you're using the newest version of Xcode, the command line tools are not installed. Take a look at this.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
I have checked an I'm definitely on version 4.3. Do you think I should try and re-install it?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Yes, you probably should. The symlinks should be setup during install but I've seen them get screwed up before.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
I have downloaded Xcode again and the results seem to be the same. Using the Finder to search for Developer gives the following:

Applications:
Xcode

Developer:
setup.command
information_for_developers.html
mp3_export_options.html
scripting.html
simplifying_audacity.html
customization.html
index.html
effect_menu.html
index.html
SDL_video.h
arqanoid.bas
SDL_video.h

I have tried running the QB64 setup programme again and I am still getting the g++ command not found message.

If you have any other ideas I would be very grateful otherwise I might leave it until Xcode version 4.4 is available and try again.

Incidentally I got rid of the existing Xcode on my machine just by dragging it to the Trash Can. Is this OK?
Thanks for your help.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Incidentally I got rid of the existing Xcode on my machine just by dragging it to the Trash Can. Is this OK?
Thanks for your help.
No, Xcode has an uninstaller. You can find it here: /Developer/Library/uninstall-devtools.

Something is going very wrong with the Xcode installer if you don't have a Developer folder in your root directory (/ or "Macintosh HD"). The only time it wouldn't be there would be if you chose a different installation path but you'd know if you did that. I'm not sure what those files are that you've listed - what directory does it say those files are in?
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
When I search "This Mac" there are files listed under Developer i.e. Setup and those others listed in my earlier post but Xcode is listed under Applications.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Where is this "Developer" folder listed? If you go to "Macintosh HD", is it listed there? If so, what's in that folder?
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
When I click on the Finder icon I first get a window that lists "Favorites" in the left hand column. This list includes All My Files, Airdrop, Applications, Desktop, Downloads, Documents, Movies, Music and Pictures (but no Developer).

When I click in the Search box and enter any letter a new bar appears at the top which has two choices "This Mac" and "All My Files".

If I select "This Mac" and enter "Xcode"in the Search box then I get three headings (I am not sure if these headings are supposed to represent folders or not). The first heading is Applications and under this is shown one item which is the Xcode application. The second heading is Developer and under this is one item which is the setup command (a Terminal shell script). The third heading is Documents and under this there are a few Pages and text files.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Open up Finder, push Command-Shift-G and enter "/" (without the quotes). You should now see the Developer folder. In that folder should be a "usr" folder which itself contains a "bin" folder.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
I entered the "/" and the label at the top of the Finder window now says "Mackintosh HD".
The only things listed are four folders i.e. Applications, Library, System, and Users. There is also an Alias called "User guides and Information". I have hd a quick look through these four folders but did not see any sub folders called use or bin.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Ok, that's the directory I was referring to above. So, the Developer folder isn't there which means, unless you changed the default location, the Xcode tools were not installed properly. When you run the installer, does it complete successfully?
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
It seems to install OK. I have the icon (blue square with a hammer) and when I open it I get the Welcome page and the other subsequent options all seem to be working.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I have no idea where it's installing to and until I know that, we can't fix this problem. Using Spotlight, search for Xcode. When it show up as a result, move your mouse over it and push & hold the option and command keys. At the bottom of the preview window should be a path bar (showing where it's located). What does it say there?
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
I've done that (I take it the options key is the one next to the Command key that shows "alt" and 2 horizontal lines). Anyway the answer is Applications.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top