I'm porting the CEF4Delfi library to Borland C++Builder 5. I make a BPL package from the ported CEF4Delfi source and reference it from my C++Builder 5 code.
I work on Windows 10 64bit.
While porting, I'm stuck on importing DLL functions.
Here is part of the imports:
const
Kernel32DLL = 'kernel32.dll';
SHLWAPIDLL = 'shlwapi.dll';
NTDLL = 'ntdll.dll';
User32DLL = 'User32.dll';
function ProcessUnderWow64(hProcess: THandle; Wow64Process: PBOOL): BOOL; stdcall; external Kernel32DLL name 'IsWow64Process';
function PathIsRelativeAnsi(pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsRelativeA';
function PathIsRelativeUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsRelativeW';
function GetGlobalMemoryStatusEx(lpBuffer: LPMEMORYSTATUSEX): BOOL; stdcall; external Kernel32DLL name 'GlobalMemoryStatusEx';
function PathCanonicalizeAnsi(pszBuf: LPSTR; pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathCanonicalizeA';
function PathCanonicalizeUnicode(pszBuf: LPWSTR; pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathCanonicalizeW';
function PathIsUNCAnsi(pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsUNCA';
function PathIsUNCUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsUNCW';
function PathIsURLAnsi(pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsURLA';
function PathIsURLUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsURLW';
function ShutdownBlockReasonCreate(hWnd: HWND; Reason: LPCWSTR): Bool; stdcall; external User32DLL;
function ShutdownBlockReasonDestroy(hWnd: HWND): Bool; stdcall; external User32DLL;
Due the linking, I get errors such as:
Error: Unresolved external 'PathIsRelativeA' referenced from C:\REPOS\CEF4DELPHI\SOURCE\UCEFMISCFUNCTIONS.OBJ
Error: Unresolved external 'AlphaBlend' referenced from C:\REPOS\CEF4DELPHI\SOURCE\UCEFBUFFERPANEL.OBJ
Error: Unresolved external 'IsWow64Process' referenced from C:\REPOS\CEF4DELPHI\SOURCE\UCEFMISCFUNCTIONS.OBJ
Here is the temporary MAKE0000.@@@ linking file from C++Builder:
-D"" -aa -Tpp -x -Gn -Gl -Gi -v -L..\source;..\packages;..\packages\res;..\addons;..\winlib;c:\windows\system32;L:\Lib;T:\bin\..\lib\obj;T:\bin\..\lib; +
c0pkg32.obj vcl50.bpi Memmgr.Lib sysinit.obj ..\addons\MaxiSysUtils.obj ..\source\uCEFAccessibilityHandler.obj ..\source\uCEFApp.obj ..\source\uCEFApplication.obj ..\source\uCEFApplicationCore.obj ..\source\uCEFAudioHandler.obj ..\source\uCEFAuthCallback.obj ..\source\uCEFBaseRefCounted.obj ..\source\uCEFBaseScopedWrapper.obj ..\source\uCEFBeforeDownloadCallback.obj ..\source\uCEFBinaryValue.obj ..\source\uCEFBitmapBitBuffer.obj ..\source\uCEFBoxLayout.obj ..\source\uCEFBrowser.obj ..\source\uCEFBrowserProcessHandler.obj ..\source\uCEFBrowserView.obj ..\source\uCEFBrowserViewComponent.obj ..\source\uCEFBrowserViewDelegate.obj ..\source\uCEFBufferPanel.obj ..\source\uCEFButton.obj ..\source\uCEFButtonComponent.obj ..\source\uCEFButtonDelegate.obj ..\source\uCEFCallback.obj ..\source\uCEFChromium.obj ..\source\uCEFChromiumCore.obj ..\source\uCEFChromiumEvents.obj ..\source\uCEFChromiumFontOptions.obj ..\source\uCEFChromiumOptions.obj ..\source\uCEFChromiumWindow.obj ..\source\uCEFClient.obj ..\source\uCEFCommandLine.obj ..\source\uCEFCompletionCallback.obj ..\source\uCEFConstants.obj ..\source\uCEFContextMenuHandler.obj ..\source\uCEFContextMenuParams.obj ..\source\uCEFCookieAccessFilter.obj ..\source\uCEFCookieManager.obj ..\source\uCEFCookieVisitor.obj ..\source\uCEFCustomStreamReader.obj ..\source\uCEFDeleteCookiesCallback.obj ..\source\uCEFDevToolsMessageObserver.obj ..\source\uCEFDialogHandler.obj ..\source\uCEFDictionaryValue.obj ..\source\uCEFDisplay.obj ..\source\uCEFDisplayHandler.obj ..\source\uCEFDomDocument.obj ..\source\uCEFDomNode.obj ..\source\uCEFDomVisitor.obj ..\source\uCEFDownLoadItem.obj ..\source\uCEFDownloadHandler.obj ..\source\uCEFDownloadImageCallBack.obj ..\source\uCEFDownloadItemCallback.obj ..\source\uCEFDragAndDropMgr.obj ..\source\uCEFDragData.obj ..\source\uCEFDragHandler.obj ..\source\uCEFEndTracingCallback.obj ..\source\uCEFExtension.obj ..\source\uCEFExtensionHandler.obj ..\source\uCEFFileDialogCallback.obj ..\source\uCEFFillLayout.obj ..\source\uCEFFindHandler.obj ..\source\uCEFFocusHandler.obj ..\source\uCEFFrame.obj ..\source\uCEFFrameHandler.obj ..\source\uCEFGetExtensionResourceCallback.obj ..\source\uCEFImage.obj ..\source\uCEFInterfaces.obj ..\source\uCEFJsDialogCallback.obj ..\source\uCEFJsDialogHandler.obj ..\source\uCEFJson.obj ..\source\uCEFKeyboardHandler.obj ..\source\uCEFLabelButton.obj ..\source\uCEFLabelButtonComponent.obj ..\source\uCEFLayout.obj ..\source\uCEFLibFunctions.obj ..\source\uCEFLifeSpanHandler.obj ..\source\uCEFLinkedWinControlBase.obj ..\source\uCEFLinkedWindowParent.obj ..\source\uCEFListValue.obj ..\source\uCEFLoadHandler.obj ..\source\uCEFMediaObserver.obj ..\source\uCEFMediaRoute.obj ..\source\uCEFMediaRouteCreateCallback.obj ..\source\uCEFMediaRouter.obj ..\source\uCEFMediaSink.obj ..\source\uCEFMediaSinkDeviceInfoCallback.obj ..\source\uCEFMediaSource.obj ..\source\uCEFMenuButton.obj ..\source\uCEFMenuButtonComponent.obj ..\source\uCEFMenuButtonDelegate.obj ..\source\uCEFMenuButtonPressedLock.obj ..\source\uCEFMenuModel.obj ..\source\uCEFMenuModelDelegate.obj ..\source\uCEFMiscFunctions.obj ..\source\uCEFNavigationEntry.obj ..\source\uCEFNavigationEntryVisitor.obj ..\source\uCEFOAuth2Helper.obj ..\source\uCEFOLEDragAndDrop.obj ..\source\uCEFOSRIMEHandler.obj ..\source\uCEFOverlayController.obj ..\source\uCEFPDFPrintCallback.obj ..\source\uCEFPDFPrintOptions.obj ..\source\uCEFPanel.obj ..\source\uCEFPanelComponent.obj ..\source\uCEFPanelDelegate.obj ..\source\uCEFPostData.obj ..\source\uCEFPostDataElement.obj ..\source\uCEFPrintDialogCallback.obj ..\source\uCEFPrintHandler.obj ..\source\uCEFPrintJobCallback.obj ..\source\uCEFPrintSettings.obj ..\source\uCEFProcessMessage.obj ..\source\uCEFRegistration.obj ..\source\uCEFRenderHandler.obj ..\source\uCEFRenderProcessHandler.obj ..\source\uCEFRequest.obj ..\source\uCEFRequestContext.obj ..\source\uCEFRequestContextHandler.obj ..\source\uCEFRequestHandler.obj ..\source\uCEFResolveCallback.obj ..\source\uCEFResourceBundle.obj ..\source\uCEFResourceBundleHandler.obj ..\source\uCEFResourceHandler.obj ..\source\uCEFResourceReadCallback.obj ..\source\uCEFResourceRequestHandler.obj ..\source\uCEFResourceSkipCallback.obj ..\source\uCEFResponse.obj ..\source\uCEFResponseFilter.obj ..\source\uCEFRunContextMenuCallback.obj ..\source\uCEFRunFileDialogCallback.obj ..\source\uCEFSSLStatus.obj ..\source\uCEFSchemeHandlerFactory.obj ..\source\uCEFSchemeRegistrar.obj ..\source\uCEFScrollView.obj ..\source\uCEFScrollViewComponent.obj ..\source\uCEFSelectClientCertificateCallback.obj ..\source\uCEFSentinel.obj ..\source\uCEFServer.obj ..\source\uCEFServerComponent.obj ..\source\uCEFServerEvents.obj ..\source\uCEFServerHandler.obj ..\source\uCEFSetCookieCallback.obj ..\source\uCEFSslInfo.obj ..\source\uCEFStreamReader.obj ..\source\uCEFStreamWriter.obj ..\source\uCEFStringList.obj ..\source\uCEFStringMap.obj ..\source\uCEFStringMultimap.obj ..\source\uCEFStringVisitor.obj ..\source\uCEFTask.obj ..\source\uCEFTaskRunner.obj ..\source\uCEFTextfield.obj ..\source\uCEFTextfieldComponent.obj ..\source\uCEFTextfieldDelegate.obj ..\source\uCEFThread.obj ..\source\uCEFTimerWorkScheduler.obj ..\source\uCEFTypes.obj ..\source\uCEFUrlRequest.obj ..\source\uCEFUrlRequestClientComponent.obj ..\source\uCEFUrlRequestClientEvents.obj ..\source\uCEFUrlrequestClient.obj ..\source\uCEFValue.obj ..\source\uCEFView.obj ..\source\uCEFViewComponent.obj ..\source\uCEFViewDelegate.obj ..\source\uCEFViewsFrameworkEvents.obj ..\source\uCEFWaitableEvent.obj ..\source\uCEFWebPluginInfo.obj ..\source\uCEFWebPluginInfoVisitor.obj ..\source\uCEFWebPluginUnstableCallback.obj ..\source\uCEFWinControl.obj ..\source\uCEFWindow.obj ..\source\uCEFWindowComponent.obj ..\source\uCEFWindowDelegate.obj ..\source\uCEFWindowParent.obj ..\source\uCEFWorkScheduler.obj ..\source\uCEFWorkSchedulerQueueThread.obj ..\source\uCEFWorkSchedulerThread.obj ..\source\uCEFWriteHandler.obj ..\source\uCEFX509CertPrincipal.obj ..\source\uCEFX509Certificate.obj ..\source\uCEFXmlReader.obj ..\source\uCEFZipReader.obj ..\source\uCEFv8Accessor.obj ..\source\uCEFv8ArrayBufferReleaseCallback.obj ..\source\uCEFv8Context.obj ..\source\uCEFv8Exception.obj ..\source\uCEFv8Handler.obj ..\source\uCEFv8Interceptor.obj ..\source\uCEFv8StackFrame.obj ..\source\uCEFv8StackTrace.obj ..\source\uCEFv8Value.obj ..\packages\CEF4Delphi_Register.obj maxicef.obj, +
maxicef.bpl,, +
Rxctl5.lib import32.lib cp32mti.lib, +
, +
maxicef.res ..\packages\res\chromium.dcr
As you can see, c:\windows\system32; is included in the paths.
So, I assumed that there is a problem to import 64bit DLLs from a 32bit application, and the whole Internet says it is true.
I started to reimplement those functions in a separate C++ module with code from Wine, but it is really very much code. And suddenly I saw that another 32bit DLL of ours built with C++Builder 5 actually DOES reference 64bit DLLs!
So, what is the trick for calling functions from System32 64bit DLLs from a library built with C++Builder 5?
UPDATE:
Here is evidence that the functions are actually imported from a parent DLL:
UPDATE:
More one evidence:
UPDATE
OK, here is the makefile:
# ---------------------------------------------------------------------------
!if !$d(BCB)
BCB = $(MAKEDIR)\..
!endif
# ---------------------------------------------------------------------------
# IDE SECTION
# ---------------------------------------------------------------------------
# The following section of the project makefile is managed by the BCB IDE.
# It is recommended to use the IDE to change any of the values in this
# section.
# ---------------------------------------------------------------------------
VERSION = BCB.05.03
# ---------------------------------------------------------------------------
PROJECT = maxicef.bpl
OBJFILES = \
# ..\winlib\winlib.obj \
..\addons\MaxiSysUtils.obj \
..\source\uCEFAccessibilityHandler.obj \
..\source\uCEFApp.obj \
..\source\uCEFApplication.obj \
..\source\uCEFApplicationCore.obj \
..\source\uCEFAudioHandler.obj \
..\source\uCEFAuthCallback.obj \
..\source\uCEFBaseRefCounted.obj \
..\source\uCEFBaseScopedWrapper.obj \
..\source\uCEFBeforeDownloadCallback.obj \
..\source\uCEFBinaryValue.obj \
..\source\uCEFBitmapBitBuffer.obj \
..\source\uCEFBoxLayout.obj \
..\source\uCEFBrowser.obj \
..\source\uCEFBrowserProcessHandler.obj \
..\source\uCEFBrowserView.obj \
..\source\uCEFBrowserViewComponent.obj \
..\source\uCEFBrowserViewDelegate.obj \
..\source\uCEFBufferPanel.obj \
..\source\uCEFButton.obj \
..\source\uCEFButtonComponent.obj \
..\source\uCEFButtonDelegate.obj \
..\source\uCEFCallback.obj \
..\source\uCEFChromium.obj \
..\source\uCEFChromiumCore.obj \
..\source\uCEFChromiumEvents.obj \
..\source\uCEFChromiumFontOptions.obj \
..\source\uCEFChromiumOptions.obj \
..\source\uCEFChromiumWindow.obj \
..\source\uCEFClient.obj \
..\source\uCEFCommandLine.obj \
..\source\uCEFCompletionCallback.obj \
..\source\uCEFConstants.obj \
..\source\uCEFContextMenuHandler.obj \
..\source\uCEFContextMenuParams.obj \
..\source\uCEFCookieAccessFilter.obj \
..\source\uCEFCookieManager.obj \
..\source\uCEFCookieVisitor.obj \
..\source\uCEFCustomStreamReader.obj \
..\source\uCEFDeleteCookiesCallback.obj \
..\source\uCEFDevToolsMessageObserver.obj \
..\source\uCEFDialogHandler.obj \
..\source\uCEFDictionaryValue.obj \
..\source\uCEFDisplay.obj \
..\source\uCEFDisplayHandler.obj \
..\source\uCEFDomDocument.obj \
..\source\uCEFDomNode.obj \
..\source\uCEFDomVisitor.obj \
..\source\uCEFDownLoadItem.obj \
..\source\uCEFDownloadHandler.obj \
..\source\uCEFDownloadImageCallBack.obj \
..\source\uCEFDownloadItemCallback.obj \
..\source\uCEFDragAndDropMgr.obj \
..\source\uCEFDragData.obj \
..\source\uCEFDragHandler.obj \
..\source\uCEFEndTracingCallback.obj \
..\source\uCEFExtension.obj \
..\source\uCEFExtensionHandler.obj \
..\source\uCEFFileDialogCallback.obj \
..\source\uCEFFillLayout.obj \
..\source\uCEFFindHandler.obj \
..\source\uCEFFocusHandler.obj \
..\source\uCEFFrame.obj \
..\source\uCEFFrameHandler.obj \
..\source\uCEFGetExtensionResourceCallback.obj \
..\source\uCEFImage.obj \
..\source\uCEFInterfaces.obj \
..\source\uCEFJsDialogCallback.obj \
..\source\uCEFJsDialogHandler.obj \
..\source\uCEFJson.obj \
..\source\uCEFKeyboardHandler.obj \
..\source\uCEFLabelButton.obj \
..\source\uCEFLabelButtonComponent.obj \
..\source\uCEFLayout.obj \
..\source\uCEFLibFunctions.obj \
..\source\uCEFLifeSpanHandler.obj \
..\source\uCEFLinkedWinControlBase.obj \
..\source\uCEFLinkedWindowParent.obj \
..\source\uCEFListValue.obj \
..\source\uCEFLoadHandler.obj \
..\source\uCEFMediaObserver.obj \
..\source\uCEFMediaRoute.obj \
..\source\uCEFMediaRouteCreateCallback.obj \
..\source\uCEFMediaRouter.obj \
..\source\uCEFMediaSink.obj \
..\source\uCEFMediaSinkDeviceInfoCallback.obj \
..\source\uCEFMediaSource.obj \
..\source\uCEFMenuButton.obj \
..\source\uCEFMenuButtonComponent.obj \
..\source\uCEFMenuButtonDelegate.obj \
..\source\uCEFMenuButtonPressedLock.obj \
..\source\uCEFMenuModel.obj \
..\source\uCEFMenuModelDelegate.obj \
..\source\uCEFMiscFunctions.obj \
..\source\uCEFNavigationEntry.obj \
..\source\uCEFNavigationEntryVisitor.obj \
..\source\uCEFOAuth2Helper.obj \
..\source\uCEFOLEDragAndDrop.obj \
..\source\uCEFOSRIMEHandler.obj \
..\source\uCEFOverlayController.obj \
..\source\uCEFPDFPrintCallback.obj \
..\source\uCEFPDFPrintOptions.obj \
..\source\uCEFPanel.obj \
..\source\uCEFPanelComponent.obj \
..\source\uCEFPanelDelegate.obj \
..\source\uCEFPostData.obj \
..\source\uCEFPostDataElement.obj \
..\source\uCEFPrintDialogCallback.obj \
..\source\uCEFPrintHandler.obj \
..\source\uCEFPrintJobCallback.obj \
..\source\uCEFPrintSettings.obj \
..\source\uCEFProcessMessage.obj \
..\source\uCEFRegistration.obj \
..\source\uCEFRenderHandler.obj \
..\source\uCEFRenderProcessHandler.obj \
..\source\uCEFRequest.obj \
..\source\uCEFRequestContext.obj \
..\source\uCEFRequestContextHandler.obj \
..\source\uCEFRequestHandler.obj \
..\source\uCEFResolveCallback.obj \
..\source\uCEFResourceBundle.obj \
..\source\uCEFResourceBundleHandler.obj \
..\source\uCEFResourceHandler.obj \
..\source\uCEFResourceReadCallback.obj \
..\source\uCEFResourceRequestHandler.obj \
..\source\uCEFResourceSkipCallback.obj \
..\source\uCEFResponse.obj \
..\source\uCEFResponseFilter.obj \
..\source\uCEFRunContextMenuCallback.obj \
..\source\uCEFRunFileDialogCallback.obj \
..\source\uCEFSSLStatus.obj \
..\source\uCEFSchemeHandlerFactory.obj \
..\source\uCEFSchemeRegistrar.obj \
..\source\uCEFScrollView.obj \
..\source\uCEFScrollViewComponent.obj \
..\source\uCEFSelectClientCertificateCallback.obj \
..\source\uCEFSentinel.obj \
..\source\uCEFServer.obj \
..\source\uCEFServerComponent.obj \
..\source\uCEFServerEvents.obj \
..\source\uCEFServerHandler.obj \
..\source\uCEFSetCookieCallback.obj \
..\source\uCEFSslInfo.obj \
..\source\uCEFStreamReader.obj \
..\source\uCEFStreamWriter.obj \
..\source\uCEFStringList.obj \
..\source\uCEFStringMap.obj \
..\source\uCEFStringMultimap.obj \
..\source\uCEFStringVisitor.obj \
..\source\uCEFTask.obj \
..\source\uCEFTaskRunner.obj \
..\source\uCEFTextfield.obj \
..\source\uCEFTextfieldComponent.obj \
..\source\uCEFTextfieldDelegate.obj \
..\source\uCEFThread.obj \
..\source\uCEFTimerWorkScheduler.obj \
..\source\uCEFTypes.obj \
..\source\uCEFUrlRequest.obj \
..\source\uCEFUrlRequestClientComponent.obj \
..\source\uCEFUrlRequestClientEvents.obj \
..\source\uCEFUrlrequestClient.obj \
..\source\uCEFValue.obj \
..\source\uCEFView.obj \
..\source\uCEFViewComponent.obj \
..\source\uCEFViewDelegate.obj \
..\source\uCEFViewsFrameworkEvents.obj \
..\source\uCEFWaitableEvent.obj \
..\source\uCEFWebPluginInfo.obj \
..\source\uCEFWebPluginInfoVisitor.obj \
..\source\uCEFWebPluginUnstableCallback.obj \
..\source\uCEFWinControl.obj \
..\source\uCEFWindow.obj \
..\source\uCEFWindowComponent.obj \
..\source\uCEFWindowDelegate.obj \
..\source\uCEFWindowParent.obj \
..\source\uCEFWorkScheduler.obj \
..\source\uCEFWorkSchedulerQueueThread.obj \
..\source\uCEFWorkSchedulerThread.obj \
..\source\uCEFWriteHandler.obj \
..\source\uCEFX509CertPrincipal.obj \
..\source\uCEFX509Certificate.obj \
..\source\uCEFXmlReader.obj \
..\source\uCEFZipReader.obj \
..\source\uCEFv8Accessor.obj \
..\source\uCEFv8ArrayBufferReleaseCallback.obj \
..\source\uCEFv8Context.obj \
..\source\uCEFv8Exception.obj \
..\source\uCEFv8Handler.obj \
..\source\uCEFv8Interceptor.obj \
..\source\uCEFv8StackFrame.obj \
..\source\uCEFv8StackTrace.obj \
..\source\uCEFv8Value.obj \
..\packages\CEF4Delphi_Register.obj \
maxicef.obj
RESFILES = maxicef.res ..\packages\res\chromium.dcr
MAINSOURCE = maxicef.cpp
RESDEPEN = $(RESFILES)
LIBFILES =
IDLFILES =
IDLGENFILES =
LIBRARIES = Rxctl5.lib
PACKAGES = vcl50.bpi
SPARELIBS = Vcl50.lib Rxctl5.lib
DEFFILE =
# ---------------------------------------------------------------------------
PATHCPP = .;..\winlib;
PATHASM = .;
PATHPAS = .;..\source;..\packages;..\addons;
PATHRC = .;..\packages\res;
DEBUGLIBPATH = $(BCB)\lib\debug;
RELEASELIBPATH = $(BCB)\lib\release
USERDEFINES = _DEBUG;MSWINDOWS;CPUX32;TARGET_32BITS;VER130;
SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES
INCLUDEPATH = ..\source;..\packages;..\addons;..\winlib;$(BCB)\include;$(BCB)\include\vcl
LIBPATH = ..\source;..\packages;..\packages\res;..\addons;..\winlib;c:\windows\system32;c:\windows\SysWOW64;L:\Lib;$(BCB)\lib\obj;$(BCB)\lib;
WARNINGS= -w-par
# ---------------------------------------------------------------------------
CFLAG1 = -Od -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tWM -H=vcl50.csm
IDLCFLAGS = -I..\source -I..\packages -I..\addons -I..\winlib -I$(BCB)\include -I$(BCB)\include\vcl \
-src_suffix cpp -D_DEBUG -DMSWINDOWS -DCPUX32 -DTARGET_32BITS -DVER130 -boa
PFLAGS = -$YD -$W -$O- -v -JPHNE -M
RFLAGS =
AFLAGS = /mx /w2 /zd
LFLAGS = -D"" -aa -Tpp -x -Gn -Gl -Gi -v
# ---------------------------------------------------------------------------
ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)
ALLRES = $(RESFILES)
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib
# ---------------------------------------------------------------------------
!ifdef IDEOPTIONS
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[Debugging]
DebugSourceDirs=$(BCB)\source\vcl
!endif
# ---------------------------------------------------------------------------
# MAKE SECTION
# ---------------------------------------------------------------------------
# This section of the project file is not used by the BCB IDE. It is for
# the benefit of building from the command-line using the MAKE utility.
# ---------------------------------------------------------------------------
.autodepend
# ---------------------------------------------------------------------------
!if "$(USERDEFINES)" != ""
AUSERDEFINES = -d$(USERDEFINES:;= -d)
!else
AUSERDEFINES =
!endif
!if !$d(BCC32)
BCC32 = bcc32ide
!endif
!if !$d(CPP32)
CPP32 = cpp32
!endif
!if !$d(DCC32)
DCC32 = dcc32
!endif
!if !$d(TASM32)
TASM32 = tasm32
!endif
!if !$d(LINKER)
LINKER = ilink32
!endif
!if !$d(BRCC32)
BRCC32 = brcc32
!endif
# ---------------------------------------------------------------------------
!if $d(PATHCPP)
.PATH.CPP = $(PATHCPP)
.PATH.C = $(PATHCPP)
!endif
!if $d(PATHPAS)
.PATH.PAS = $(PATHPAS)
!endif
!if $d(PATHASM)
.PATH.ASM = $(PATHASM)
!endif
!if $d(PATHRC)
.PATH.RC = $(PATHRC)
!endif
# ---------------------------------------------------------------------------
$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
$(BCB)\BIN\$(LINKER) @&&!
$(LFLAGS) -L$(LIBPATH) +
$(ALLOBJ), +
$(PROJECT),, +
$(ALLLIB), +
$(DEFFILE), +
$(ALLRES)
!
# ---------------------------------------------------------------------------
.pas.hpp:
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
.pas.obj:
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
.cpp.obj:
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
.c.obj:
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
.c.i:
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
.cpp.i:
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
.asm.obj:
$(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@
.rc.res:
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
# ---------------------------------------------------------------------------
UPDATE
For @PaulMcKenzie: I have a 64bit OS, and I need to build a 32bit application with Borland C++Builder 5 to run on the 64bit OS. The problem I have is the issue with the Unresolved external errors, when I reference Windows functions residing in Windows DLLs from my .pas files.



OK, thank you all, for making me understand the process of DLL importing.
As
IInspectableandRemy Lebeausaid - the import ofDLLrequires linking with theLIB. Here is more explanations. Also google - "linking a shared library to executable". It is not important whether it is.soor.dll, the principals are the same.One other important point before I give a solution.
As
Remy Lebeausaid: several functionsSolution
First
Fix for makefile
.libfiles inLIBRARIESsection.LIBPATHsection.Second
Despite presence of folder with
.libfunctions in yourBCBinstallation:You need to recreate the
.libfiles. I haveBorland C++ builderinstalled onT:\virtual drive:I put the libs in folder
..\libsrelative to themakefile.Third
There is a bug in compiler of
Borland. It fails to compile call to an external function from class method, so you need to add proxies: