• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

C++ executable file builds as Windows 8 instead of windows 10 in visual Studio Code. How to fix?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I am having trouble building my .exe files in visual studio code for my current windows OS.  for some reason, my .exe files, when I run a diagnostic on them, seem to only be compatible for windows 8, not 10.

Using
Processor architecture: AMDx64
system: x64 based PC
VS code version: 1.74.3

When creating a simple "Hello World" application I tried following [this](https://www.youtube.com/watch?v=MlIzFUI1QGA) tutorial, and it didn't have any problems.  It was when I followed the tutorial for [importing external libraries](https://www.youtube.com/watch?v=JxXU2kgmef4&t=181s) that the problems ocured.

I’ve tried importing an external library, and used msys2 to install the files in the bin/include/lib folders for mingw64.  

I set my include path to the include folder, and I’ve set my compiler to default. My JSON tasks document appears correct, and when I build the .exe file, it builds successfully… but it only builds an executable file compatible for windows eight

[I ran the properties compatibility test, and this is the output I get](https://imgur.com/a/4iBA4cK)

What exactly do I need to do in order to change the OS version to make it compatible to run on both the visual studio code terminal, and my system terminal as well?

the following is the output once I ran the build process

>*

   Starting build...
   C:\msys64\mingw64\bin\cpp.exe -IC:\msys64\mingw64\include -fdiagnostics-color=always -g "D:\Documents\C++\VS_Code\FMT Import\FMTImport.cpp" -o "D:\Documents\C++\VS_Code\FMT Import\FMTImport.exe" -lfmt
   >Build finished successfully.

edit:

- config name:C:/msys64/mingw64/bin/g++.exe
- compiler path: C:/msys64/mingw64/bin/g++.exe
- intellisense mode: ${default}

edit 2:

running terminal attempts to build..


## for g++ ##
>

   D:\Documents\C++\VS_Code\FMT Import>g++ -o FMTImport FMTImport.cpp
   C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\William\AppData\Local\Temp\ccshGhdE.o:FMTImport.cpp:(.text+0x8c): undefined reference to `fmt::v9::vprint(fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)'
   collect2.exe: error: ld returned 1 exit status


## for clang++ ##

>

   D:\Documents\C++\VS_Code\FMT Import>clang++ FMTImport.cpp -o FMTImport
   FMTImport.cpp:1:10: fatal error: 'fmt/format.h' file not found
   #include <fmt/format.h>
 
reply
    Bookmark Topic Watch Topic
  • New Topic