Zurück zu Willert.de

Build TestContext Fails

Build TestContext Fails

Postby ramont » June 21st, 2010, 1:19 pm

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:
Code: Select all
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?
ramont
 
Posts: 7
Joined: June 21st, 2010, 12:34 pm

Re: Build TestContext Fails

Postby shanz » June 21st, 2010, 1:22 pm

Perhaps you should try to change the component's configuration from Microsoft to MSVC9?
shanz
 
Posts: 181
Joined: May 7th, 2008, 5:50 pm
Location: Horsham, W Sussex, England

Re: Build TestContext Fails

Postby ramont » June 21st, 2010, 2:16 pm

How do I do that?
ramont
 
Posts: 7
Joined: June 21st, 2010, 12:34 pm

Re: Build TestContext Fails

Postby oakdemir » June 21st, 2010, 3:05 pm

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 42297 times
oakdemir
 
Posts: 141
Joined: June 24th, 2008, 8:18 pm
Location: Ankara

Re: Build TestContext Fails

Postby ramont » June 22nd, 2010, 8:25 am

Are you telling that Rhapsody cannot be made to work without compiling wrapper around system libraries? That sounds unusal.
ramont
 
Posts: 7
Joined: June 21st, 2010, 12:34 pm

Re: Build TestContext Fails

Postby oakdemir » June 22nd, 2010, 9:27 am

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..
oakdemir
 
Posts: 141
Joined: June 24th, 2008, 8:18 pm
Location: Ankara

Re: Build TestContext Fails

Postby ramont » June 22nd, 2010, 1:05 pm

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:
Code: Select all
"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.

ramont
 
Posts: 7
Joined: June 21st, 2010, 12:34 pm

Re: Build TestContext Fails

Postby ramont » June 23rd, 2010, 8:54 am

Ok, ATG needed me to set Visual Studio 2008 as the default compiler: http://www-01.ibm.com/support/docview.w ... wg21397446
ramont
 
Posts: 7
Joined: June 21st, 2010, 12:34 pm

Re: Build TestContext Fails

Postby ramont » June 23rd, 2010, 10:55 am

Well, now if I generate tests I get:
Code: Select all
"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.
ramont
 
Posts: 7
Joined: June 21st, 2010, 12:34 pm

Re: Build TestContext Fails

Postby KalleBlaschke » June 24th, 2010, 11:39 am

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.
KalleBlaschke
 
Posts: 12
Joined: January 25th, 2010, 1:40 pm

Next

Return to TestConductor, ATG, Gateway, ReporterPlus

Who is online

Users browsing this forum: No registered users and 1 guest