Well, that trick did not work so well.

I was forced to finally copy the system library to a common development directory and renaming CoreFoundation -> libCoreFoundation.a and copying the function call
out of CFSet.pas into my own pascal unit file.

Only then did I get the linker to work correctly and finish constructing the binary.

This of course says nothing about all that interface code sitting down in /usr/local/xxx/CFSet.pas, which is part
of the core foundation.

So again, any comments this week from the freepascal team, that would be great.

Cheers,

md


On 5/5/2013 6:31 AM, m...@rpzdesign.com wrote:
I thought of a trick to get around this.

Using XCode, I can build a static library to get me access to the functions that I need.

But that is not really the point, I would like my freepascal environment to be correct and to be able to use the functions contained in interface files like cfset.pas.

Any comment

Cheers,

md

On 5/4/2013 10:20 PM, m...@rpzdesign.com wrote:
Anybody have any success with the included units for
CoreFoundation on Mac OSX.



I was trying to use CFSetGetCount( ) function call, it is clearly defined in CFSet.pas
and yet the linker error is:

Identifier Not Found "CFSetGetCount"

But magically, the constants from CFBase.pas compile OK, so it must
be the compiler directives at the top of CFSET.pas that are preventing
that code from getting included and visible by the compiler.

#################################
program testcfset;

uses
  CFBase, CFSet ;
var
 fcnt : single ;
 ret : integer ;
begin
 fcnt := kCFCoreFoundationVersionNumber10_2 ;
 ret := CFSetGetCount(nil) ;
end.

{  Compiler messages Below:
testcfset.lpr(6,2) Note: Local variable "fcnt" is assigned but never used
testcfset.lpr(7,2) Note: Local variable "ret" is assigned but never used
ld: symbol(s) not found for architecture i386
Undefined symbols for architecture i386:
  "_CFSetGetCount", referenced from:
      _PASCALMAIN in testcfset.o
ld: symbol(s) not found for architecture i386
An error occurred while linking
testcfset.lpr(10,2) Error: Error while linking
testcfset.lpr(10,2) Fatal: There were 1 errors compiling module, stopping
}
##################################

On another project before I built the test project,
I saw these errors:

ld : symbol(s) not found for architecture i386.

Undefined symbols for architecture i386:
"_CFSetGetCount" referenced from : (my code mangled name)

Anybody have a clue how to force the compiler to see and use CFSet.ppu
from inside /usr/local/lib/fpc/2.6.2/

My machine in Mac Mini 2010 with OSX Lion and XCode 4.6.2 Apr 15 with command line tools of same date.

I am working under Lazarus 1.08. All the PPU files are where they should be.

Somebody from the Mac Guru crowd have any comments

Thanks,

md


_______________________________________________
fpc-pascal maillist  -fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to