Rebuild is deleting my .lib - c

Im trying to merge 2 projects in visual studio and getting a LNK1181 error. I have searched on google and tried everything i came across but i simple cant solve the problem.
I am getting the following results:
Performing a build this succeeds.
Performing a Rebuild it fails with error LNK1181: cannot open input file 'a.dll'
Doing a build the output screen shows the dll is created and it is there in the folder.
Doing a rebuild the output screen shows the dll is created but then it is not in the folder. And then the rebuild results in the fail + the error LNK1181.
So what is wrong? What is different on a rebuild?
I can even see in the folder that the dll is beiing created and then removed again..
*I have 1 project that is the main project and creates the .exe, and it relies on a other project to run.
Solution:
I found the problem and is has nothing to do with the LNK error message i am getting.
Apparently a clean -> build is very different from doing just a rebuild. Mainly because i have multiple projects. When doing a clean -> build is first cleans all the files and then builds all the projects.
But doing a rebuild project A is beiing cleaned and build, then project B is beiing cleaned and build etc..
This way the lib generated bij A is beiing deleted. The solution for this is or just do a clean -> build. Or perform my own clean by deleting the files myself and then do a rebuild.
Also i dont feel like spending to much time on this issue when it is just a MSbuild "problem/bug" and doing a clean build is good enough.

linker error is maybe due to some lib is missing.
firstly check whether you have the lib for a.dll,
then add correct path for the lib in Visual Studio.

Related

How do I make my Setup project produce an executable?

I've built a small desktop application with which I am trying to use a Setup project to allow other users to install it. But whenever I run this installer, it does not produce an executable file. This is my first time making a setup project.
My solution contains two projects. One is the setup project which installs the primary output from the other project. The other project is a WPF App that consists of two xaml files, a xaml.cs file for each, an App.config file, and an icon. It also has a few dependencies including one Assembly, two Frameworks, and a handful of Packages. The app works exactly as intended whenever I start a Visual Studio debugging instance on either Debug or Release configurations.
I followed these instructions to build my Setup and deploy my app.
Whenever I ran the resulting Setup, it installed an XML configuration file, a JSON file, a main application dll file, and a bunch of dll files for my assemblies. I looked into some resources on how to run the main dll file properly, only (A) I'm completely stumped by everything I find on that topic, and (B) I would rather just produce an executable file anyway, since I intend for this Setup project to be used by other people and it would be inconvenient to ask said others to jump through the same hoops just to run it.
Why does my Setup project not produce a .exe file? I see that a .exe file is produced in my bin folder whenever I build my project (and this .exe works), so I would think the setup project should also produce one of those, but it doesn't. What am I doing wrong with my Setup project or anything else?
The setup.exe is a bootstrapper over the setup.msi. We can install the content using .msi or by running .exe which inturn runs /gets the data from the msi. To enable setup.exe building, go to solution explorer -> project -> properties -> prerequisites. check the check box on the top "Create setup program to install prerequisite components". apply and rebuld the project. A setup.exe bootstrapper will be created allong with msi.
Switch to Release mode, then rebuild your setup project. If everything went well (check the output console), you'll find an MSI file inside {setup project folder}/bin/Release
In "system file" from your proyect installer, you shoud to add in "Application Folder" the next source = PublishItemsOutpuGroup. In my case functions well.

Clion cannot import C files (Makefile not updating)

Whenever I drag and drop C files into my CLion project, errors occur as the makefile doesn't update. I've tried Reloading the CMake project a bunch of times and, when I try to re-compile the makefile, it says
Cannot compile file 'Makefile'. Cannot find run configuration for this file.
So, how can I perform this simple transaction of pasting files over into my CLion project without causing large issues?
You can just edit your CMake file and add there the .c/.cpp files you just added to your project.
This will fix what you said.
Nevertheless when I do that, the code inspection stops working and all the errors don't underline.
Let me know if you have the same problem.

Launched Failed.Binary not found in Eclipse

I just installed Eclipse and I get this error whenever I hit the button run: Launched Failed.Binary not found.
What should I do? Please if you can explain step by step.
Thank you.
Start eclipse the same as you would any other program,
generate a 'project'.
add files to the project,
then clicking run will trigger a compile of all the files, which creates the object files. then a link of all the object files (and needed libraries) to produce an executable, then it tries to run that executable.
I.E. run does nothing useful until the project is fully created and will have plenty of failures until the compiles have no errors and the link has no errors

Build project to run it in eclipse

My code runs a previous version of itself, so even though i completely remove all the code, it still runs the old one. I've read a few other posts regarding this problem, and tried it out. My temporary solution is to build the project before running it, but that is kinda stupid. the .exe file is in the Release folder, and my Debug folder dissapeared after the Clean.
How do I stop needing to build the project before everytime I need to run it?
I found out there's a button called auto build in the Launch Configuration properties window. So it build everytime I run it.

Visual Studio error building a solution with WPF application

When I am trying to build a solution file which has WPF projects, I get this error
Could not copy the file "bin\Debug\test.exe.config" because it was not
found.
I tried Clean Solution, Rebuild solution. Tried deleting the bin directory. This started yesterday. Not sure what I changed.
How do I fix this. so I can do a build.
Just a thought, but anti-virus software could potentially cause this type of problem if it decides that your exe is suspicious.
If you have any AV software running, try disabling it temporarily, and/or excluding your project build folders from its protection.
OK. The problem with my solution was a extension(a config Transform extension) that was installed. I updated the Visual studio extension and the build succeeded.

Resources