This page covers instructions on how to compile this EDCS SDK. In addition, it provides steps that can be used to verify that the compilation completed successfully.
NOTE: This document is intended for those users who are building the EDCS libraries from the source. Pre-compiled (binary) distributions for both static and dynamic linking for all supported platforms are available for download from the SEDRIS Web Site.
There is no EDCS 4.0 to EDCS 4.1 Mapping API because EDCS 4.1 is a superset of EDCS 4.0.
For general information about this release, where to obtain it, and items that require specific attention, see the Release Notes.
For help, comments, and bug reports please send email to help@sedris.org. If you are an associate, please use se-coders@sedris.org.
Return to: Top
If you require EDCS support on other platforms or compilers, you can send email to se-scrccb@sedris.org stating the specific platform, operating system and C/C++ compiler requirements. The SEDRIS project will try to accommodate your requests as much as possible.
Platform Compiler Irix 6.5 (n32 only)
- MipsPro 7.2 (n32 only)
- GCC 3.0.1
SunOS 5.6
- SC 4.2
- GCC 3.0.1 (without optimization)
SunOS 5.7
- SC 4.2
- SC 5.2 - Forte (without optimization) (requires compiler patches: 105591-09, 106327-11, 106300-12, 106950-16, and 104631-07)
- GCC 3.0.1
Linux (Red Hat 7 and 9)
- GCC 2.95.x
- GCC 3.0.1
- GCC 3.2.2
Windows 98/Me/NT/2000
- Microsoft Visual C++ 6.0
- Microsoft Visual C++ .Net
Return to: Top
The EDCS software will compile and work "out-of-the-box" on all supported systems. However, your particular system may have missing or different versions of the Make utility and compiler versions, so read the following sections carefully to verify your system.
The build requirements for Unix and Win32 environments are:
- Unix
The SDK Build Environment for Unix requires the use of the GNU "make" utility (the "gmake" program) version 3.78.1 or higher, older versions will not work. GNU "make" is freely available under the GNU General Public License and may be downloaded via several mirror sites. You can verify your availability of "make" and its version by just executing the command "make -v". If you get a "Command not found" error, you will need to install it.
- Win32
The SDK Build Environment for Win32 is based on Microsoft Visual C++ 6.0/.Net project files. Hence, a default installation of Microsoft Visual C++ 6.0/.Net is sufficient to successfully build all the SDK libraries and applications.
Return to: Top
The following is a list of the most common build environment variables and commands for the SDK Build Environment for Unix. The options for the SDK Build Environment for Win32 are controlled from the Visual C++ IDE interface. Consult the Visual C++ Documentation for more information on changing the build settings.
The default settings are marked with an asterisk "*" and in bold. Also note that you can use "true", "on", and "1" to signify an "active" state, and "false", "off", and "0" to signify a "non-active" state (use all lower or upper case letters).
Variable Valid Settings Description BUILD_MODE OPT*, STD, DEBUG, PROF Compile mode: optimized, standard, debug, or profiling. (Default is optimized) BIND_STATIC YES, NO* Chooses between static and dynamic linking OPTIMIZE YES*, NO Forces optimization The following is a list of the most common build environment commands for Unix:
Command Description make Builds software contained in the current directory and installs to "[root]"/lib/platform or "[root]"/bin/platform directory. make clean Deletes compiled software from current directory. make realclean Deletes compiled software from "[root]"/lib/platform and "[root]"/bin/platform directory. Also performs a "make clean" of current directory and removes headers from the "include" directory. make distclean Only operates on the entire release from the "[root]" directory. Removes all ".objects" and ".depends" directories, the "lib" and "bin" directories, and removes all header files from the "include" directory, returning the entire release to its original "pristine" state. Note that a sharing violation may occur if the command tries to delete files that you are currently using (like one of the SDK applications still running). make env Displays current build settings. Return to: Top
Compiling the libraries and applications on all supported platforms requires only a few simple steps. In the following sections, the "[root]" directory is where you extracted the SDK source code.
- Unix
A "make" command in the "[root]" directory will recursively go through the SDK directory structure and build all libraries and applications provided with the distribution using the default settings. For this release, the default settings are:
- BUILD_MODE = OPT
- BIND_STATIC = no
- USE_GNU = false (set to true under Linux)
These settings will compile the release using optimization and dynamic linking.
- Win32
Follow these steps to build all the SDK libraries and applications:
- From Windows Explorer, locate and open (i.e. double click) the "win32_headers.bat" file in the "[root]" directory of your installation. This step creates the top "include" directory with all the header files for the technology components.
- If you want to compile the SDK using Dynamic linking (i.e. linking against DLLs), open the "vcpp_dynamic.dsw" project workspace file for VC++ 6.0 or open the "vcpp_dynamic.sln" solution file for VC++ .Net. For Static linking, open the "vcpp_static.dsw" file for VC++ 6.0 or "vcpp_static.sln" file for VC++ .Net.
- From the Visual C++ IDE, select "all_sdk" as your "Active Project" and "Release" or "Debug" for your "Active Configuration". For example, to compile in "Release" mode, choose "Build->Set Active Configuration..." and select the "all_sdk - Win32 Release" entry.
- From the "Build" menu, choose "Rebuild All".
Notes:
- If you will be switching between the Static and Dynamic project workspaces, make sure to use the "Rebuild All" command so that the previous compilation files are deleted.
- You can build individual applications by making them the current "Active Project" ("Project->Set Active Project" menu), and choosing "Rebuild All".
- The "Release" option is similar to the Unix Build Environment "OPT" option for the "BUILD_MODE" variable.
If you have any errors reported by the build process, see Problems with the Build.
Return to: Top
In order to run the included applications, you will need to add, to your current path, the paths where the libraries are. (if compiled "dynamic")
- Unix
The names of the application and library directories can be retrieved by executing the command "make env". Look for the lines containing "EXE_DIR" and "LIB_DIR". For example, you can use the command "make env | grep _DIR" to list all the directories specified by the build environment. You can also do an "ls" in the "[root]/bin" and "[root]/lib" directories (and their subdirectories) to find where the applications or libraries reside. For example, on a Linux system, the path to the executable applications might be "[root]/bin/linux-2.4.20-8-i386/OPT". You will need to add this application directory to your "PATH" environment variable, and similarly the libraries directory to your "LD_LIBRARY_PATH" directory. For example, to add the previous Linux executable applications path in a Bash shell, you can use
>export PATH=$PATH:[root]/bin/linux-2.4.20-8-i386/OPTfor the bin directory and,
>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:[root]/lib/linux-2.4.20-8-i386/OPTfor the lib directory. Remember to replace "[root]" with the path where you installed the SEDRIS package.
- Win32
The executable applications reside in the "[root]\bin\Release" or "[root]\bin\Debug" depending on build mode. Similarly, the libraries reside in either "[root]\lib\Release" or "[root]\lib\Debug". From a DOS Prompt, add these directories to the "PATH" environment variable by using the command "set PATH=[root]\bin\Release;[root]\lib\Release;%PATH%" (or use "Debug" instead of "Release" if you compiled in "Debug" mode). Remember to replace "[root]" with the path where you installed the EDCS package.
You are now ready to try one of the EDCS applications. Execute the command
this will run the Sample EDCS Access program, which prints the EC Dictionary entry for the first parameter (which is assumed an EC code), and the EA Dictionary entry for the second parameter (which is assumed an EA code). This program is very simple and has no error checking; it is, however, a useful starting point for building your own applications. After running the above command, you should see an output similar to the following:
- "sample_edcs_access 101 200"
ECC (101) - ATHLETIC_FIELD: An open <TRACT> where sporting events, exercises, and/or games occur; an athletic field. EAC (200) - BRIDGE_SPAN_MOBILE: An indication that a <BRIDGE_SPAN> moves in some manner to allow passage underneath.If you see something like what is shown above, you have successfully compiled the EDCS SDK!
Return to: Top
This section describes the steps needed to link your software against the libraries produced by this SDK. Applications and/or libraries that use this SDK will need to refer to the "[root]/include" directory for compilation, and the libraries in the "[root]/lib" subdirectories for linking. The examples that follow create an application called "myapp" which you can use as a starting point for your own development.
The library your applications will need to link against for the EDCS SDK is called "libedcs.a" in Unix, and "edcs.lib" in Win32 environments.
- Unix
The Unix Build Environment uses standard Makefiles and "include" files that specify the process for compiling and linking the applications and libraries. The following steps show how to integrate an application into the build environment. If you want to create an application in another directory, you will need to change the relative paths as appropriate.
- From a Unix shell, create a new directory called "myapp" under "[root]/src/apps".
- Create an "appdefs.mk" file in the new "myapp" directory with the following lines:
include $(DEPTH)/src/templates/cleanup_macros.mk ifdef EDCS_SDK DIR_PATH := src/apps/myapp else DIR_PATH := src/lib/edcs/src/apps/myapp endif APPNAME := myapp C_SOURCES := myapp.c CXX_SOURCES := REQUIRED_LIBS := edcs LOCAL_INCLUDES := -I$(INC_DIR) include $(DEPTH)/src/templates/localtargets.mk- Put your "myapp.c" source code file into the "myapp" directory.
- You should now be able to run the "make" command from the "[root]" directory and have your application compiled and linked against the SDK libraries.
- Win32 Application
To compile your own applications from the Win32 Build Environment, use one of the provided applications as a model for your project files (the ".dsp" files), edit them as needed, insert them into the appropriate workspace (either "vcpp_dynamic.dsw" or "vcpp_static.dsw") by using the VC++ menu command "Project->Insert Project Into Workspace...", and set the project dependencies as done for the other applications. As an alternative, you can create the project from scratch directly from the SDK workspace. The following steps show you exactly how to do this. The steps create an application to be linked dynamically against the SDK libraries. The application will be created in the "[root]/src/apps" directory. If you want to create an application in another directory, you will need to change the relative paths as appropriate. Please keep in mind that the following examples are geared specifically towards the VC++ 6.0 compiler, and that the VC++ .Net version should be very similar except for the '.dsw/.dsp' file extensions would be replaced by '.sln/.vcproj'.
- Open the "vcpp_dynamic.dsw" file.
- Select "Project->Add To Project->New...".
- Choose the "Projects" tab in the "New" dialog, and select "Win32 Console Application".
- In the "Location:" box, click the "..." button and navigate to the "[root]/src/apps" directory, and click the "OK" button.
- In the "Project name:" box, enter "myapp".
- Verify the "Add to current workspace" choice is selected, and click the "OK" button
- In the next dialog, leave the selection to "An empty project", click the "Finish" button, and the "OK" button in the next dialog.
- Your new project is now in the workspace, and it should be "bolded" indicating it is the current project. If it is not, use the "Project->Set Active Project" menu to make it active.
- Choose "Project->Add To Project->Files...", and add your source code files to it.
- Choose "Project->Settings...", select the "myapp" project on the left side of the "Project Settings" dialog, and choose "Win32 Release" for the "Settings For:" drop down menu on the top left of the dialog.
- In the "General" tab, enter "../../../bin/Release" in the "Output files:" box.
- In the "C/C++" tab, choose "Code Generation" in the "Category:" drop down menu, and choose "Multithreaded DLL" in the "Use run-time library:" drop down menu.
- Now choose "Win32 Debug" for the "Settings For:" drop down menu.
- In the "C/C++" tab, choose "Code Generation" in the "Category:" drop down menu, and choose "Debug Multithreaded DLL" in the "Use run-time library:" drop down menu.
- In the "General" tab, enter "../../../bin/Debug" in the "Output files:" box.
- Now choose "All Configurations" for the "Settings For:" drop down menu.
- In the "C/C++" tab, choose "Preprocessor" in the "Category:" drop down menu, and enter "../../../include" in the "Additional include directories:" box.
- Click the "OK" button in the "Project Settings" dialog.
- Choose "Project->Dependencies...", and select "myapp" in the "Select project to modify:" drop down menu.
- Click the box beside the "sedris" entry in the "Dependent on the following project(s):" scroll list so that a check mark is inside it, and click the "OK" button.
- You should now be able to build your project by pressing the "F7" key or from the menu by choosing "Build->Build myapp.exe".
- The executable will be located in the "[root]\bin\Release" or "[root]\bin\Debug" directory depending on your build mode.
To create a project for static linking, see the settings for those applications in the static workspace and set the preprocessor definition
EXPORT_DLL=""in the "Preprocessor definitions" options for your project. You can do this from the VC++ IDE using the following steps:
- Open your project and choose "Project->Settings...".
- Select "All Configurations" in the "Settings For:" drop down menu.
- Select your application project on the left part of the dialog.
- In the "C/C++" tab, select "General" in the "Category:" drop down menu.
- In the "Preprocessor definitions:", enter the following at the end of all other entries:
,EXPORT_DLL=""- Click "OK" and build your project using "Build->Rebuild All".
- Win32 Library
If you are linking your own libraries against this SDK library, you will need to set a preprocessor definition in your project files or "unresolved" errors will appear when linking. From the Visual C++ IDE, use the following steps:
- Open your project and choose "Project->Settings...".
- Select "All Configurations" in the "Settings For:" drop down menu.
- Select your library project on the left part of the dialog.
- In the "C/C++" tab, select "General" in the "Category:" drop down menu.
- In the "Preprocessor definitions:" entry box, enter the following at the end of all other entries:
if linking your libraries against this SDK built dynamically, or,EXPORT_DLL="__declspec(dllimport)"if linking your libraries against this SDK built statically.,EXPORT_DLL=""- Click "OK" and build your project using "Build->Rebuild All".
To run your application, follow the same steps as described in Testing the Build.
Return to: Top
- Why am I having errors using my "make" in Unix?
- Check that you are using the proper "make". See Build Requirements.
- How do I get the release back to its pristine start condition?
- Run the "make distclean" command ("Build->Clean" in Win32) to remove the created subdirectories, as well as their contents.
- In Win32, I compiled "dynamic" and now I am trying to build "static" but I am getting some errors. What's wrong?
- Make sure you use the "Build->Rebuild All" command from the VC++ menu so that the older compilation files are rebuilt.
- In Win32, I am linking my own libraries or static application against the SDK and I get "unresolved references" errors. What's wrong?
- You may need to set some of the preprocessor definitions as explained in Using the Libraries.
Return to: Top
Return to: Top
For help, comments, and bug reports please send email to help@sedris.org. If you are an associate, please use se-coders@sedris.org.
Return to: Top
These links require Internet access.
- EDCS at the SEDRIS Web Site
- SEDRIS (www.sedris.org)
- SEDRIS Technologies SDK Downloads
- SEDRIS Technologies Documents
- SEDRIS Tools
Return to: Top
Copyright © 2006 SEDRIS