## Video: Building on Windows

Discussion and help for Compilation problems and platform portability.

Moderator: coordinators

### Re: Video: Building on Windows

I'm installing the windows SDK and it stopped while looking for releasenotes.htm file:
Code: Select all
9:59:38 PM June-26-11: [SDKSetup:Info] Setup expects to find a local readme at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\ReleaseNotes.Htm

I manually found the file exactly where it should be, except its called releasenotes.html, not htm. Is there a way to fix this?
Studio XPS 9100 | 2.8 Ghz Intel 930 | 12 GB RAM | Radeon 5870 1GB

A-man

Posts: 687
Joined: Sat Apr 24, 2010 4:24 pm

### Re: Video: Building on Windows

No idea

dougal2

Posts: 3074
Joined: Mon Jan 14, 2008 7:21 am

### Re: Video: Building on Windows

I settled for the 32 bit build, and after completion, it said the build should be in the Dist directory. I cant find the folder. I have everything done according to tutorial(base folder named Luxsource, with a windows and luxrays folder). Would you be able to point me to the finished product?
EDIT: before you ask me to try a search, I did, and there were a ton of files called Dist.

EDIT2: I found it. The directory was pointed to in the readme
Studio XPS 9100 | 2.8 Ghz Intel 930 | 12 GB RAM | Radeon 5870 1GB

A-man

Posts: 687
Joined: Sat Apr 24, 2010 4:24 pm

### Re: Video: Building on Windows

While building LuxRays I get 'build failed' while buliding solution configuration "Release|Win32".

Code: Select all
*************************************************************************** Building LuxRays                                                       ***************************************************************************Microsoft (R) Build Engine Version 3.5.30729.4926[Microsoft .NET Framework, Version 2.0.50727.4961]Copyright (C) Microsoft Corporation 2007. All rights reserved.Build started 28/06/2011 10:46:01 PM.     1>Project "C:\Users\me\Desktop\LuxSource\windows\lux.sln" on node 0 (luxrays;benchpixel;benchsimple ta       rget(s)).         Building solution configuration "Release|Win32".     1>C:\Users\me\Desktop\LuxSource\windows\include\CL/cl.hpp(161): fatal error C1083: Cannot open include        file: 'CL/opencl.h': No such file or directory     1>Done Building Project "C:\Users\me\Desktop\LuxSource\windows\lux.sln" (luxrays;benchpixel;benchsimpl       e target(s)) -- FAILED.Build FAILED.

Any idea? There is a C/C++ Header file named cl in the noted folder, but that's it.
Studio XPS 9100 | 2.8 Ghz Intel 930 | 12 GB RAM | Radeon 5870 1GB

A-man

Posts: 687
Joined: Sat Apr 24, 2010 4:24 pm

### Re: Video: Building on Windows

Hi,

The CL\cl.hpp file is trying to include a CL\opencl.h file which is apparently missing.

Jeanphi
jeanphi

Posts: 6580
Joined: Mon Jan 14, 2008 7:21 am

### Re: Video: Building on Windows

opencl.h should be included by the OpenCL distribution you use. If you plan to build without OpenCL you need to use the right build configuration (in the solution file).
May contain traces of nuts.

Lord Crc

Posts: 4459
Joined: Sat Nov 17, 2007 2:10 pm

### Re: Video: Building on Windows

I'm getting an error:
Code: Select all
cl.hpp(2996) : error C2664: 'clEnqueueNativeKernel' : cannot convert parameter 2 from 'void (__stdcall *)(void *)' to 'void (__cdecl *)(void *)'6>        This conversion requires a reinterpret_cast, a C-style cast or function-style cast

google-ing the error I found a pastebin page with A-man as user and since it's a paste from a luxrender compile I'm guessing it's the same user as our A-man.

Any idea how it can be dealt with? (on ubuntu it compiles just fine...)

vimax

Posts: 192
Joined: Wed Jul 02, 2008 9:39 pm

### Re: Video: Building on Windows

vimax wrote:I'm getting an error:
Code: Select all
cl.hpp(2996) : error C2664: 'clEnqueueNativeKernel' : cannot convert parameter 2 from 'void (__stdcall *)(void *)' to 'void (__cdecl *)(void *)'6>        This conversion requires a reinterpret_cast, a C-style cast or function-style cast

google-ing the error I found a pastebin page with A-man as user and since it's a paste from a luxrender compile I'm guessing it's the same user as our A-man.

Any idea how it can be dealt with? (on ubuntu it compiles just fine...)

It seams that the call to the cl.hpp C++ function enqueueNativeKernel() is done with a function pointer with wrong calling convention (must be __cdecl).

I am a little bit out with current luxrende/luxray source, could you post where or in which file the call is?

homer

Posts: 89
Joined: Wed Mar 26, 2008 11:28 pm
Location: Germany

### Re: Video: Building on Windows

Aha, you found my nemesis! That comes right at the end after a long half hour wait to show you it was all for nothing I asked about it on IRC and was able to get a custom getdeps.bat, which after going through the process again fixed the problem, but only once, and it hasn't worked again. You can try with this and see if it works. It only helped me in the build-deps stage, it produced a bad solution file.
Attachments
getdeps.zip
Studio XPS 9100 | 2.8 Ghz Intel 930 | 12 GB RAM | Radeon 5870 1GB

A-man

Posts: 687
Joined: Sat Apr 24, 2010 4:24 pm

### Re: Video: Building on Windows

Thanks for the fast responses.
I'm currently building qt on an atom laptop so it's gonna take a while...

A-man: the only differences I see are some typos that have been fixed, so whatever happened that fixed it I'm pretty sure it wasn't this .bat file, I'll give it a go later anyway.

homer: I got the same error for what seemd a hundred times, however while searching nativeKernel in the whole solution It only finds the string in the cl.hpp and each time the error is reported in the cl.hpp not from a specified call. (but always the error is in line 2994). I'll try to come with more usefull info but later since now I'm stuck with the qt build for quite a while...

vimax

Posts: 192
Joined: Wed Jul 02, 2008 9:39 pm

PreviousNext