About #Pragma Library #include .CH and DLLs
Page 1 of 1

Author:  alepap [ Thu Nov 05, 2015 8:38 am ]
Post subject:  About #Pragma Library #include .CH and DLLs

It would be nice to have some posts that explains the difference between the DLL and the LIB, when to add it as #Pragma Libray in the PRG file or in the project file.

Author:  rdonnay [ Thu Nov 05, 2015 10:07 am ]
Post subject:  Re: About #Pragma Library #include .CH and DLLs

A DLL contains executable binary code. It is identical to an EXE except that it has no specific start procedure.

A LIB contains a list of public functions that are included in the associated DLL. This is why you must reference LIB files in your project file or with a #Pragma() in your source code.

The linker (ALINK) is called by PBUILD as the last step in the project build process. It resolves symbols that are called from your application to where they exist in a DLL and only when all symbols are resolved then the EXE or DLL is created. This resolution is accomplished by searching the LIB file for each DLL.

You do not need to distribute LIB files with your end applications unless your customers are Xbase++ programmers who intend to use your library in their own application, such as eXpress++ because LIB files are only used at LINK time not at RUNTIME.

CH files are basically the same as PRG files. They are used by the XPP compiler when compiling source into .OBJ files which will later be linked together into an EXE or DLL.

CH files usually contain only commands or definitions but they can also contain executable code an procedures.

DCDIALOG.CH contains all the DC* command for the eXpress++ GUI system.

The XPP compiler also contains a pre-processor. This pre-processing is done before the actual compiling of the source. It converts all commands into functions recognizable by the compiler and all defines into literal values recognized by the compiler. To see how the pre-processor works add the /P switch to your compile parameters in your project file. A file will be created with the .PPO (pre-processed output) extension. This will show exactly what is getting compiled into your binary EXEs and DLLs.

Author:  alepap [ Thu Nov 05, 2015 2:35 pm ]
Post subject:  Re: About #Pragma Library #include .CH and DLLs

:clap: Thank you.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group