Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to Configure Visual Studio 2005 for CGAL ? ? ?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to Configure Visual Studio 2005 for CGAL ? ? ?


Chronological Thread 
  • From: Mahmood Naderan <>
  • To:
  • Subject: Re: [cgal-discuss] How to Configure Visual Studio 2005 for CGAL ? ? ?
  • Date: Tue, 26 Aug 2008 22:55:53 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=DBbCo+QsTHs1D1sGib9ppHpNs30FLP5HmKC7q6nAZ53A4+xENLcUyFnqYkFLhJgBW/cP8LXE1XR4Si5J6HPTEs9Say77uM2CmGjmOutH1BEymbJQhGb0hWdbZLqTtX7Ti4v2ZdyLttoQRGYuiMmKd+6sJqXwxbtEyyWBJb1/gGk=;

Hello,
1- if you want to use Sleep function and "windows.h", you have to install platform SDK. read this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1995837&SiteID=1
 
2- I used CGAL 3.2.1 with visual stud 2005 with no problem. I recommend you install from scratch (delete cgal directory completely) and then rebuild "src\CGAL", "src\CORE" and "src\CGALQT" with visual studio 2005. What I understand you built librarieswith 2003 and want to use them in 2005.
 
3-step by step compile the examples (like polygon taht you did) and see if there is any error.
 
--------------------
Mahmood Naderan
 
 
 

 

----- Original Message ----
From: Samay Kumar <>
To: ; ;
Sent: Tuesday, August 26, 2008 7:32:08 PM
Subject: [cgal-discuss] How to Configure Visual Studio 2005 for CGAL ? ? ?

Hello friends,

I am new in Visual Studio Programming. In my project, I am intended to use CGAL 3.2.1 in Visual Studio 2005. But I am having building error with it. Though I have tried with Visual Studio.net 2003 where it works fine. But still it gives error. I might be missing something to configure but really I am filling helpless. Well, it would be better if I can get the CGAL configured with Visual Studio 2005.

May be anyone can give me hint, how to proceed.. This is how I proceeded...

First I tried with Visual Studio 2005 (but din't work). I configured all stuff in my PC according to........
http://www.cs.tau.ac.il/~ophirset/robotics/ex2/Windows.html

1. Build successful of ($CGALDIR)\src\CGAL
2. Build successful of ($CGALDIR)\src\Core [So now I have ($CGALDIR)\lib\CGAL and ($CGALDIR)\lib\core++ built with VS-2005]
3. Building not successful of ($CGALDIR)\example\polygon\example.vcproj
4. Every time I get such linking error, even with other examples.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1>------ Build started: Project: Example, Configuration: Debug Win32 ------
1>Compiling...
1>Example.C
1>Compiling manifest to resources...
1>Linking...
1>Example.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: class CGAL::Point_2<struct CGAL::Cartesian<double> > const & __thiscall std::list<class CGAL::Point_2<struct CGAL::Cartesian<double> >,class std::allocator<class CGAL::Point_2<struct CGAL::Cartesian<double> > > >::_Const_iterator<1>::operator*(void)const " (??D?$_Const_iterator@$00@?$list@V?$Point_2@U?$Cartesian@N@CGAL@@@CGAL@@V?$allocator@V?$Point_2@U?$Cartesian@N@CGAL@@@CGAL@@@std@@@std@@QBEABV?$Point_2@U?$Cartesian@N@CGAL@@@CGAL@@XZ)
1>Debug/Example.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://d:\Workspace\cgal_example\Polygon\Debug\BuildLog.htm"
1>Example - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=======XXXX=======XXXX=======XXXX=======XXXX=======XXXX=======XXXX=======XXXX=======XXXX=======XXXX=======


Then, I tried with Visual Studio.net 2003 (worked but faced some other problem). In this procedure I used original version of source code, not the modified after building with VisualStudio 2005.

1. Build successful of ($CGALDIR)\src\CGAL
2. Build successful of ($CGALDIR)\src\Core [So now I have ($CGALDIR)\lib\CGAL and ($CGALDIR)\lib\core++ built with VS-2003 which is default I think]
3. Opened the same project. ($CGALDIR)\example\polygon\example.vcproj.
4. Cleaned the existing solution.
5. Build successful

*****************************************************************************************************************************************************************************

------ Build started: Project: Example, Configuration: Debug Win32 ------

Compiling...
Example.C
Linking...

Build log was saved at "file://d:\Workspace\cgal_example\Polygon\Debug\BuildLog.htm"
Example - 0 error(s), 0 warning(s)


---------------------- Done ----------------------

    Build: 1 succeeded, 0 failed, 0 skipped

*****************************************************************************************************************************************************************************

6. Then I just added header #include <windows.h>  and one statement in main(), that's  Sleep(2000);
7. Build failed
8. I can not understand what the problem is...

############################################################################################################################

------ Build started: Project: Example, Configuration: Debug Win32 ------

Compiling...
Example.C
Example.C(16) : error C2365: 'Polygon' : redefinition; previous definition was a 'function'
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinGDI.h(3760) : see declaration of 'Polygon'
Example.C(27) : error C2146: syntax error : missing ';' before identifier 'p'
Example.C(27) : warning C4551: function call missing argument list
Example.C(27) : error C2065: 'p' : undeclared identifier
Example.C(28) : error C2228: left of '.push_back' must have class/struct/union type
        type is ''unknown-type''
Example.C(28) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(29) : error C2228: left of '.push_back' must have class/struct/union type
        type is ''unknown-type''
Example.C(29) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(30) : error C2228: left of '.push_back' must have class/struct/union type
        type is ''unknown-type''
Example.C(30) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(31) : error C2228: left of '.push_back' must have class/struct/union type
        type is ''unknown-type''
Example.C(31) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(32) : error C2228: left of '.push_back' must have class/struct/union type
        type is ''unknown-type''
Example.C(32) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(36) : error C2593: 'operator <<' is ambiguous
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(434): could be 'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(std::basic_ostream<_Elem,_Traits>::_Mysb *)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(414): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(const void *)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(394): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(long double)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(374): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(double)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(354): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(float)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(333): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(unsigned __int64)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(313): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(__int64)
'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(292): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(unsigned long)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(272): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(long)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(252): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(unsigned int)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(227): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(int)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(207): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(unsigned short)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(174): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(short)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(154): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(148): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(std::ios_base &(__cdecl *)(std::ios_base &))'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(142): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Traits>::operator <<(std::basic_ostream<_Elem,_Traits>::_Myios &(__cdecl *)(std::basic_ostream<_Elem,_Traits>::_Myios &))'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(137): or       'std::basic_ostream<_Elem,_Traits>::_Myt &std::basic_ostream<_Elem,_Tra
its>::operator <<(std::basic_ostream<_Elem,_Traits>::_Myt &(__cdecl *)(std::basic_ostream<_Elem,_Traits>::_Myt &))'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(887): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,unsigned char)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(880): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const unsigned char *)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(873): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,signed char)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(866): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const signed char *)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(744): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,char)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(697): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const char *)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(659): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<char,std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,char)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        d:\ProgramFiles\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(613): or       'std::basic_ostream<_Elem,_Traits> &std::operator <<<char,std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const char *)' [found using argument-dependent lookup]
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        while trying to match the argument list '(std::ostream, 'unknown-type')'
Example.C(36) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(40) : error C2228: left of '.is_simple' must have class/struct/union type
        type is ''unknown-type''
Example.C(40) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(41) : error C2228: left of '.is_convex' must have class/struct/union type
        type is ''unknown-type''
Example.C(41) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(42) : error C2228: left of '.orientation' must have class/struct/union type
        type is ''unknown-type''
Example.C(42) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(43) : error C2228: left of '.area' must have class/struct/union type
        type is ''unknown-type''
Example.C(43) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(65) : error C2228: left of '.bounded_side' must have class/struct/union type
        type is ''unknown-type''
Example.C(65) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(73) : error C2228: left of '.vertices_begin' must have class/struct/union type
        type is ''unknown-type''
Example.C(73) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(73) : error C2228: left of '.vertices_end' must have class/struct/union type
        type is ''unknown-type''
Example.C(73) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(78) : error C2228: left of '.edges_begin' must have class/struct/union type
        type is ''unknown-type''
Example.C(78) : error C3861: 'p': identifier not found, even with argument-dependent lookup
Example.C(78) : error C2228: left of '.edges_end' must have class/struct/union type
        type is ''unknown-type''
Example.C(78) : error C3861: 'p': identifier not found, even with argument-dependent lookup

Build log was saved at "file://d:\Workspace\cgal_example\Polygon\Debug\BuildLog.htm"
Example - 33 error(s), 1 warning(s)


---------------------- Done ----------------------

    Build: 0 succeeded, 1 failed, 0 skipped

############################################################################################################################


It would be really great if anyone help me to get Visual Studio 2005 working with CGAL. Thanks in advance for any kind of hint or details.

Greetings,
Samay





Archive powered by MHonArc 2.6.16.

Top of Page