About Compiling and Linking
On Windows, a compiler command line to build an application should contain these elements:
 
<compiler_invocation> -D_RWCONFIG=<buildtype> <include_paths>
<system-flags-and-macros> -c <cpp-file-name>
A link line should contain these elements:
 
<compiler_invocation> /Fe <executable_name> <object_file_name>
<import_libraries> /link /LINKPATH <import_library_paths> -logo
For example, to compile and link a dynamic (DLL) release application on Windows that depends on the Essential Tools Module and MySQL:
 
cl -D_RWCONFIG=12d -Ic:\RogueWave\SourcePro\<ver>-osd
-nologo -EHsc -MD -W3 -O2 -arch:SSE2 -GR -D_CRT_SECURE_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -c myapp.cpp
 
cl /Fe myapp.exe myapp.obj dbt12d.lib tls12d.lib user32.lib
/link /LIBPATH c:\RogueWave\SourcePro\<ver>-osd\lib -nologo
where <ver> means the current SourcePro version number.
Below are the equivalent lines for Unix. Unix specifies link paths with -L and import libraries with -l, and the executable name that follows -o has no extension.
 
g++ -D_RWCONFIG=12d -I/usr/local/RogueWave/SourcePro/<ver>-osd -m64 -pthread \
-std=gnu++17 -I. -c myapp.cpp
 
g++ -m64 -pthread -L/usr/local/RogueWave/SourcePro/<ver>-osd/lib \
-o myapp myapp.o -lm -ldl -ldbt<lib-ver>12d -ltls<lib-ver>12d
where <ver> means the current SourcePro version number and <lib-ver> means the library version number, which differs from the SourcePro version number.