PureBasic Forum
http://forums.purebasic.com/english/

Difficulty compiling, possibly related to homebrew gcc?
http://forums.purebasic.com/english/viewtopic.php?f=19&t=72990
Page 1 of 1

Author:  void [ Mon Jun 10, 2019 9:46 am ]
Post subject:  Difficulty compiling, possibly related to homebrew gcc?

Today I decided to work on a gui utility for a personal task, and naturally I thought to use purebasic because it's so much easier to get simple gui applications working than in other languages I deal with.

But when I attempted to compile from a work-in-progress I had open from some months ago, I got this error:

Image

Research suggests it might because I currently have an actual gcc installed via homebrew, due to the need to compile other software (which does not compile correctly with clang).

Is this actually the problem? If so, is there a way to get purebasic to use the tools it expects without having to uninstall the homebrew installed gcc?

If not, what else might be the cause of this?

Author:  mk-soft [ Mon Jun 10, 2019 10:04 am ]
Post subject:  Re: Difficulty compiling, possibly related to homebrew gcc?

I don't known...

Perhaps help
Code:
ImportC "-stdlib=libc++" :EndImport

Or switch tools...
Quote:
xcode-selection

sudo xcode-select -s /Applications/Xcode-91/Contents/Developer/

sudo xcode-select -s /Applications/Xcode/Contents/Developer/

xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools

Author:  void [ Mon Jun 10, 2019 10:12 am ]
Post subject:  Re: Difficulty compiling, possibly related to homebrew gcc?

I already have xcode command line tools installed. I've successfully used purebasic on this computer in the past, just not in the last few months.

The only change I'm aware of that has happened since I last used purebasic is that I've had to install an actual gcc through homebrew in order to get other projects working correctly, but as far as I can tell it appears that with a real gcc in the path purebasic ends up using that rather than what is provided by xcode (which is really clang, and not gcc).

The "Import" line suggested by mk-soft just doubles the error. According to my research, the problem is the specific parameter being passed by purebasic to "gcc" is not actually supported by gcc, only by clang.

Author:  jack [ Mon Jun 10, 2019 5:33 pm ]
Post subject:  Re: Difficulty compiling, possibly related to homebrew gcc?

I suggest that you set the environment variable PATH to something like export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
I have gcc installed and made a link on the desktop to .profile so I can easily make changes if needed.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/