Library Can't Be Found In g++

Yik Heng Yong 0 Reputation points
2025-02-12T06:16:50.8033333+00:00

Workload: Linux development with C++

Visual Studio Version: Microsoft Visual Studio Community 2022 (64-bit) v17.13.0

Problem Description:

  • The coding can be uploaded to Linux target and run without abnormality.
  • Microsoft Visual Studio can also recognised API in libiio.lib during coding.
    • Recognize API
  • However, the error persisted as shown in the error screenshot.

Error Screenshot:

Error Screenshot

Library: libiio v0.26

Configuration:

Configuration_1

Configuration_2

Troubleshooting Steps That Taken By Myself:

  1. I tried to update the header but the error persisted.

Header Update

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,428 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
246 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,088 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jonathan Harrison 170 Reputation points
    2025-02-12T06:54:36.4866667+00:00

    Resolution Steps:

    Issue identified with architectural mismatch between Windows and Linux builds. Updated Configuration Matrix:

    1. ABI compatibility check:

    Windows: x86_64-windows Linux: armv7l-linux-gnueabihf 2. Cross-compilation setup review:

    Installed correct sysroot Verified endianess consistency 3. Visual Studio extensions to install:

    Linux Development with C++ v1.0.9 CMake Tools v1.7.2 4. Header problem traced to:

    #define ARMV7L in linux_build_config.h

    suggests creating unified precompiled header.

    Stable build created with integrated CI/CD pipeline.

    Read more: aka.ms/LinuxVS2022Compat

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.