pizzicato333 Posted February 8, 2015 Share Posted February 8, 2015 Hi all,i am tying compile the source without use the hcustom command. it doesn't work. it troubles me for a long time #include <GU/GU_Detail.h> #include <stddef.h> namespace HDK_Sample { static float densityFunction(const UT_Vector3 &P, void *data) { // Return the signed distance to the unit sphere return 1 - P.length(); } } int main(int argc, char *argv[]) { GU_Detail gdp; UT_BoundingBox bounds; // Evaluate the iso-surface inside this bounding box bounds.setBounds(-1, -1, -1, 1, 1, 1); // Create an iso-surface gdp.polyIsoSurface(HDK_Sample::densityFunction, NULL, bounds, 20, 20, 20); // Save to sphere.bgeo gdp.save("sphere.bgeo", NULL); return 0; } /usr/include/SYS/SYS_AtomicImpl.h:443: error: #error "Unsupported platform" #error "Unsupported platform" ^ /usr/include/SYS/SYS_Math.h:1168: error: cast from 'const void*' to 'uint {aka unsigned int}' loses precision [-fpermissive] return (uint)ptr; ^ /usr/include/SYS/SYS_Math.h:1168: error: cast from 'const void*' to 'uint {aka unsigned int}' loses precision [-fpermissive] return (uint)ptr; ^ /usr/include/SYS/SYS_Math.h:1168: error: cast from 'const void*' to 'uint {aka unsigned int}' loses precision [-fpermissive] return (uint)ptr; ^ /usr/include/SYS/SYS_Math.h:1168: error: cast from 'const void*' to 'uint {aka unsigned int}' loses precision [-fpermissive] return (uint)ptr; ^ /usr/include/SYS/SYS_Math.h:1168: error: cast from 'const void*' to 'uint {aka unsigned int}' loses precision [-fpermissive] return (uint)ptr; ^ /usr/include/SYS/SYS_Math.h:1168: error: cast from 'const void*' to 'uint {aka unsigned int}' loses precision [-fpermissive] return (uint)ptr; ^ .... Quote Link to comment Share on other sites More sharing options...
ayidi Posted February 8, 2015 Share Posted February 8, 2015 hcustom sets macro definitions for the platform and since they are missing you get: /usr/include/SYS/SYS_AtomicImpl.h:443: error: #error "Unsupported platform" Setup Qt to run hcustom or use the makefiles provided by SESI. http://www.sidefx.com/docs/hdk13.0/_h_d_k__intro__tools.html http://www.sidefx.com/docs/hdk13.0/_h_d_k__intro__compiling.html Quote Link to comment Share on other sites More sharing options...
edward Posted February 8, 2015 Share Posted February 8, 2015 I've never used qt creator but it shouldn't be too hard to use other build systems. hcustom has options to output the options that it uses by using the --cflags and --ldflags command line options. Then you can just copy/paste those into the appropriate place of your project settings. Quote Link to comment Share on other sites More sharing options...
pizzicato333 Posted February 15, 2015 Author Share Posted February 15, 2015 Thanks, i will try Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.