Results 1 to 13 of 13

Thread: I forgot how crazy the Microsoft dev ecosystem is. Argh.

  1. #1
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143

    I forgot how crazy the Microsoft dev ecosystem is. Argh.

    Mac OS X: Grab XCode through App store. Number of mouse clicks: 3. Cost: $0. Run, select .bundle project, compiler automatically builds combo 32/64-bit plugin.

    Microsoft Windows: A bunch of clicks. Options? Spend a lot of money for VisualStudio? No. Okay, so Visual Studio Express? A bunch more clicks. Finally get a download. Install. Dig around though about a thousand project templates trying to figure out where the .dll setup is stored. Find it. 32-bit only. A bunch more clicks and a google search later, have to download and install a separate SDK (still downloading, haven't made it past this stage).

    Alternative: Try to get GCC and Code::Blocks running, which is its own special brand of nightmare. If I can't get VSExpress C++ to work, I'll go back to that but I am not looking forward to it.

  2. #2
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Well, SDK is installed, still no way to create a 64-bit .dll. This is mad. How do you people build 64-bit plugins for windows??

  3. #3
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Oh look, Visual Studio 2012 C++11 support doesn't even work with basic things like 'constexpr'!

    Wow. Impressively awful.

    Okay, back to getting GCC to work...

  4. #4
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Currently VS 2012 Express...

    It may be trickier to set up than Xcode ( the application that is) - but I find it to be a lot smoother sailing when actually _working_ with the IDE.

    As for C++11 features... afaik only the most current version of gcc supports all of them. You're brave to use them in a cross platform project this early.

    Cheers,
    Mike

  5. #5
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    I got finally Code::Blocks up and running with TDM-GCC 64-bit, and after a refresher on the proper flags, got everything to compile. The project even directly refers to the original source via VMWare's drive sharing. That's just downright "yay!".

    I haven't been using C++11 for very long, and already I can't live without lambdas and constexpr and move constructors. Pre-C++11 already feels astoundingly primitive to me.

    After poking around in VisualStudio 2012 Express, I find I vastly prefer XCode for C++ projects. I don't like it when IDEs automatically separate out .cpp and .h files into their own sections. I have my code arranged in folders just how I want it. (Code::Blocks does this same auto-division thingy too. Hate that.) I have to say, though, that when writing C# code (which I do at my day job), VisualStudio is really slick -- an absolute joy to code in.

    Hey, if you feel like giving my new beta-quality nodes a spin, I've packaged up all the versions here:
    (No documentation yet, I'm still working on that.)
    Attached Files Attached Files
    Last edited by jrandom; 04-07-2013 at 08:45 PM.

  6. #6
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Here's how fun lambda's are: I get to create functions local to a method that can reference the object's state directly (unlike a regular function where you'd have to pass all that in as parameters), and the compiler is smart enough to inline these, negating any function-call overhead -- important when inside an Evaluate() method.

    This makes my code shorter, but just as fast as if I'd tried to hand-code out all the logic. This is inside a class's Evaluate_Color() method. The very last line is using a move constructor so there's no value copying overhead for the result of Desired_Input() which returns a wrapper object I put around LWDVector (so I could use things like move constructors).

    Code:
            // Do we use the full or Simple color?
            const bool use_gi_settings = use_GI_Settings(nodal_access);
            
            auto Full_Cutoff_Bounce = [&]()
            {
                return use_gi_settings ? Settings_GI_Full_Color_Cutoff.Value
                                       : Settings_Full_Color_Cutoff.Value;
            };
            
            auto Simple_or_Full_Input = [&]() -> const Input_Vector_t &
            {
                return (nodal_access->bounces >= Full_Cutoff_Bounce()) ? Input_Simple_Color
                                                                       : Input_Color;
            };
            
            const bool is_simple_enabled = use_gi_settings ? Settings_GI_Use_Simple_Color.Value
                                                           : Settings_Use_Simple_Color.Value;
            
            const Input_Vector_t & Desired_Input = is_simple_enabled ? Simple_or_Full_Input()
                                                                     : Input_Color;
            
            
            // Determine the base color
            LWTypes::LWDVector incoming_color( Desired_Input.Get(nodal_access) );
    Last edited by jrandom; 04-07-2013 at 08:58 PM.

  7. #7
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    By the way, Visual Studio Express supports only 32-bit compiling.

  8. #8
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Quote Originally Posted by Styler View Post
    By the way, Visual Studio Express supports only 32-bit compiling.
    2012 supports 64-bit as well. Yes, I was surprised.

    Cheers,
    Mike
    Last edited by Lightwolf; 04-08-2013 at 06:56 AM.

  9. #9
    Registered User
    Join Date
    Oct 2009
    Location
    Iceland
    Posts
    55
    Thanks for info Lightwolf, i didn't know about it

  10. #10
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    You have to run the configuration manager and add a new one to get the 64-bit target, as it's not a default selectable configuration. I had to google around to figure it out. Very non-intuitive.

    It's too bad about the woefully-incomplete c++11 support. C++ is almost like a whole new language now, and much better for it.

  11. #11
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Quote Originally Posted by jrandom View Post
    You have to run the configuration manager and add a new one to get the 64-bit target, as it's not a default selectable configuration. I had to google around to figure it out. Very non-intuitive.
    At least you found it. Don't ask me about the issues I've had with Xcode coupled with the lack of meaningful results searching for information...
    The whole un*x legacy seems to also be a good base for some really odd errors when using third party libraries - especially as a plugin is the host uses the same one. *sigh*
    Quote Originally Posted by jrandom View Post
    It's too bad about the woefully-incomplete c++11 support. C++ is almost like a whole new language now, and much better for it.
    "woefully" is a bit strong imho. Not as complete as the current gcc... but neither are full C++11 right now either.

    On the other hand... you get C++ AMP.

    Cheers,
    Mike

  12. #12
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Oooh! AMP looks neat! Of course, I'll never use it because it's not cross-platform and there's no way I'll ever tie myself to a single system, whether it be Apple, Microsoft, NVIDIA, whatever. But still, AMP looks nifty.

  13. #13
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Quote Originally Posted by jrandom View Post
    Oooh! AMP looks neat! Of course, I'll never use it because it's not cross-platform and there's no way I'll ever tie myself to a single system, whether it be Apple, Microsoft, NVIDIA, whatever. But still, AMP looks nifty.
    See, that's why I'm careful with my code as well...
    Oh, it's an open standard by the way ... it just needs to be adopted by others as well. Hm, sounds familiar...

    Cheers,
    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •