Kevan:
I'm running GPC just fine on 10.7.4. I may have installed on an earlier version of 10.7 and then upgraded. I installed the Mac OS X 10.6 Intel version I found here:
http://www.microbizz.nl/gpc.html
What did you install?
I hadn't installed, but I went to that page and installed from ⢠GNU Pascal 3.4.6u4 installer for Mac OS X 10.6 Intel native and PowerPC cross-compiler15.7 MB)
It SAYS it's supposed to be ONLY for 10.6, but I went ahead anyway on 10.7.
In /Developer/Pascal it installed cleanly and replaced directory gpc346u2 with gpc346u4.
I can now compile:
egg 18% cat h.p program helloworld (output); begin writeln(output,'hello world'); end. egg 19% gpc h.p ld: warning: -macosx_version_min not specified, assuming 10.7 ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in __start from /Developer/SDKs/MacOSX10.5.sdk//usr/lib/crt1.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie egg 20% a.out hello world
Thanks,
Tom
Thomas D. Schneider, Ph.D. Senior Investigator National Institutes of Health National Cancer Institute Frederick National Laboratory for Cancer Research Gene Regulation and Chromosome Biology Laboratory Molecular Information Theory Group Frederick, Maryland 21702-1201 http://alum.mit.edu/www/toms
Dear Thomas,
It SAYS it's supposed to be ONLY for 10.6, but I went ahead anyway on 10.7.
I did the same.
ld: warning: -macosx_version_min not specified, assuming 10.7 ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in __start from /Developer/SDKs/MacOSX10.5.sdk//usr/lib/crt1.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
Ah yes, I forgot about that. I find that I have to specify the run-time library that I want GPC to use, or else the code won't work on older versions of MacOS. When I compile on 10.7 I add the linker option:
-Wl,-syslibroot,/Xcode2.5/SDKs/MacOSX10.4u.sdk/
which of course requires taht you install Xcode2.5 if you don't have it, and include the MacOSX10.4 sdk. I use the 10.4 SDK for backward compatibility with 10.4. When I link Pascal to a C program I use:
-mmacosx-version-min=10.4
Now, I would love to tell you how I installed the MacOSX10.4 SDK but I can't remember. All I remember is that once installed, the SDK worked fine.
Yours, Kevan