It is currently Wed Feb 08, 2012 11:43 pm



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 [ 12 posts ] 
Author Message
 Post subject: Build TestContext Fails
PostPosted: Mon Jun 21, 2010 11:19 am 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
I have installed Rhapsody 7.5.2. and Visual Studio 2008 on an XP (with service pack 3). When I tried to follow the ATG tutorial on the Vending Machine example after "Create TestArchitecture" my "Build TestContext" fails with:
Executing: ""E:\Rhapsody\Share"\etc\msmake.bat TPkg_DrinkDispenser_Comp.mak build "
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
Linking TPkg_DrinkDispenser_Comp.exe
LINK : fatal error LNK1104: cannot open file 'wsock32.lib'
NMAKE : fatal error U1077: '"E:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' : return code '0x450'
Stop.


Actually before I even got to this phase I had to copy msvc9make.bat as msmake.bat as this is the file Rhapsody expects to see. I also had to rename some libraries in Rhapsody\Share\LangCpp\Lib by removing the "VC9" from the name as Rhapsody was looking for libs without that.

I have Microsoft SDKs installed, and the library in question seems to be in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib. Any idea how I can make Rhapsody to link to these SDK libs?


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Mon Jun 21, 2010 11:22 am 

Joined: Wed May 07, 2008 3:50 pm
Posts: 148
Location: Horsham, W Sussex, England
Perhaps you should try to change the component's configuration from Microsoft to MSVC9?


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Mon Jun 21, 2010 12:16 pm 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
How do I do that?


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Mon Jun 21, 2010 1:05 pm 

Joined: Tue Jun 24, 2008 6:18 pm
Posts: 141
Location: Ankara
I remember that I had worked a lot to make wsock32 lib work in Rhapsody environment, by playing with Configuration Settings -> Libraries and --> Headers fields, but could not succeed. I think the problem actually stems from various incompatibilities in Microsoft's different versions of WinSock headers and libraries, as well as some compiler specific settings. I believe it is not a Rhapsody-specific problem.

My solution was to prepare a LIB using VisualStudio and refer this lib and its header file from Rhapsody as shown in the attachment. That is to say, do not teach Rhapsody which WinSock lib and WinSock header to use. Instead, use Visual Studio and prepare a user LIB which knows how to access WinSock stuff and then let Rhapsody refer the generated user lib and user header.

Hope, this helps.

Özgür Eser Akdemir.


Attachments:
Socket.PNG
Socket.PNG [ 69.59 KiB | Viewed 981 times ]
Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Tue Jun 22, 2010 6:25 am 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
Are you telling that Rhapsody cannot be made to work without compiling wrapper around system libraries? That sounds unusal.


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Tue Jun 22, 2010 7:27 am 

Joined: Tue Jun 24, 2008 6:18 pm
Posts: 141
Location: Ankara
No, I am not telling it can not be made to work. But, WinSock stuff makes it really hard.
That's why, after a 2-days tiring work, I could not succeed and found the solution I described above.

Please inform me if you can succeed in another way..


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Tue Jun 22, 2010 11:05 am 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
Well, for now I get passed this problem by simply copying the referenced .lib to the directory where Rhapsody generated the source codes. However, after I try to "Apply ATG" Rhapsody reports several compiler errors:
"e:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\yvals.h", line 591: error:
          identifier "__thiscall" is undefined
      explicit __thiscall _Lockit();   // set default lock
               ^

...

Error limit reached.
100 errors detected in the compilation of "E:\Rhapsody\Samples\CppSamples\Atg\TheVendingMachineStart\TheVendingMachine_ATG.tmp\cppinfo.all.cpp".
Compilation terminated.



Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Wed Jun 23, 2010 6:54 am 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
Ok, ATG needed me to set Visual Studio 2008 as the default compiler: http://www-01.ibm.com/support/docview.w ... wg21397446


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Wed Jun 23, 2010 8:55 am 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
Well, now if I generate tests I get:
"E:\Rhapsody\Atg\LangCppOXF\oxf/ntos.h", line 25: compilation failure: could
          not open source file "windows.h"
  #include <windows.h>
                      ^


1 compilation failure detected in the compilation of "E:\Rhapsody\Samples\CppSamples\Atg\TheVendingMachineStart\TheVendingMachine_ATG.tmp\src\Fullmodel.cpp".
Compilation terminated.


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Thu Jun 24, 2010 9:39 am 

Joined: Mon Jan 25, 2010 11:40 am
Posts: 12
Hi Ramont,

you just did one mistake at the very first beginning: When you got the compilation errors
, you tried to rename files etc. This is all not needed. You just need to set the compilation environment
from "Microsoft" to "MSVC9". That's it, then it works.

Now, since you did several changes in your installation, I propose the following.

1. Uninstall Rhapsody. After uninstallation, if there are remaining files, delete them.

2. Install Rhapsody again.

3. Open the sample model, create a test architecture, and before doing apply ATG, simply switch
the compilation environment from "Microsoft" to "MSVC9".

That's it, then everything should work fine.


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Thu Jun 24, 2010 9:53 am 

Joined: Mon Jun 21, 2010 10:34 am
Posts: 7
Thanks for the reply. That is what I eventually did as I posted above, however this wasn't enough but I also needed to rebuild the Rhapsody environment as described in http://publib.boulder.ibm.com/infocente ... /index.jsp. I also finally got over the missing windows.h by just copying SDK headers into E:\Rhapsody\Atg\LangCppOXF\oxf which again sounds a bit hairy but that was the only way could generate tests.


Offline
 Profile  
 
 Post subject: Re: Build TestContext Fails
PostPosted: Thu Jun 24, 2010 9:18 pm 

Joined: Fri Jan 16, 2009 2:02 pm
Posts: 14
Hi,

perhaps it helps to add a call to vcvars32.bat in the Rhapsody build script msmake.bat under Rhapsody/share/etc.

I'm not shure where I found the vcvars32.bat file. In the VS200X installation directory or even in the Rhapsody subdirectories.

Roy


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


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