Compilation error VS 2013

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Compilation error VS 2013

Post by Luxart »

Hi Dade,
I get the following KernelSource link errors while compiling luxcore in VS 2013

error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > luxrays::ocl::KernelSource_bbox_types" (?KernelSource_bbox_types@ocl@luxrays@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)

VS generates error for all KernelSource files. In alpha stage, I can compile without errors.
But in beta due to NVIDIA compile problems, it seems you have changed the kernel source files from src to include directory and those files are not in string format.
Am i missing any setting or files. How to get rid of these errors.
Also I'm not using CMAKE. I'm importing dirctly the source files into VS2013 and compiling it.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compilation error VS 2013

Post by Dade »

Luxart wrote: Sat Apr 07, 2018 8:15 am I get the following KernelSource link errors while compiling luxcore in VS 2013

error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > luxrays::ocl::KernelSource_bbox_types" (?KernelSource_bbox_types@ocl@luxrays@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)

VS generates error for all KernelSource files. In alpha stage, I can compile without errors.
But in beta due to NVIDIA compile problems, it seems you have changed the kernel source files from src to include directory and those files are not in string format.
Am i missing any setting or files. How to get rid of these errors.
Also I'm not using CMAKE. I'm importing dirctly the source files into VS2013 and compiling it.
Ok, this is due to Toby's patch (https://github.com/LuxCoreRender/LuxCore/pull/75) for some cleanup in cmake procedure. The .cl are now translated in .cpp inside a dedicated "LuxCore/generated/luxrays-kernels" and "LuxCore/generated/slg-kernel" directory and generated .cpp are not more part of the GitHub repository.

There are few possible solution to your problem but first of all, do you have any particular reason to not use the standard compilation procedure described here: https://github.com/LuxCoreRender/WindowsCompile

After you run the .bat script one time, there is VS project you can open directly inside VS2013 and work there like in any other VS project, the path is: WindowsCompile/Build_CMake/LuxCore/ALL_BUILD.vcxproj
Support LuxCoreRender project with salts and bounties
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Compilation error VS 2013

Post by Luxart »

I don't know how to use CMAKE to build app. I find it easy building directly from VS 2013.
I tried using CMAKE before and it gave me errors :( .

Today again i tried building with it following instructions in the link provided by you. It gave me link errors mainly boost and python. but I have those lib files in "WindowsCompileDeps" Directory. I have also attached the error file.

Also I make some changes (introducing biased ideas) in source files to speed up the rendering ;) . Also I only need to build pyluxcore. But in CMAKE lot of other exe and libs are generated :oops: , don't know how to disable it.

Is there alternative way to have that KernelSource files in cpp format as before, so that I can build directly from VS 2013. Thanks for the help :) .
Attachments
Link Error.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compilation error VS 2013

Post by Dade »

Luxart wrote: Sat Apr 07, 2018 12:24 pm Today again i tried building with it following instructions in the link provided by you. It gave me link errors mainly boost and python. but I have those lib files in "WindowsCompileDeps" Directory. I have also attached the error file.
I need to see the first reported error by cmake to have an idea of what is going wrong (just better if you cut&paste the complete text output).
Luxart wrote: Sat Apr 07, 2018 12:24 pm Is there alternative way to have that KernelSource files in cpp format as before, so that I can build directly from VS 2013. Thanks for the help :) .
Only by getting all .cpp files from someone else with a working compiling procedure. Anyway, the cmake procedure is quite simple and it will work for any new version of the sources so it is worth spending time to fix the problem. Have you installed a recent version of cmake ?
Support LuxCoreRender project with salts and bounties
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Compilation error VS 2013

Post by Luxart »

I have included the error from starting point.
I can't include the full error list, As I can't upload any file other than image in this forum.

CMAKE generates GB's of files(libs, exes, VS projects etc).
Also When I checked the "\luxcorerender\WindowsCompile\Build_CMake\LuxCore" folder. Slg Kernels and Luxrays Kernels are generated in the "generated" folder. I can use these files in VS 2013 :D .

Now, All I have to know is how to use CMAKE only to generate these (Slg & Luxrays Kernel) files. Thanks for your help :) .
Attachments
Link Error.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compilation error VS 2013

Post by Dade »

It says python35.lib file is missing, the file is here: https://github.com/LuxCoreRender/Window ... elease/lib

Do you have that file in WindowsCompileDeps/x64/Release/lib directory ?
Support LuxCoreRender project with salts and bounties
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Compilation error VS 2013

Post by Luxart »

Yes ofcourse, As I already said both python and boost libs are there in the specified folder.
I can even compile from VS2013 by pointing to the WindowsCompileDeps/x64/Release/lib directory.
Only from CMAKE it gives me the error.

I can generate the Kernel files through CMAKE (only linking gives problem) :x .

I just want to know how to change the CMAKE configuration to only generate kernel(SLG & Luxrays) files, so that I can use it in VS ;) .

Everytime I don't want to generate all other files as some lib files are in GB :o and it is not required for me. Thanks
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Compilation error VS 2013

Post by Luxart »

Any ideas how to configure CMAKE to only generate (SLG & Luxrays) kernel files :roll: .
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compilation error VS 2013

Post by Dade »

Luxart wrote: Mon Apr 09, 2018 11:10 am Any ideas how to configure CMAKE to only generate (SLG & Luxrays) kernel files :roll: .
No, the right way to solve this problem is to fix cmake procedure. Have you check if python35.lib is the correct file ? For instance, if you have extracted WindosCompileDeps without git-lfs extension it will be just a text file and not the binary library it should be.
Support LuxCoreRender project with salts and bounties
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Compilation error VS 2013

Post by Luxart »

The python and boost all are correct working files, As I can generate pyluxcore from VS 2013 (directly importing all the src files in VS).
Only thru CMAKE it gives the error
Post Reply