Thread: RapidMind fails to compile

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195

    RapidMind fails to compile

    as soon as I add the line -
    Code:
    #include <rapidmind\platform.hpp>
    the project refuses to compile. I can compile the samples just fine, so im assuming its some project setting in VS2005. I would appreciate any help, a google for help just turns up 50000 pages all touting how great RM is, but none of them actually have any example code.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    And what sort of error message do you get?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(156) : warning C4003: not enough actual parameters for macro 'max'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2988: unrecognizable template declaration/definition
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2059: syntax error : '('
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2059: syntax error : ')'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2143: syntax error : missing ')' before '?'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2143: syntax error : missing ';' before '?'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2935: 'rapidmind::Fraction<T>' : template-class-id redefined as a global function
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2988: unrecognizable template declaration/definition
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2059: syntax error : '?'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2065: 'T' : undeclared identifier
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2226: syntax error : unexpected type 'rapidmind::Fraction'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(264) : error C2059: syntax error : ')'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(267) : error C2226: syntax error : unexpected type 'rapidmind::Fraction'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(267) : error C2059: syntax error : ')'
    1>c:\program files\rapidmind\include\rapidmind\platform\Fractio n.hpp(270) : fatal error C1903: unable to recover from previous error(s); stopping compilation


    but the isue isnt witht he header file, since I can comp[ile their example and it runs with no problems. Their 'tutorial' says all you have to do is install the RM SDK and then include that header file, but obviously it isnt that simple. Im starting to think theres a reason why Google bought PeakStream instead of rapidmind.
    Last edited by abachler; 12-12-2007 at 09:34 AM.

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    did you define your own 'max' macro?

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I had a similar problem a while back - it was to do with a max() macro defined in some MS header file. Try putting your RapidMind header above all other header files [or as far up as you can, at least].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    I feel like a nub, the problem was I didnt RTFM, or at least not enough of it. Seems you have to make certain specific changes to the default project settings depending on which compiler you are using. Now everything is hunkey dorey.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    You mean someone wrote some horribly generic name like 'max' without using a namespace?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    hey dont look at me, thats all part of the RapidMind SDK stuff. Not that it ended up working anyway. For all the hype, I cant get anything except their examples to actually run. It compiles fine, btu then theres all these dependencies on DLL's that keep popping up. Their SDK is extremely poorly documented.

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Their SDK is extremely poorly documented.
    Aren't most?

    The examples companies give in their SDK docs are so simple and easy yet rarely apply to anything close to what you are trying to do or what any normal person would want to do.

    Doing hello world via some new library or SDK really doesn't help me much.

  10. #10
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    oh its not the GPU programming itself, its all the crap you have to do just to get their DLL to load correctly thats giving me fits. I finally gave up this afternoon and am just looking into NVidia's new GPU SDK, FireStream. So far it looks like it might be better.

  11. #11
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    The creator of RapidMind is a prof at my school. He's giving a talk about it tomorrow, I'll let him know that 'abachler' from 'cprog' thinks the SDK sucks

  12. #12
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    The SDK is fine, Its just the documentation needs some polishing. After several emails between myself and what I assume is one of their engineers, we figured out what the problem was and I will be testing our application this afternoon. If all goes well we should be crunching numbers by the end of the week. Many thanks to Mr. Czyrnyj for the assistance he gave me.
    Last edited by abachler; 12-13-2007 at 01:49 PM.

  13. #13
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Bubba View Post

    Doing hello world via some new library or SDK really doesn't help me much.
    Well, what I hate is when they do just the opposite and hand you a practicaly commercial quality, highly optimized application and expect you to reverse engineer it to figure out what they are doing. I like the example rapidmind gives, it shows you how to do a simple addition of 2 vectors. That makes it easier to expand that to target my specific problem. What I didnt like is that all the project setup you needed to do wasnt as obvious.

  14. #14
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well, what I hate is when they do just the opposite and hand you a practicaly commercial quality, highly optimized application and expect you to reverse engineer it to figure out what they are doing.
    I have rarely seen that in any SDK documentation.

  15. #15
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Well, I was perhaps exagerating a bit. But some examples, such as the ones in the DirectShow SDK, have a tendancy to throw in too many bells and whistles in the example. An example should demonstrate only one particular technique. If it is demonstrating how to capture video from a webcam, thats all it should show in its most basic easy to follow format, not how to also capture sound and write it to an AVI file on a remote server using SSL through a proxy server that is autodetected through DHCP and how to bake quintuple death by chocolate fudge brownies with sprinkles. Examples should follow the old rule of Keep It Simple, Stupid. If you want to demonstrate several techniques then write several examples.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C and C++ compile speed
    By swgh in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-02-2007, 02:37 PM
  2. Compile as you type
    By Rocketmagnet in forum A Brief History of Cprogramming.com
    Replies: 33
    Last Post: 12-07-2006, 01:36 PM
  3. How to compile mfc libs from platform sdk
    By tjcbs in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2006, 08:20 AM
  4. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 09:05 PM
  5. How can I compile C or C++ with Visual Studio .NET?
    By Dakkon in forum C Programming
    Replies: 8
    Last Post: 02-11-2003, 02:58 PM