linking error

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

linking error

J. Scheurich

I use the headerfile only version of cgal 4.12 with visual c++ 2017
community.

i got the following linking errror:

 >LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
nicht geöffnet werden.

...can't be opened

so long
MUFTI

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

Sebastien Loriot (GeometryFactory)
Could you describe the steps you did to use the header only version
and when did you get the error message?

Thanks,

Sebastien.

On 07/09/2018 01:42 AM, j. scheurich wrote:

>
> I use the headerfile only version of cgal 4.12 with visual c++ 2017
> community.
>
> i got the following linking errror:
>
>  >LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
> nicht geöffnet werden.
>
> ...can't be opened
>
> so long
> MUFTI
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

J. Scheurich

> Could you describe the steps you did to use the header only version
> and when did you get the error message?

I clicked headeronly verion in cmake-gui, clicked to configure, clicked
to generate, clicked to
open project and used Erstellen (Create) -> something_forgotten erstellen.

The errormessage i got when i try to link the application using cgal
(white_dune).

so long
MUFTI


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

Sebastien Loriot (GeometryFactory)
Could it be that you already configured CGAL in-source?
Actually, starting from CGAL 4.12, when you have a fresh extracted CGAL,
you can directly use it without having to call cmake on it, like it is
described here:
https://doc.cgal.org/latest/Manual/installation.html#title16
by directly configuring the project using CGAL that you want to build.

Sebastien.

On 07/09/2018 05:41 PM, j. scheurich wrote:

>
>> Could you describe the steps you did to use the header only version
>> and when did you get the error message?
>
> I clicked headeronly verion in cmake-gui, clicked to configure, clicked
> to generate, clicked to
> open project and used Erstellen (Create) -> something_forgotten erstellen.
>
> The errormessage i got when i try to link the application using cgal
> (white_dune).
>
> so long
> MUFTI
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

J. Scheurich


Am 09.07.2018 um 17:52 schrieb Sebastien Loriot (GeometryFactory):
> Could it be that you already configured CGAL in-source?
> Actually, starting from CGAL 4.12, when you have a fresh extracted CGAL,
> you can directly use it without having to call cmake on it, like it is
> described here:
> https://doc.cgal.org/latest/Manual/installation.html#title16
> by directly configuring the project using CGAL that you want to build.
C:\cygwin64\home\mufti\CGAL-4.12>cmake
-DCGAL_DIR=C:\cygwin64\home\mufti\CGAL-4.12
....
-- Build CGAL from release in directory CGAL-4.12
-- Packagenames: CGAL-4.12
== Setting paths (DONE)

==== Generate version files ==
CMake Error at CMakeLists.txt:252 (message):
  File VERSION or include/CGAL/version.h are missing, required by
   release-build.

-- Configuring incomplete, errors occurred!
See also "C:/cygwin64/home/mufti/CGAL-4.12/CMakeFiles/CMakeOutput.log".

Lets try wth libraries...

so long
MUFTI

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

J. Scheurich
In reply to this post by J. Scheurich

>
> I use the headerfile only version of cgal 4.12 with visual c++ 2017
> community.
>
> i got the following linking errror:
>
> >LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
> nicht geöffnet werden.
>
> ...can't be opened

Now understand: "header only" version of CGAL do not mean, there are
only headerfiles (like in vcglib).
"header only" version means: the linking command is in a special pragma
in the hederfiles (like in boost).
"libCGAL-vc140-mt-gd-4.12.lib" is really needed.

so long
MUFTI

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

Laurent Rineau (CGAL/GeometryFactory)
Le Tuesday, July 10, 2018 12:30:27 PM CEST j. scheurich a écrit :

> > I use the headerfile only version of cgal 4.12 with visual c++ 2017
> > community.
> >
> > i got the following linking errror:
> > >LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
> >
> > nicht geöffnet werden.
> >
> > ...can't be opened
>
> Now understand: "header only" version of CGAL do not mean, there are
> only headerfiles (like in vcglib).
> "header only" version means: the linking command is in a special pragma
> in the hederfiles (like in boost).
> "libCGAL-vc140-mt-gd-4.12.lib" is really needed.


No. You missundertood. The autolink should be disabled. You probably do not
use CGAL CMake scripts to generate the build system of your own project.

Make sure the macro CGAL_HEADER_ONLY is defined to 1, in the properties of
your project. That will enable the header-only behavior of CGAL headers, and
in particular it will deactivate the auto-link for CGAL libraries.
Dependencies of CGAL will still be needed: at least MPFR, and GMP, and maybe
others.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

Sebastien Loriot (GeometryFactory)
In reply to this post by J. Scheurich
Actually we just noticed that if you install CGAL on windows
using the .exe installer you'll be missing the file CGALConfig.cmake
at the root of the directory.
While we are officially fixing the issue, you can take the file
from here:
https://raw.githubusercontent.com/CGAL/cgal/master/Installation/lib/cmake/CGAL/CGALConfig.cmake

and put it as the root of the CGAL installation directory.

Sebastien.

On 07/10/2018 11:24 AM, j. scheurich wrote:

>
>
> Am 09.07.2018 um 17:52 schrieb Sebastien Loriot (GeometryFactory):
>> Could it be that you already configured CGAL in-source?
>> Actually, starting from CGAL 4.12, when you have a fresh extracted CGAL,
>> you can directly use it without having to call cmake on it, like it is
>> described here:
>> https://doc.cgal.org/latest/Manual/installation.html#title16
>> by directly configuring the project using CGAL that you want to build.
> C:\cygwin64\home\mufti\CGAL-4.12>cmake
> -DCGAL_DIR=C:\cygwin64\home\mufti\CGAL-4.12
> ....
> -- Build CGAL from release in directory CGAL-4.12
> -- Packagenames: CGAL-4.12
> == Setting paths (DONE)
>
> ==== Generate version files ==
> CMake Error at CMakeLists.txt:252 (message):
>   File VERSION or include/CGAL/version.h are missing, required by
>    release-build.
>
> -- Configuring incomplete, errors occurred!
> See also "C:/cygwin64/home/mufti/CGAL-4.12/CMakeFiles/CMakeOutput.log".
>
> Lets try wth libraries...
>
> so long
> MUFTI
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

J. Scheurich
In reply to this post by Laurent Rineau (CGAL/GeometryFactory)

>>> I use the headerfile only version of cgal 4.12 with visual c++ 2017
>>> community.
>>>
>>> i got the following linking errror:
>>>> LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
>>> nicht geöffnet werden.
>>>
>>> ...can't be opened
>> Now understand: "header only" version of CGAL do not mean, there are
>> only headerfiles (like in vcglib).
>> "header only" version means: the linking command is in a special pragma
>> in the hederfiles (like in boost).
>> "libCGAL-vc140-mt-gd-4.12.lib" is really needed.
>
> No. You missundertood. The autolink should be disabled. You probably do not
> use CGAL CMake scripts to generate the build system of your own project.
>
> Make sure the macro CGAL_HEADER_ONLY is defined to 1, in the properties of
> your project. That will enable the header-only behavior of CGAL headers, and
> in particular
Shouldn't be the macro CGAL_HEADER_ONLY in the header files written by
the INSTALL project ?
Something like compiler_config.h ?

so long
MUFTI


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

J. Scheurich

>>>> I use the headerfile only version of cgal 4.12 with visual c++ 2017
>>>> community.
>>>>
>>>> i got the following linking errror:
>>>>> LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
>>>> nicht geöffnet werden.
>>>>
>>>> ...can't be opened

I tried the not headerfile only version of CGAL 4.12, but  it still uses
the autolink features.
I needed  to delete include/CGAL/autolink and update config.h

so long
MUFTI

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by J. Scheurich
Le Tuesday, July 10, 2018 6:45:42 PM CEST j. scheurich a écrit :

> >>> I use the headerfile only version of cgal 4.12 with visual c++ 2017
> >>> community.
> >>>
> >>> i got the following linking errror:
> >>>> LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
> >>>
> >>> nicht geöffnet werden.
> >>>
> >>> ...can't be opened
> >>
> >> Now understand: "header only" version of CGAL do not mean, there are
> >> only headerfiles (like in vcglib).
> >> "header only" version means: the linking command is in a special pragma
> >> in the hederfiles (like in boost).
> >> "libCGAL-vc140-mt-gd-4.12.lib" is really needed.
> >
> > No. You missundertood. The autolink should be disabled. You probably do
> > not use CGAL CMake scripts to generate the build system of your own
> > project.
> >
> > Make sure the macro CGAL_HEADER_ONLY is defined to 1, in the properties
> > of
> > your project. That will enable the header-only behavior of CGAL headers,
> > and in particular
>
> Shouldn't be the macro CGAL_HEADER_ONLY in the header files written by
> the INSTALL project ?
> Something like compiler_config.h ?

Since CGAL-4.12, the header-only mode of CGAL is supposed to be used without
even configuring CGAL libraries. But it can still be configured, the way you
did, and in that case the header <CGAL/compiler_config.h> is not created.  
When the macro `CGAL_HEADER_ONLY` is defined, the header <CGAL/config.h> uses
another way to define the configuration:

    #if CGAL_HEADER_ONLY
    #  include <CGAL/internal/enable_third_party_libraries.h>
    #  if(BOOST_MSVC)
    #    include <CGAL/MSVC_compiler_config.h>
    #  endif
    #else
    #  include <CGAL/compiler_config.h>
    #endif

The two internal headers <CGAL/internal/enable_third_party_libraries.h> and
<CGAL/MSVC_compiler_config.h> are the replacement for <CGAL/
compiler_config.h>, when `CGAL_HEADER_ONLY` is defined. But for that, the
macro has to be defined by the project build system itself.

What we could do is generate a fake <CGAL/compiler_config.h> with a `#error`
message that explains why `CGAL_HEADER_ONLY` must be defined.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: linking error

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by J. Scheurich
Le Wednesday, July 11, 2018 10:20:19 AM CEST j. scheurich a écrit :

> >>>> I use the headerfile only version of cgal 4.12 with visual c++ 2017
> >>>> community.
> >>>>
> >>>> i got the following linking errror:
> >>>>> LINK : fatal error LNK1104: Datei "libCGAL-vc140-mt-gd-4.12.lib" kann
> >>>>
> >>>> nicht geöffnet werden.
> >>>>
> >>>> ...can't be opened
>
> I tried the not headerfile only version of CGAL 4.12, but  it still uses
> the autolink features.
> I needed  to delete include/CGAL/autolink and update config.h

Without modifying CGAL, you can define the macro `CGAL_NO_AUTOLINK`, to
disable all the auto-linking.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss