Closed kjgbrt closed 3 weeks ago
Are you sure you don't also link to a pre-built copy of Boost.JSON by accident? Does Visual Studio show you the actual link command?
I'm not sure how I'd check what you mean.
output of hitting "build":
Build started at 15:10...
1>------ Build started: Project: boost_json, Configuration: Debug x64 ------
1>main.cpp
1>LINK : fatal error LNK1104: cannot open file 'libboost_container-vc143-mt-gd-x64-1_85.lib'
1>Done building project "boost_json.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 15:10 and took 01.430 seconds ==========
That's everything.
Also, I've been going through various online searches, and I'd like to note the following is set: Properties >> Configuration Properties >> C/C++ >> Precompiled Headers >> Precompiled Header = "Not Using Precompiled Headers"
There's this answer on StackOverflow, that might help you with getting the link command: https://stackoverflow.com/questions/1319972/how-to-show-linker-command-line-in-build-output-in-visual-studio.
Also, is that definitely the entire contents of your project? No other lines in that cpp file, no other cpp files?
See information below. I'm at the very beginning of trying to use Boost.JSON, and I'm testing it out in a clean, empty project. Note, I changed the setting per the question asked in the link, and thus there's now 56 Warnings also popping up. I found* where the build log is exported, it looks like effectively the same output as below.
the output expanded slightly:
Build started at 16:15...
1>------ Build started: Project: boost_json, Configuration: Debug x64 ------
1>main.cpp
1>Microsoft (R) Incremental Linker Version 14.40.33811.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>"/OUT:C:\XXX\boost_json\x64\Debug\boost_json.exe" /INCREMENTAL "/ILK:boost_json\x64\Debug\boost_json.ilk" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG "/PDB:C:\XXX\boost_json\x64\Debug\boost_json.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\XXX\cpp\boost_json\x64\Debug\boost_json.lib" /MACHINE:X64 boost_json\x64\Debug\main.obj
1>LINK : fatal error LNK1104: cannot open file 'libboost_container-vc143-mt-gd-x64-1_85.lib'
1>Done building project "boost_json.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 16:15 and took 01.399 seconds ==========
As an option, try defining BOOST_ALL_NO_LIB
rather than BOOST_JSON_NO_LIB
.
ah, that finally worked. thank you very much. could the readme please be updated? additionally, i assume this could potentially interfere with any boost components that do require a library?
Yeah, I'll amend the README.
Version of Boost
Version: 1.85.0
Steps necessary to reproduce the problem
Hello,
using std::cout;
int main() { cout << "hi\n"; return 0; }