Boost logo

Boost :

Subject: [boost] [HELP] fatal error LNK1120: 5 unresolved externals
From: Seow Hui, Saw (sseowhui_at_[hidden])
Date: 2012-09-08 23:55:06

Dear Sir/ Madam,

A very good day to you.
I installed boost 1.50 installer (32-bit) which downloaded from and did the appropriate settings
(including CGAL) in Microsoft Visual Studio 2010.
I would like to run the following sample code:

#include <iostream>
#include <CGAL\Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL\convex_hull_2.h>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point_2;

int main()
Point_2 points[5] = { Point_2(0, 0), Point_2(10, 0), Point_2(10, 10),
Point_2(6, 5), Point_2(4, 1) };
Point_2 result[5];

Point_2 *ptr = CGAL::convex_hull_2( points, points+5, result );
std::cout << ptr - result << " points on the convex hull" << std::endl;

return 0;

There are no errors during compilation but there are errors during the
build as shown below:

1>------ Build started: Project: Cgal_Hello, Configuration: Debug Win32
1>libboost_system-vc100-mt-gd-1_50.lib(error_code.obj) : error LNK2005:
"public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char>
>::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
already defined in msvcprtd.lib(MSVCP90D.dll)

1>libboost_system-vc100-mt-gd-1_50.lib(error_code.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) void __cdecl
std::_Xout_of_range(char const *)" (__imp_?_Xout_of_range_at_std@@YAXPBD_at_Z)
referenced in function "public: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::_Xran(void)const " (?_Xran@?$basic_string_at_DU

1>D:\Cgal_Hello\Debug\Cgal_Hello.exe : fatal error LNK1120: 5 unresolved

Can anyone please help me with this issues? desperately need help...

In addition, if I have installed the installer, do I still have to use
bjam.exe to build the libraries?
Hope to hear from you soon.
Thank you very much.

Best Regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at