Configure Error:Unknown CMake command "fc_wrap_cpp".

Having trouble installing or compiling FreeCAD? Get help here.
tak
Posts: 22
Joined: Thu May 02, 2019 2:32 am

Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby tak » Thu May 02, 2019 6:41 am

I am new to FreeCAD. I want to compile FreeCAD 0.18 with VS2013 following this page: https://www.freecadweb.org/wiki/Compile ... ith_VS2013

In the Configuring and Generating with Cmake part, when I click Configure, there is a error message
"CMake Error at src/Base/CMakeLists.txt:183 (fc_wrap_cpp):
Unknown CMake command "fc_wrap_cpp"."

I am using WIN10 64bit and these source:
FreeCAD 0.18
https://github.com/FreeCAD/FreeCAD/releases

Libpack FreeCADLibs_11.11_x86_VC12.7z
https://github.com/FreeCAD/FreeCAD-port ... /tag/v0.18

How can I fix it?
wmayer
Site Admin
Posts: 14610
Joined: Thu Feb 19, 2009 10:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby wmayer » Thu May 02, 2019 8:23 am

fc_wrap_cpp is defined in the top-level CMakeLists.txt file. Maybe you chose the wrong source directory in the CMake GUI.
tak
Posts: 22
Joined: Thu May 02, 2019 2:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby tak » Thu May 02, 2019 9:00 am

wmayer wrote:
Thu May 02, 2019 8:23 am
fc_wrap_cpp is defined in the top-level CMakeLists.txt file. Maybe you chose the wrong source directory in the CMake GUI.
my source directory like this.
https://imgur.com/YFwgPwg
https://imgur.com/ctTRH0L
wmayer
Site Admin
Posts: 14610
Joined: Thu Feb 19, 2009 10:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby wmayer » Thu May 02, 2019 9:53 am

tak wrote:
Thu May 02, 2019 9:00 am
wmayer wrote:
Thu May 02, 2019 8:23 am
fc_wrap_cpp is defined in the top-level CMakeLists.txt file. Maybe you chose the wrong source directory in the CMake GUI.
my source directory like this.
https://imgur.com/YFwgPwg
https://imgur.com/ctTRH0L
From the pictures it's not easy to see if the correct source path is used or not -- but it probably is correct. But what's definitely wrong is the path to FREECAD_LIBPACK_DIR. This should be FreeCADLibs_11.11_x86_VC12
tak
Posts: 22
Joined: Thu May 02, 2019 2:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby tak » Tue May 07, 2019 3:12 am

wmayer wrote:
Thu May 02, 2019 9:53 am
tak wrote:
Thu May 02, 2019 9:00 am
wmayer wrote:
Thu May 02, 2019 8:23 am
fc_wrap_cpp is defined in the top-level CMakeLists.txt file. Maybe you chose the wrong source directory in the CMake GUI.
my source directory like this.
https://imgur.com/YFwgPwg
https://imgur.com/ctTRH0L
From the pictures it's not easy to see if the correct source path is used or not -- but it probably is correct. But what's definitely wrong is the path to FREECAD_LIBPACK_DIR. This should be FreeCADLibs_11.11_x86_VC12
Thank you very much. But I got another problem.
I can configure and generate now. But when I build the solution in VS2013, there are many error message said that "xxxx.hxx" file not found.
I try to set the OCE_DIR in cmake. after Configure, it become "OCE_DIR-NOTFOUND" again.

There are the Configure message and error message in VS2013:
https://imgur.com/Vg8X3U3
https://imgur.com/DpRxtJT
User avatar
apeltauer
Posts: 205
Joined: Fri Aug 11, 2017 2:19 pm

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby apeltauer » Tue May 07, 2019 5:29 am

Do you have any special need to use the libpack 11.11? Why dont you try the new libpack? The cmake config files should handle everything by it self...
Here the link(https://forum.freecadweb.org/viewtopic.php?f=4&t=35789)
tak
Posts: 22
Joined: Thu May 02, 2019 2:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby tak » Tue May 07, 2019 6:19 am

apeltauer wrote:
Tue May 07, 2019 5:29 am
Do you have any special need to use the libpack 11.11? Why dont you try the new libpack? The cmake config files should handle everything by it self...
Here the link(https://forum.freecadweb.org/viewtopic.php?f=4&t=35789)
No. I have not special need to use the libpack 11.11. I just want to use FreeCAD 0.18 and found that libpack under 0.18.
From your link, it is 0.19pre version. Am I just download the libpack FreeCADLibs_12.1.2_x64_VC15.7z and put in my folder?
and my version is still 0.18?

I am new to FreeCAD. sorry about the basic question.
User avatar
apeltauer
Posts: 205
Joined: Fri Aug 11, 2017 2:19 pm

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby apeltauer » Tue May 07, 2019 6:50 am

ok, if you want to have the fc 0.18 then the new libpack may is not the right one. But why not trying the current git version?
In my experience the latest git versions are pretty good.
tak
Posts: 22
Joined: Thu May 02, 2019 2:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby tak » Tue May 07, 2019 7:13 am

apeltauer wrote:
Tue May 07, 2019 6:50 am
ok, if you want to have the fc 0.18 then the new libpack may is not the right one. But why not trying the current git version?
In my experience the latest git versions are pretty good.
is 0.19pre stable enough? can it install the external python library?
I choose 0.18 because of my boss tried it is quite stable for him and it can install the external python library like pandas.
User avatar
apeltauer
Posts: 205
Joined: Fri Aug 11, 2017 2:19 pm

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Postby apeltauer » Tue May 07, 2019 7:30 am

i would say, give it a try.... :)
  • clone the freecad git repo
  • create a folder for your build, e.g. "bin" next to your freecad repository
  • create a folder for the libpack, e.g. "FreeCADLibs_11.5.3_x64_VC12" next to your freecad repository
  • create a environment variable "FREECAD_LIBPACK_DIR" and select the path to the libpack (i usually set the variable in cmd with set.... )
  • run cmake, select your repository as source code and your bin folder as "where to build the binaries"
  • click configure, select your compiler and make sure you select the x64 version!
  • cmake should find all dependencies from the libpack