Re: dev environment setup and usage
Posted by ravas on Feb 07, 2016; 5:57pm
URL: https://forum.librecad.org/dev-environment-setup-and-usage-tp5712883p5712915.html
Adding GCC into the process seems like an unnecessary complication for OSX.
By default Qt creator is set up to use Clang, and as far as I understand it LLVM.
It builds fine... it just outputs a lot more warnings than gcc.
These can be suppressed by adding to src.pro:
QMAKE_CXXFLAGS_WARN_ON = -w
or just one of the big offenders
QMAKE_CXXFLAGS_WARN_ON = -Wno-inconsistent-missing-override
Although, it's probably smart not to commit those, incase someone is inspired to deal with the 50k issues.
The issue is that on start up 4 dialogs are presented that say:
'/Users/one/Documents/LibreCAD/plugins/Makefile' is not a valid Mach-O binary (invalid magic 23232323)
'/Users/one/Documents/LibreCAD/plugins/plugins.pro' is not a valid Mach-O binary (invalid magic 232d2d2d)
'/Users/one/Documents/LibreCAD/plugins/plugins.sln' is not a valid Mach-O binary (invalid magic 4d696372)
'/Users/one/Documents/LibreCAD/plugins/README.plugins' is not a valid Mach-O binary (invalid magic 46697273)
Any idea why this would be happening? The program successfully loads after dismissing these dialogs.
I don't even understand why these would be processed as Mach-O binaries, or where.
I did try compiling with gcc; however it always complained about unique_ptr not being part of std,
which I guess has something to do with c++11...
My research showed suggestions for:
# QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
# QMAKE_CXXFLAGS += -mmacosx-version-min=10.7
# QMAKE_CFLAGS += -mmacosx-version-min=10.7
# QMAKE_MAC_SDK = macosx10.11
# QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++
# QMAKE_CFLAGS += -std=c++11 -stdlib=libc++
# CONFIG += c++11
Although various tweaking of the values never solved the issue.