|
Boost Users : |
Subject: Re: [Boost-users] boost linker errors
From: degski (degski_at_[hidden])
Date: 2016-03-21 02:16:50
FWIW, the functions simulate, benchmark, configuration, processOptions,
commonOptions are all functions created by you. I would guess
program_options is not the problem, it most probably get's linked, as you
seem to say yourself.
Are the above functions member functions of a templated class (or are free
and templated themselves). You possibly implemented those functions in a
source file, i.e. a non-header file? If so, move the implementations to the
relevant header file.
degski
On 20 March 2016 at 20:03, Mark <markusb51_at_[hidden]> wrote:
> Hi
>
> I am trying to link to a boost library, program_options, using Visual
> Studio 2015 and I am getting 'lnk2019 unresolved external symbolâ errors.
>
> I have built the boost libraries using b2 and built the complete libraries
> for msvc. The libraries are 32 bit. I have configured visual studio to
> point at the correct location for both the headers and the libraries, Iâve
> confirmed this. I am statically linking against
> libboost_program_options-vc140-mt-sgd-1_60.lib, though I have tried all the
> other variants of this library, e.g. removed the mt, the gd and the s parts
> of the name, without effect. I have tried all the different calling
> convention options in properties, I am building with the /MTd option set,
> though I have tried others. i have searched the internet thoroughly and
> cannot find a replication of my problem. Using BOOST_LIB_DIAGNOSTIC
> confirms that the library is being linked, I see the message in the output
> window. The errors I am getting are:
>
> Severity Code Description Project File Line Suppression
> State
> Error LNK2019 unresolved external symbol "void __cdecl
> simulate(class nemo::Simulation *,unsigned int,unsigned int,class
> std::basic_ostream<char,struct std::char_traits<char> > &)" (?simulate@
> @YAXPAVSimulation_at_nemo@@IIAAV?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@@Z)
> referenced in function _main NeMo_Test
> C:\Users\Development\Documents\Visual Studio
> 2015\Projects\NeMo_Test\NeMo_Test\main.obj 1
> Error LNK2019 unresolved external symbol "long __cdecl
> benchmark(class nemo::Simulation *,unsigned int,unsigned int,class
> boost::program_options::variables_map &,unsigned int)" (?benchmark@
> @YAJPAVSimulation_at_nemo@@IIAAVvariables_map_at_program_options_at_boost@@I_at_Z)
> referenced in function _main NeMo_Test
> C:\Users\Development\Documents\Visual Studio
> 2015\Projects\NeMo_Test\NeMo_Test\main.obj 1
> Error LNK2019 unresolved external symbol "class nemo::Configuration
> __cdecl configuration(class boost::program_options::variables_map &)"
> (?configuration@@YA?AVConfiguration_at_nemo@@AAVvariables_map_at_program_options
> @boost@@@Z) referenced in function _main NeMo_Test
> C:\Users\Development\Documents\Visual Studio
> 2015\Projects\NeMo_Test\NeMo_Test\main.obj 1
> Error LNK2019 unresolved external symbol "class
> boost::program_options::variables_map __cdecl processOptions(int,char * *
> const,class boost::program_options::options_description const &)"
> (?processOptions@@YA?AVvariables_map_at_program_options_at_boost@
> @HQAPADABVoptions_description_at_23@@Z) referenced in function _main
> NeMo_Test C:\Users\Development\Documents\Visual Studio
> 2015\Projects\NeMo_Test\NeMo_Test\main.obj 1
> Error LNK2019 unresolved external symbol "class
> boost::program_options::options_description __cdecl commonOptions(void)"
> (?commonOptions@@YA?AVoptions_description_at_program_options_at_boost@@XZ)
> referenced in function _main NeMo_Test
> C:\Users\Development\Documents\Visual Studio
> 2015\Projects\NeMo_Test\NeMo_Test\main.obj 1
> Error LNK1120 5 unresolved externals NeMo_Test
> C:\Users\Development\Documents\Visual Studio
> 2015\Projects\NeMo_Test\Debug\NeMo_Test.exe 1
>
> I would be very grateful if anyone could provide a clue as to what I am
> missing or have done wrong.
>
> Many thanks
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- (\___/) (+'.'+) (")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination!
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net