It is currently Wed Feb 08, 2012 6:17 pm

All times are UTC



Welcome
Welcome to RHAPSODY4YOU

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today.





 Page 1 of 1 [ 8 posts ] 
Author Message
 Post subject: Compile OXF
PostPosted: Tue Feb 02, 2010 10:05 am 
User avatar

Joined: Mon Jan 11, 2010 9:17 am
Posts: 16
Location: Braunschweig
Good morning...

I have just created my Rhapsody-Project in C++. It works fine so far.

But I only use Rhapsody to generate the code. I have to include the code into another Project (codeblocks) and compile and link everything there.

I already compiled the OX-Framework. That would be the source in
...Telelogic\Rhapsody 7.4\Share\LangCpp\oxf


Do I have to compile and link the sources in
...Telelogic\Rhapsody 7.4\Share\LangCpp\omcom
and
...Telelogic\Rhapsody 7.4\Share\LangCpp\aom
too?


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Tue Feb 02, 2010 12:19 pm 
User avatar

Joined: Mon Jan 11, 2010 9:17 am
Posts: 16
Location: Braunschweig
The main problem is that I get an linker error:

undefined reference to `OMThread::getGuard().


OMGuard belongs to OXF, doesn't it?


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Tue Feb 02, 2010 1:11 pm 
User avatar

Joined: Wed Oct 31, 2007 10:00 pm
Posts: 45
to compile the framework you have to use the file msbuild.mak (Microsoft)


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Thu Feb 04, 2010 10:31 am 
User avatar

Joined: Mon Jan 11, 2010 9:17 am
Posts: 16
Location: Braunschweig
Do I only have to link the "oxf.a"?


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Thu Feb 04, 2010 1:11 pm 
User avatar

Joined: Wed Oct 31, 2007 10:00 pm
Posts: 45
the makefiles to build the framework are located in Rhapsody\Share\LangCpp (and LangC) depending on what compiler you have selected at Rhapsody installation
msbuild.mak (msVC9build.mak) - Microsoft (Windows)
mscebuild.mak - Win CE
cygwinbuild.mak - Cygwin
linuxbuild.mak - gcc
bc5build.mak - Borland
and so on...


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Fri Feb 05, 2010 7:56 am 
User avatar

Joined: Mon Jan 11, 2010 9:17 am
Posts: 16
Location: Braunschweig
I know where the make-files are. But what I am trying is to integrate the lib I built with Rhapsody in a nem (codeblocks)-project.

I link the rhapsody-lib and the oxf-lib but always get errors.

undefined reference to `orcs::theOrcs::theOrcs(IOxfActive*)'

What I want to know is if I have to link something else accept oxf and the lib I generated with Rhapsody.

The external project just looks like this one file:

#include <oxf\oxf.h>
#include <aom\aom.h>
#include "orcs\theOrcs.h"

int main(int argc, char* argv[])
{
    if(OXF::initialize(argc, argv, 6423))
        {
            orcs::theOrcs * p_theOrcs;
            p_theOrcs = new orcs::theOrcs;
            p_theOrcs->startBehavior();
            OXF::start();
            delete p_theOrcs;
            return 0;
        }
    else
        {
            return 1;
        }
}


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Mon Feb 08, 2010 10:46 am 
User avatar

Joined: Wed Oct 31, 2007 10:00 pm
Posts: 45
I don't think your problem is framework related.
If your lib is a dll and build with Rhapsody then you have to set the property CPP_CG::Class::DeclarationModifier = __declspec(dllexport)
If your lib is hand coded then you need to define the export symbol manually, e.g.

#ifdef C_EXPORT
#define _EXPORT __declspec(dllexport)
#else
#define _EXPORT __declspec(dllimport)
#endif


class _EXPORT TestClass {
....
};


Offline
 Profile  
 
 Post subject: Re: Compile OXF
PostPosted: Mon Feb 15, 2010 7:42 am 
User avatar

Joined: Mon Jan 11, 2010 9:17 am
Posts: 16
Location: Braunschweig
I don't exactly know what the problem was... but it is solved.

I build OXF within a codeblocks-project.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

cron

suspicion-preferred