Skip to content

Build GLVis using gcc under MacOS #264

@JianboLong

Description

@JianboLong

Has anyone successfully built GLVis on MacOS using gcc installed by brew ? Related to a previous issue, it seems there's still troubles building GLVis this way. I wonder if there's any solution ? Please see my comment to that previous issue (#178)

          Hello @ilonster @tzanio  I am having similar troubles in building GLVis 4.2 on MacOS Ventura. For other reasons, I could only build MFEM using gcc, instead of Apple's clang. I am trying to build GLVis using the same compiler and flags, but got SDK related errors (see below).  Any solutions for this ?

g++ -O3 -std=c++11 -I../mfem_build -DGLVIS_MULTISAMPLE=4 -DGLVIS_MS_LINEWIDTH=1.0 -DGLVIS_OGL3 -DGLVIS_USE_LOGO -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DGLVIS_USE_LIBPNG -o lib/sdl_mac.o -c lib/sdl_mac.mm
g++ -O3 -std=c++11 -I../mfem_build -DGLVIS_MULTISAMPLE=4 -DGLVIS_MS_LINEWIDTH=1.0 -DGLVIS_OGL3 -DGLVIS_USE_LOGO -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DGLVIS_USE_LIBPNG -o share/logo.rgba.bin.o -c share/logo.rgba.bin.cpp
lib/sdl_mac.mm:37:4: error: stray '@' in program
37 | @autoreleasepool
| ^
lib/sdl_mac.mm:50:4: error: stray '@' in program
50 | @autoreleasepool
| ^
lib/sdl_mac.mm:82:4: error: stray '@' in program
82 | @autoreleasepool
| ^
lib/sdl_mac.mm:92:4: error: stray '@' in program
92 | @autoreleasepool
| ^
lib/sdl_mac.mm:102:4: error: stray '@' in program
102 | @autoreleasepool
| ^
lib/sdl_mac.mm:113:4: error: stray '@' in program
113 | @autoreleasepool
| ^
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/dispatch/dispatch.h:63,
from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20,
from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17,
from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:66,
from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from lib/sdl_mac.mm:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/os/object.h:206:1: error: expected unqualified-id before 'interface'
206 | OS_OBJECT_DECL_BASE(object, NSObject);
| ^~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/os/workgroup_object.h:49:1: error:expected unqualified-id before 'interface'
49 | OS_WORKGROUP_DECL(os_workgroup, WorkGroup);
| ^~~~~~~~~~~~~~~~~

Originally posted by @JianboLong in #178 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions