Xcode problem

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, I need to do this the Unix way since I'm running out of non-Unix ways to do this. Open up a Terminal (/Applications/Utilities) and type in the following:
Code:
sudo find / -name llvm-g++* -print
Enter your password and let that finish. When it's done, copy and paste the results here.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
Done that, these are the results
Password:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/share/man/man1/llvm-g++.1.gz
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2
/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2
/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/share/man/man1/llvm-g++.1.gz
/Applications/Xcode.app/Contents/Developer/usr/share/man/man1/llvm-g++.1.gz
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/share/man/man1/llvm-g++.1.gz
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/usr/bin/llvm-g++
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/usr/bin/llvm-g++-4.2
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/usr/llvm-gcc-4.2/share/man/man1/llvm-g++.1.gz
/Users/antonyfryer/.Trash/Xcode 14.58.14.app/Contents/Developer/usr/share/man/man1/llvm-g++.1.gz
/Users/antonyfryer/.Trash/Xcode.app/Contents/Developer/usr/bin/llvm-g++
/Users/antonyfryer/.Trash/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2
/Users/antonyfryer/.Trash/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2
/Users/antonyfryer/.Trash/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/share/man/man1/llvm-g++.1.gz
/Users/antonyfryer/.Trash/Xcode.app/Contents/Developer/usr/share/man/man1/llvm-g++.1.gz
Antonys-iMac:~ antonyfryer$
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
From looking at the output above i have found g++. What I was failing to do was right click on the Xcode icon which gives an option to "show package contents" so at least I now know that it is there. Now I have to get the QB64 setup program to find it.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
The files I have found i.e. llvm-c++-4.2, llvm-cpp-4.2, llvm-g++-4.2, and llvm-gcc-4.2 are Unix executable files and are in the folder
Applications
Xcode
Contents
Developer
usr
llvm-gcc-4.2
bin

The Xcode is not the normal blue folder icon, it is the Xcode application shortcut and it is by right clicking this and selecting "show package contents" that you get to see the sub folders within it.

I have tried entering these file names at the Terminal $ prompt and get the result "command not found". I have also copied one of them to the desktop and still get the same result in Terminal. How can I get Terminal and the QB64 setup program to "see" these files please?
 

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)
Execute each of the following two commands:
Code:
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 /usr/bin/gcc
Code:
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2 /usr/bin/g++
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
Done that but when I run the setup program I am still getting "g++: command not found".
 

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)
Instead of using "g++", use the full path: /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
I put the full path name into the Setup file, ran it, and got the message I should have been getting all along i.e. "no input files". I thought "Great - I have made some real progress" but then I got subsequent error messages of the "g++ command not found" type elsewhere in the setup programme. and also some messages like "./freetype build A - dete ct:No such file or directory".
I put the full pathname in for g++ throughout the programme, ran Setup again and got hundreds of error messages of different types. I have reported this on the QB64 forum but if I don't get any help from that source I think I will give up. Thankyou four your efforts on my behalf anyway - at least I have learnt a bit more about Terminal etc.
 

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)
You'll get the g++ error message elsewhere because "g++" isn't in your path. This is what the symlinking above (the "sudo ln -s" commands) was supposed to accomplish (yes, I realize that this doesn't add the binaries to the path but it creates a symlink in the path). If you execute the linking commands above, do you have a /usr/bin/g++? You should.
 

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)
That should solve the problem then so I'm not sure why it's saying that g++ isn't found. The only explanation that I can think of is that the configure step (or install script) is looking for g++ outside of /usr/bin/.

When I get home, I'm going to try and build this.
 
OP
L
Joined
Feb 29, 2012
Messages
20
Reaction score
0
Points
1
At last my problem has been solved so I thought I would drag this thread up again to properly finalise it so to speak. It seems that the cause of the problem was that the most recent release of Xcode is downloaded as an App rather than a normal software download. In order to get the QB64 setup program to run it is necessary to open Xcode and install the command line tools. The setup then works fine.

If any Mac users want to try programming in Basic then I would recommend QB64. It is essentially the old Qbasic that used to be bundled in with MS-DOS but it has been updated and some extra functionality added. It is perfectly free.

Thanks again for all your help.
 

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