Re: [Boost-users] Beginner Question (Windows MSVC)
So I got it to work by simply renaming the library, but I don't know if
that's the proper solution or why. I'm wary that I'll have other issues or
that something is off about my installation. (And I do have the LIBPATH
correctly typed in the console -- sorry. :D)
On Fri, Jun 9, 2017 at 8:26 PM, James Stortz
So I got it to work by simply renaming the library, but I don't know if that's the proper solution or why. I'm wary that I'll have other issues or that something is off about my installation. (And I do have the LIBPATH correctly typed in the console -- sorry. :D)
On Fri, Jun 9, 2017 at 7:30 PM, stathis
wrote: Look at the path you're using with LIBPATH, it seems wrong, it should probably be
/LIBPATH:F:\src\boost_1_64_0\stage\lib
--st
On 10/06/2017 02:04, James Stortz via Boost-users wrote:
correction, the error was:
LINK : fatal error LNK1104: cannot open file 'libboost_date_time-vc141-mt-s-1_64.lib'
On Fri, Jun 9, 2017 at 7:00 PM, James Stortz
wrote:
I can't seem to include/link and compile properly. I am using boost 1.64 and Visual Studio 2017 (Community).
I can successfully include the headers and compile the example program on the Getting Started page[1]. But when trying to simply compile the mutex example from interprocess docs[2], I get this error:
LINK : fatal error LNK1104: cannot open file `libboost_date_time-vc141-mt-2-1_64.lib`
From the Getting Started page on linking, I have been trying the following:
cl /EHsc /I boost_1_64_0 doc_memtest1.cpp ^ /link /LIBPATH:F\src\boost_1_64_0\stage\lib
I have even tried a solution from Stackoverflow[3], multiple times with various configurations, x64/x86, but nothing. I don't even have that particular library. I have "libboost_date_time-vc141-mt-gd-1_64.lib" and "libboost_date_time-vc141-mt-1_64.lib".
I assume I am doing something wrong, as I am new to programming on Windows/MSVC.
Any help? Thanks! James
[1] http://www.boost.org/doc/libs/1_64_0/more/getting_started/wi ndows.html
[2] http://www.boost.org/doc/libs/1_64_0/doc/html/interprocess/s ynchronization_mechanisms.html#interprocess.synchronization_ mechanisms.mutexes.mutexes_anonymous_example
[3] https://stackoverflow.com/questions/41464356/build-boost-wit h-msvc-14-1-vs2017-rc
_______________________________________________ Boost-users mailing listBoost-users@lists.boost.orghttps://lists.boost.org/mailman/listinfo.cgi/boost-users
There's possibly a mis-match between your app and your boost libs in terms of debug/release build and/or md/mt compiler options. You say: "you got it to work." Do you get any (linker) warnings? It shouldn't be necessary to rename anything. The linking should work auto-magically (most of the time), once VSXXXX is told where to find your libs to be linked. degski
Ah, I bet you are right! I honestly just had no idea. I'll look into that. If there's any advice or docs that might get me started, I'd appreciate that too while I'm here. Thanks!!! James On Sat, Jun 10, 2017 at 1:06 AM, degski via Boost-users < boost-users@lists.boost.org> wrote:
There's possibly a mis-match between your app and your boost libs in terms of debug/release build and/or md/mt compiler options.
You say: "you got it to work." Do you get any (linker) warnings?
It shouldn't be necessary to rename anything. The linking should work auto-magically (most of the time), once VSXXXX is told where to find your libs to be linked.
degski
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
On 10 June 2017 at 17:01, James Stortz via Boost-users < boost-users@lists.boost.org> wrote:
Ah, I bet you are right! I honestly just had no idea. I'll look into that.
If you have a mt/md mismatch, you'll have (a) linker error(s) related to double definitions in the c-runtime-libraries (CRT's), which you could supress (and ignore) by explicitely excluding to link to either the static or the dynamic CRT with /NODEFAULTLIB:"thecruntimetoexclude.lib" on the command-line, or in the linker properties > input > ignore specific default libraries. A mismatch in release/debug will result in the library being not found. degski -- "*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend, Schmerzen aus Schwäche stillend.*" - Novalis 1798
participants (2)
-
degski
-
James Stortz