64-bit Boost Libraries
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: 64-bit Boost Libraries

  1. #1
    Join Date
    Apr 2005
    Posts
    1,730

    64-bit Boost Libraries

    I have an existing VC++ DLL that uses Boost library version boost_1.35. Now I have to convert the entire source code into 64-bit. So I changed the compiler to 64-bit by simply going into Configuration Manager>Platform and selected X64. Now compiler throws these errors which I presume are related to Boost libraries

    Code:
    Error	41	error LNK2019: unresolved external symbol "private: class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > & __cdecl boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z) referenced in function "public: class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > & __cdecl boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::assign(char const *,char const *,unsigned int)" (?assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@QEAAAEAV12@PEBD0I@Z)	BrowserCaps.obj
    Error	42	error LNK2001: unresolved external symbol "private: class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > & __cdecl boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z)	Config.obj
    Error	43	error LNK2019: unresolved external symbol "private: void __cdecl boost::re_detail::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::construct_init(class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (?construct_init@?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@AEAAXAEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regex_constants@3@@Z) referenced in function "public: __cdecl boost::re_detail::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(char const *,char const *,class boost::match_results<char const *,class std::allocator<struct boost::sub_match<char const *> > > &,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags,char const *)" (??0?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA@PEBD0AEAV?$match_results@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@@2@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@2@W4_match_flags@regex_constants@2@0@Z)	BrowserCaps.obj
    Error	44	error LNK2001: unresolved external symbol "private: void __cdecl boost::re_detail::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::construct_init(class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (?construct_init@?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@AEAAXAEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regex_constants@3@@Z)	RequestHandler.obj
    Error	45	error LNK2019: unresolved external symbol "public: bool __cdecl boost::re_detail::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::find(void)" (?find@?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA_NXZ) referenced in function "bool __cdecl boost::regex_search<char const *,char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(char const *,char const *,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (??$regex_search@PEBDDU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NPEBD0AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z)	BrowserCaps.obj
    Error	46	error LNK2019: unresolved external symbol "public: bool __cdecl boost::re_detail::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::match(void)" (?match@?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA_NXZ) referenced in function "bool __cdecl boost::regex_match<char const *,class std::allocator<struct boost::sub_match<char const *> >,char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(char const *,char const *,class boost::match_results<char const *,class std::allocator<struct boost::sub_match<char const *> > > &,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NPEBD0AEAV?$match_results@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@@0@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z)	RequestHandler.obj
    Can someone help me in resolving this? Do I need a whole new 64-bit version of boost libraries? If yes where can I get the instaler? As compiling boost libraries itself is a big big mess

  2. #2
    Join Date
    Apr 1999
    Posts
    27,423

    Re: 64-bit Boost Libraries

    Quote Originally Posted by maverick786us View Post
    Do I need a whole new 64-bit version of boost libraries?
    A library is nothing more than source code compiled into object code, and placed in a single file, so of course you need the 64-bit version of the library. It's no different if you compiled half your program using 32-bit compiler, the other half with the 64-bit compiler, and expecting to create a valid program when it gets to the link stage.

    If yes where can I get the instaler?
    www.boostpro.com
    http://www.boostpro.com/download/

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; May 20th, 2011 at 05:17 AM.

  3. #3
    Join Date
    Apr 2005
    Posts
    1,730

    Re: 64-bit Boost Libraries

    Quote Originally Posted by Paul McKenzie View Post
    A library is nothing more than source code compiled into object code, and placed in a single file, so of course you need the 64-bit version of the library. It's no different if you compiled half your program using 32-bit compiler, the other half with the 64-bit compiler, and expecting to create a valid program when it gets to the link stage.


    www.boostpro.com
    http://www.boostpro.com/download/

    Regards,

    Paul McKenzie
    Unfortunately they have mentioned tha...
    Quote Originally Posted by Boost Library
    For 64-bit binaries, support for other platforms and compilers, a binary installer that works without an internet connection, or builds optimized for the highest performance, please contact us about our enterprise support program.

  4. #4
    Join Date
    Jul 2002
    Posts
    2,505

    Re: 64-bit Boost Libraries

    Build Boost libraries from source:
    http://www.boost.org/doc/libs/1_46_1...es-from-source
    To get 64 bit libraries, you need to use 64 bit bjam switch: address-model=64
    http://boost.org/boost-build2/doc/ht....compiler.msvc
    See more details in bjam documentation.

    On the same computer, you can keep both 32 and 64 bit Boost libraries. By default, Boost libraries are built in stage subdirectory. You can, for example, build 32 bit to stage, and 64 bit to stage64. Setting Boost libraries in a client project, use stage directory for 32 bit, and stage64 for 64 bit.

  5. #5
    Join Date
    Apr 2005
    Posts
    1,730

    Re: 64-bit Boost Libraries

    Thanks, I downloade the version Boost_1_42 and then compiled using this command

    Code:
    bjam toolset=msvc-8.0 variant=debug threading=multi link=shared define=_BIND_TO_CURRENT_VCLIBS_VERSION address-model=64
    It compiled successfully, although it generated a warning stating "No Python Installation". So in the orignial application, I changed the settings and included the path of these new boost libararies in include and lib option. But still the same error was generated

    Then I used this command

    Code:
    bjam --toolset=msvc-8.0 address-model=64 --build-type=complete stage
    Its still compiling, will let you know how it goes

  6. #6
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: 64-bit Boost Libraries

    Now I have to convert the entire source code into 64-bit.
    Why ? Does your program explicitly need 64 bits commands ?

  7. #7
    Join Date
    Apr 2005
    Posts
    1,730

    Re: 64-bit Boost Libraries

    Too bad. It took one hour to compile using this command

    Code:
    bjam --toolset=msvc-8.0 address-model=64 --build-type=complete stage
    and still the result is same. The errors mentioned in original post still persists.


    Quote Originally Posted by Skizmo View Post
    Why ? Does your program explicitly need 64 bits commands ?
    this is an ISAPI Fiter that runs on IIS. Its the requirement of end user to convert this whole thing into 64-bit. When I tried running 32-bit version, this is the error message it displays in even viewer and does'nt run on IIS Server.

    ISAPI Filter 'C:\Program Files (x86)\LexisNexis UK\WskAuthFilter\AuthFilterIsapi.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    It is the client's requirement to make it run on 64-bit platform
    Last edited by maverick786us; June 21st, 2011 at 07:13 AM.

  8. #8
    Join Date
    Jul 2002
    Posts
    2,505

    Re: 64-bit Boost Libraries

    Did you make Rebuild All in the project? What are compiler/linker settings for x64 platform?
    VC++ contains different sets of compiler/linker directories for Win32/x64.
    I have Boost built both for Win32 and x64, but I cannot find the command I used to do this
    I will try to find it - usually I keep such things in my archive.

  9. #9
    Join Date
    Apr 2005
    Posts
    1,730

    Re: 64-bit Boost Libraries

    Quote Originally Posted by Alex F View Post
    Did you make Rebuild All in the project? What are compiler/linker settings for x64 platform?
    VC++ contains different sets of compiler/linker directories for Win32/x64.
    I have Boost built both for Win32 and x64, but I cannot find the command I used to do this
    I will try to find it - usually I keep such things in my archive.
    Offcourse I always clean and then rebuild the solution. As you can see the screenshot. In configuration manager I selected 64-bit compiler.

    I think this "libboost_regex-vc80-mt-1_46_1.lib" is the one responsible for these errors. Any suggestion?
    Attached Images Attached Images  

  10. #10
    Join Date
    Jul 2002
    Posts
    2,505

    Re: 64-bit Boost Libraries

    Is information in Tools - VC++ directories for x64 platform correct?
    Unfortunately, I cannot find the command line that I used to build x64 Boost.

  11. #11
    Join Date
    Apr 2005
    Posts
    1,730

    Re: 64-bit Boost Libraries

    Quote Originally Posted by Alex F View Post
    Is information in Tools - VC++ directories for x64 platform correct?
    Unfortunately, I cannot find the command line that I used to build x64 Boost.
    this is the command that I used

    Code:
    bjam --toolset=msvc-8.0 address-model=64 --build-type=complete stage

  12. #12
    Join Date
    Jul 2002
    Posts
    2,505

    Re: 64-bit Boost Libraries


  13. #13
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: 64-bit Boost Libraries

    So your requirement is to get it to work on a 64-bit IIS machine rather than actually building it to 64-bit.

    Please see here :

    http://www.microsoft.com/technet/pro....mspx?mfr=true

    or

    http://blogs.msdn.com/b/rakkimk/arch...processes.aspx

    Or google "iis running 32-bit on 64-bit"

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  14. #14
    Join Date
    Apr 2005
    Posts
    1,730

    Re: 64-bit Boost Libraries

    Quote Originally Posted by Alex F View Post
    Quote Originally Posted by darwen View Post
    So your requirement is to get it to work on a 64-bit IIS machine rather than actually building it to 64-bit.

    Thank you it finally worked

    Please see here :

    http://www.microsoft.com/technet/pro....mspx?mfr=true

    or

    http://blogs.msdn.com/b/rakkimk/arch...processes.aspx

    Or google "iis running 32-bit on 64-bit"

    Darwen.
    Well now its 64-bit. I converted the whole thing into 64-bit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center