Search the web
Sign In
New User? Sign Up
dat-discussions · DAT Collaborative
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
compilation problem with DAT 2.0 header files   Message List  
Reply | Forward Message #4148 of 4166 |

I have encountered a problem with the DAT 2.0 header files from OFED 1.2 on SLES 10 when using the GNU C++ compiler.

The following "program" compiles as a C program:

  1: #include "/usr/local/include/dat/udat.h"
  2: int main()
  3: {}

If I change the file type to .cpp and compile it, I get the following:

gcc test1.cpp
/usr/local/include/dat/dat.h:288: error: use of enum dat_lmr_param_mask without previous declaration
/usr/local/include/dat/dat.h:288: error: invalid type in declaration before ; token

The compiler is complaining about a reference to an undefined enum (dat_lmr_param_mask) at line 288 of dat.h. The enum is defined at line 218 of udat.h. Unfortunately, line 120 of udat.h includes dat.h. So the compiler sees the reference at line 288 of dat.h before it sees the definition at line 218 of udat.h.

A fix is modify udat.h by moving the dat_lmr_param_mask enum definition to some place before the "#include <dat/dat.h>" line. See the attached udat.h for a "fixed" version.

thanks.




Wed Jul 11, 2007 10:05 pm

jimmy.hill@...
Send Email Send Email

Attachment
udat.h
Type:
application/octet-stream
Forward
Message #4148 of 4166 |
Expand Messages Author Sort by Date

I have encountered a problem with the DAT 2.0 header files from OFED 1.2 on SLES 10 when using the GNU C++ compiler. The following "program" compiles as a C...
Jimmy Hill
jimmy.hill@...
Send Email
Jul 11, 2007
10:01 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help