OpenCAMlib for Windows

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
TurBoss
Posts: 37
Joined: Mon Feb 08, 2016 10:38 pm

Re: OpenCAMlib for Windows

Postby TurBoss » Wed Dec 28, 2016 10:52 pm

thank you
GeneFC
Posts: 1654
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: OpenCAMlib for Windows

Postby GeneFC » Thu Dec 29, 2016 12:33 am

Gauthier,

Thank you!

I was able to build ocl.pyd using your instructions and files without difficulty. I had tried several times before but always got into trouble somewhere.

Gene
User avatar
TurBoss
Posts: 37
Joined: Mon Feb 08, 2016 10:38 pm

Re: OpenCAMlib for Windows

Postby TurBoss » Fri Dec 30, 2016 12:03 pm

User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Postby sgrogan » Fri Jul 07, 2017 9:29 pm

Gauthier wrote:
Mon Dec 26, 2016 2:26 pm
But, it's OK for now :D , I forked a new release on : https://github.com/fra589/opencamlib.
GeneFC wrote:
Thu Dec 29, 2016 12:33 am
I was able to build ocl.pyd using your instructions and files without difficulty. I had tried several times before but always got into trouble somewhere.
Thanks guys for the Win work!
Do to a recent help request this has bubbled up on my list.

I'm a little concerned following Gauthier's procedure for the dependencies. Using a Python27 compiled with VS2008, as a dependency to build boost_1.62 w/VS2013, to be used in FreeCAD which uses both Python27 and boost_1.55 compiled with VS2013 makes me nervous. I guess everything in ocl.pyd is statically linked and that's why it works. Anyway it would be more convienient to link against the FreeCAD libpack.

So I tried this. The first problem I encounter was ocl is trying to link against "libboost_python-vc120-mt-1_55.lib", in the libpack this is called "boost_python-vc120-mt-1_55.lib", so I made a copy and re-named (I also did the same with the corrresponding .dll file) now I'm stuck with an "unresolved external"

Code: Select all

Error	52	error LNK2001: unresolved external symbol "struct boost::python::self_ns::self_t boost::python::self_ns::self" (?self@self_ns@python@boost@@3Uself_t@123@A)	C:\Users\Chris\GitHub\opencamlib\Windows\ocl_geometry.obj	OpenCamLib
Error	53	error LNK1120: 1 unresolved externals	C:\Users\Chris\GitHub\opencamlib\Windows\x64\Release X64\ocl.pyd	OpenCamLib
Any ideas?
"fight the good fight"
User avatar
Gauthier
Posts: 105
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

Re: OpenCAMlib for Windows

Postby Gauthier » Sat Jul 08, 2017 9:06 am

Hi sgrogan,

include OCL in the libpack is à good idea... I will be happy to help...
Unfortunately, my time is not extendable and I can't do it now... I'm busy until September... :oops:

The procedure I used was for compiling OCL from scratch.

:idea: As the OCL dependency (boost) are already in the libpack, the idea for including it is to use the libpack itself to build the libpack ocl.pyd.
To do this, you can try to go directly go to the procedure item #3. and put the path of the needed files from the libpack, then build the ocl.pyd libpack version...

@++;
Gauthier.
peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: OpenCAMlib for Windows

Postby peterl94 » Sat Jul 08, 2017 4:42 pm

Rather than try to figure out why you are getting that error, I modified the cmake file to work on windows: https://github.com/peterlama/opencamlib/tree/win-cmake. It should make the Windows directory obsolete.

Using the above branch, do the following to build ocl (of course adjust paths to your system)

Code: Select all

cd opencamlib
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="D:\FreeCADLibs_11.5.2_x64_VC12" -DCMAKE_INSTALL_PREFIX=../install -G"Visual Studio 12 2013 Win64" ..
build solution
build INSTALL project
User avatar
looo
Posts: 3482
Joined: Mon Nov 11, 2013 5:29 pm

Re: OpenCAMlib for Windows

Postby looo » Sat Jul 08, 2017 7:39 pm

is it possible to make a PR for opencamlib?
peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: OpenCAMlib for Windows

Postby peterl94 » Sat Jul 08, 2017 10:57 pm

looo wrote:
Sat Jul 08, 2017 7:39 pm
is it possible to make a PR for opencamlib?
I'm planning on making a PR, I was just hoping someone could confirm that it works first. I also wanted to make sure it didn't break things for other platforms.
User avatar
looo
Posts: 3482
Joined: Mon Nov 11, 2013 5:29 pm

Re: OpenCAMlib for Windows

Postby looo » Sun Jul 09, 2017 6:45 am

It does compile on linux, but it is using the wrong python version if build with python3.

I am also using this patches for conda (the second is py3-specific):
https://github.com/looooo/FreeCAD_Conda ... oost.patch
https://github.com/looooo/FreeCAD_Conda ... _py3.patch

py2 should work with conda +linux and the boost.patch.
User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Postby sgrogan » Sun Jul 09, 2017 6:24 pm

peterl94 wrote:
Sat Jul 08, 2017 10:57 pm
I'm planning on making a PR, I was just hoping someone could confirm that it works first. I also wanted to make sure it didn't break things for other platforms.
Thank-you very, very much peterl94!!! :D :D :D
Worked perfectly for me (I think) I built 32 and 64 bit versions and added ocl.pyd to the developer build bundles (0.17.11528)
Win testing Appreciated.
"fight the good fight"