[fpc-pascal] Linking FPC units with Visual Studio 2013 projects
    Tobias Giesen 
    tobiasgiesen at gmail.com
       
    Fri Aug 21 09:36:02 CEST 2015
    
    
  
Hello,
yes, to interface between Pascal and C I use 'extern "C"'. I do not have 
any problems linking between my C code and the Pascal code.
The only problem is that the Pascal RTL uses DLL imports, which the 
Microsoft linker cannot resolve, for example:
unresolved external symbol _$dll$kernel32$Sleep
So again the question is how to enable the Microsoft linker to resolve
the DLL dependencies.
Cheers,
Tobias
> On 08/20/2015 12:27 PM, tobiasgiesen at gmail.com wrote:
> > Hello,
> >
> > I have to compile a few Pascal units with FPC and add them to a Visual
> > C++ project.
> As the object structure (and supposedly the naming scheme for overloaded  functions) is different in fpc and C++ you can't link them (neither statically nor dynamically).
> 
> You need to do  a "flat" interface between the parts of the project using e.,g. STDCALL on either site.
> 
> -Michael
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
    
    
More information about the fpc-pascal
mailing list