Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 238

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
Setting up your C++ development environment
The following compliers generate valid CFX code for UNIX platforms:
Platform
Compiler
Solaris
Sun Workshop C++ compiler, version 5.0 or higher (gcc cannot be used to compile CFX code on Solaris)
Linux
Gnu C++ compiler - gcc
Before you can use your C++ compiler to build custom tags, enable the compiler to locate the CFX API header file,
cfx.h. In Windows, add the CFX API include directory to your list of global include paths. In Windows, this directory
is cf_root\cfx\include. In UNIX, this directory is cf_root/cfx/include. in UNIX, you need
compile line (see the Makefile for the directory list example in the cfx/examples directory).
Compiling C++ CFX tags
CFX tags built in Windows and in UNIX must be thread-safe. Compile CFX tags for Solaris with the
Sun compiler.
Locating your C++ library files in UNIX
In UNIX systems, your C++ library files can be in any directory as long as the directory is included in
LD_LIBRARY_PATH or SHLIB_PATH (HP-UX only).
Implementing C++ CFX tags
CFX tags built in C++ use the tag request object, represented by the C++ CCFXRequest class. This object represents a
request made from an application page to a custom tag. A pointer to an instance of a request object is passed to the
main procedure of a custom tag. The methods available from the request object let the custom tag accomplish its work.
For information about the CFX API classes and members, see ColdFusion C++ CFX Reference in the CFML Reference.
Note: Calling a nonexistent C++ CFX procedure or entry point causes a JVM crash in UNIX.
Debugging C++ CFX tags
After you configure a debugging session, you run your custom tag from within the debugger, set breakpoints, single-
step, and so on.
Debugging in Windows
You can debug custom tags within the Visual C++ environment.
1
Build your C++ CFX tag using the debug option.
2
Restart ColdFusion.
Start Visual C++.
3
4
Select Build > Start Debug > AttachProcess.
5
Select jrunsvc.exe.
Adobe recommends that you shut down all other Java programs.
Execute any ColdFusion page that calls the CFX tag.
6
Select File > Open to open a file in VisualDev in which to set a breakpoint.
7
8
Set a breakpoint in the CFX project.
The best place is to place it in
. Next time you execute the page you will reach the breakpoint.
ProcessRequest()
Last updated 1/20/2012
includepath
on your
-I <
>
switch on the
-mt
233

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents