Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 571633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:31:40+00:00 2026-05-13T13:31:40+00:00

I have a project which uses C++/CLI to implement a GUI and some background

  • 0

I have a project which uses C++/CLI to implement a GUI and some background processing to talk to a sensor. I’ve got that all working and a lot of the comms stuff which we use to communicate the the sensor sits in a .dll. The problem is that I’d like to combine the library into the main executable to avoid having to worry about distributing .dlls.

I’ve got a demo project which works fine using a .lib but when I try and switch the mani code body to produce a .lib instead of .dll I get the following error:

1>------ Build started: Project: MyTool, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>.\stdafx.cpp : fatal error C1113: #using failed on 'c:\projects\MyTool\debug\MyLib.lib'

A bit of googling suggests this happens when you’ve not got the MSIL switch applied, but it’s definitely in there in the library project.

I have a mixture of managed and unmanaged code in both my demo project and the real thing so I’m really struggling to see what the problem is here.

Any suggestions would be very gratefully received!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:31:41+00:00Added an answer on May 13, 2026 at 1:31 pm

    I am guessing a bit, but I suspect the “MyTool” project has the “MyLib” project as one of its “references” (“Project” menu >> Properties >> Common Properties >> References).

    When you change the type of the MyLib project to a LIB instead of a DLL, you need to remove “MyLib” from the project references. You then update the project dependencies of the solution (“Project” menu >> “Project Dependencies…”) so that MyTool depends on MyLib.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 288k
  • Answers 288k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer $(document).click(function(){ //user clicked anywhere on the page }); $('#search_suggestions_list li').click(function()… May 13, 2026 at 5:24 pm
  • Editorial Team
    Editorial Team added an answer Sending an OPTIONS request may work It may not be… May 13, 2026 at 5:24 pm
  • Editorial Team
    Editorial Team added an answer datatype tr = N of int * unit->tr * unit->tr;… May 13, 2026 at 5:24 pm

Related Questions

When creating a DLL with Visual C++ 2008 I have a couple of choices.
Up until now I have been using std::string in my C++ applications for embedded
Is it possible to have a C static library API, which uses C++ internally
i have a problem with global variables in a c++ shared library project. my
I am having small problem in making a global variable works. I am using

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.