Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

Can I use RogueWave C++ libraries with Nokia nmake?

Yes, it is possible to use RogueWave C++ libraries in your nmake builds.

Compile Errors?

A problem may arise when using certain RogueWave libraries bundled with Sun's C++ compiler. We have seen this problem with Tools.h++ v7 bundled with Solaris C++ 4.2.

nmake cpp uses the pp:reguard option with the Sun C++ compiler. pp:reguard tells cpp to re-emit the #defines in the preprocessed output. Sun C++ needs pp:reguard for template instantiation. Under certain conditions the Solaris C++ compiler has to search for an outboard template definitions file. When that file is brought in, under certain conditions, the missing include guard (that is stripped out by nmake cpp) can lead to multiple definition problems.

The re-emited #defines may cause a problem when using RogueWave headers. This new problem can be alleviated by using the RogueWave -DRW_NO_CPP_RECURSION library configuration option, however to use this librwtool is supposed to be recompiled with this option as well. This isn't a viable solution if you do not have the source for Tools.h++.

The source for Tools.h++ may be purchased from RogueWave. However, we can work around the problem without access to the library source. rwstcfns.c allows one to use -DRW_NO_CPP_RECURSION without recompiling librwtool. This scheme uses C++ function calls to reverse the mapping created by -DRW_NO_CPP_RECURSION (which would be done automatically by recompiling librwtool with this option). All one needs to do is to to use -DRW_NO_CPP_RECURSION in the RogueWave related compiles and compile and link with rwstcfns.c.

To the best of our knowledge, this workaround is valid for Tools.h++ v7. The header files for this release appear under include directory rw7. This workaround has not been tested or examined for applicability to other releases of Tools.h++.

For example, your Makefile would contain:

     CCFLAGS += -DRW_NO_CPP_RECURSION
     rwtest :: rwtest.c rwstcfns.c -lrwtool

You may download rwstcfns.c and use it as needed with your RogueWave builds.

A Real Fix?

All of these header file difficulties would disappear if use of the nmake cpp could be bypassed. This could be done if the Solaris compiler supported the -I- option, which is used to specify how to correctly locate header files in a viewpathing environment. We have submitted an enhancement request to Sun for -I- and are waiting for a decision. If you would like to see the -I- option added to the Sun C++ compiler, you might be able to help our case by submitting a similar request to Sun.

Encrypted Files?

The header files of certain RogueWave distributions are encrypted. We have encountered this type of file in certain versions of RogueWave libraries bundled with the Solaris C++ compiler.

The encrypted RogueWave header files cannot be used with the nmake. nmake cannot decrypt these file so they cannot be preprocessed by nmake cpp. nmake customers have solved this by obtaining decrypted versions of the files from RogueWave, which will work with nmake. If you are having problems with encrypted RogueWave files then contact RogueWave for the decrypted files. It also appears the rw7 files are not encrypted so upgrading to version 7 may help as well.

Another possible work-around is to disable nmake cpp and use the native preprocessor. This option requires extreme caution - either do not use viewpathing (recommended), or ensure through other means that the correct versions of header files include with "double quotes" are picked up. Warning: if you disable nmake cpp, then you are responsible for ensuring that correct versions of include files are picked up. The native cpp can be used by setting nativepp=1 in the environment or in your makefiles. For more information as to why nmake cpp is important see the cpp FAQ page.

Last Update: Friday,12-Aug-2016 10:48:30 EDT