VCLX: How to use

Warning: You have to build VCLX "library" before using

The next step, you have to add additional paths to your Microsoft "Visual Studio" environment or your solution (for platforms: "x86" and/or "x64"):

  • "<VCLX>\bin" to "Executable directories" list (optional, is used for "custom build step" to run "vclx-pefixer*.exe" without "full path" to it);
  • "<VCLX>\include" to "Include directories" list;
  • "<VCLX>\libs" to "Library directories" list.

After that, include "vclx.h" in main "*.c" or "*.cpp" file in your project (to use VCLX always):

:::cpp
// (i) include "vclx.h" example
#include "vclx.h"

and rebuild your solution. Or you can use "advanced" include:

:::cpp
// (i) include "vclx.h" advanced example
#if        (defined (USE_VCLX))
  #include "vclx.h"
#else   // (defined (USE_VCLX))
  #include "vclx_defaultlibs.h"
#endif  // (defined (USE_VCLX))

and if you define "USE_VCLX" in some configuration it will be compiled using VCLX. If you examine our test solutions "<VCLX>/tests/HelloVCLX_*.sln", you can find two projects "HelloVCLX_Legacy" and "HelloVCLX_Native" per each solution. The project "HelloVCLX_Legacy" defines "USE_VCLX" and all target applications (for any configuration: "Debug", "Release", "Unicode_Debug", "Unicode_Release"; for any target: "x86", "x64") are compatible with legacy OS's.

After build, you can "fix" PE-header of your target application. We use in our test solutions "post build event" step for it.

For your self project:
- Open your project "properties";
- Select "All Configurations" in "Configuration:" dropbox and select "All Platforms" in "Platform:" dropbox;
- Open "Configuration Properties/Build Events/Post-Build Event";
- Change value for "Command Line" to `<VCLX>\common\VCLX_PostBuild.cmd "$(TargetPath)" "4.0"` (or you can direct run builded "vclx-pefixer*.exe" tool with the same arguments).

MSVC 2012, Post Build Event

For more information about using VCLX, examine our test solutions "<VCLX>/tests/HelloVCLX_*.sln".

That's all.


© "VCLX DevTeam" 2012, all rights reserved


Related

Wiki: HOME
Wiki: VCLX: How to build

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.