Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic TAU (steve huntington)
Decrease font size
Increase font size
Topic Title: How to build DLL with Tau G2?
Topic Summary: What artifacts, dependencies, fields need to be configured to generate DLL
Created On: 30-Aug-2005 21:14
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 30-Aug-2005 21:14
User is offline View Users Profile Print this message


Ron Grider

Posts: 7
Joined: 16-Jun-2004

I have been working with Tau G2 for a year, learning the UML with DoDAF addins, working with the C++ code generator. To date I've only been building executable applications. But now I'm trying to figure out how to cause the generated code to build a dynamic linked library (DLL). I've tried a couple combinations of adding the Makefile Generator Settings stereotype to the C++ Application Generator artifact, specifying dynamicLibrary, tried adding a ".LIB" file artifact with "manifests" dependency to the top-level class etc.

Is anyone familiar with the ins-and-outs of configuring the model to generate a DLL?

Thanks for any help you can offer.
Report this to a Moderator Report this to a Moderator
 12-Sep-2005 12:33
User is offline View Users Profile Print this message


Magnus Persson

Posts: 11
Joined: 8-Dec-2003

It should work to add the Makefile Generator Settings stereotype to the C++ Application Generator artifact, and select "Dynamic library" .

What kind of errors do you get?

Report this to a Moderator Report this to a Moderator
 12-Sep-2005 22:02
User is offline View Users Profile Print this message


Ron Grider

Posts: 7
Joined: 16-Jun-2004

I don't get errors of the compile and crash kind. But the code generated, when employing the MakeFile Generator Settings as suggested, are such that what is compiled is not a DLL. Wrong type (EXE vs. DLL), wrong library (Multi-threaded Debug vs. Multi-threaded Debug DLL), wrong output file extension (EXE vs. DLL), omission of the Preprocessor Definition (_USRDLL), missing Module File to include (i.e. testit.DEF), etc. When I manually enter into MSVC++ IDE and change these in Project Properties, a DLL is successfully compiled. I am still working to test if it then actually behaves as a DLL, but I have high confidence since many of the Project Properties now match what is created when I make a new MFC DLL project in MSVC++.

I am curious to know, does "it should work" come from your own successful endeavors to create DLLs from models in Tau G2, or from knowledge about the intended product design? I've not spoken with anyone who has done this.
Report this to a Moderator Report this to a Moderator
 24-Jan-2006 08:35
User is offline View Users Profile Print this message


Mattias Mohlin

Posts: 6
Joined: 24-Jan-2006

There were improvements in this area in the 2.6 release.
In the documentation (UML to Applications - Makefile Generator - Generator parameters) you can find a complete list of all parameters that can be used in the "User code" field of the Makefile Generator settings.
I think the following settings are of interest:
dynamicLibBaseName
dynamicLibName
linkDynamicLibCommand
linkFormat

You use them by typing the name of the parameter followed by '=' and then the value.

To set custom defines you may use the $TAUDEFINES variable. Look in a generated make file
to see what I'm talking about.

Note that the C++ code generator doesn't yet support the generation of __declspecl(dllexport) (needed on Windows to export symbols from a DLL) so you typically have to write the interface of the DLL yourself in a hand-written header.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic TAU forum.
There are currently 0 users logged in.
The most users ever online was 15 on 31-Mar-2008 at 16:22.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.