can you create a lib or dll in VS 2005 and link with VS 2008 - c++

I am using visual studio 2008 SP1.
And I am creating a desktop application using MFC.
I have a library I want to link with my application. However, the library was written in WIN32 visual studio 2005.
I am been having a trouble linking:
fatal error LNK1104: cannot open file 'AgentLib.lib'
I am wondering if it is because I am using MFC 2008 and the library was written and compiled with 2005?
Many thanks for any advice,

Make sure you have added the path where your lib files are under project settings in Linker>General>Additional Library Directories

There should be no problem to do that.
You can either
Add the directory where AgentLib.lib is to the library directories of your project.
Add AgentLib.lib to your project (you may get a message box from Visual Studio asking for a rule, but there is no need for one, and it works)

Yes it is possible. f you have issues please Check this links for some help. Also check for any dependent file which is being used by the lib created using VS 2005.

Related

FLTK on Visual Studio 2019 x64, "Cannot open include file: 'dirent.h': No such file or directory

I am using the FLTK library in Visual Studio Community 2019 and building my application for x86 works fine. Now, I would like to build it for x64. However, I am getting the error "Cannot open include file: 'dirent.h': No such file or directory.".
The error occurs in the file, named 'filename.H'. This header file comes with the FLTK library.
Has anyone an idea how I could fix this problem?
Update:
The dirent.h library is not recognized, because its an C POSIX library, as described in the link here below. However, the question still remains, namely, how can I fix this problem?
<dirent.h> in visual studio 2010 or 2008
The link above refers to a link with an alternative dirent.h file. I've tried to include this file in my project, however, now another errors occur. These errors occur in the file Fl_Native_File_Chooser.H. The type specifiers fl_OPENFILENAMEW and fl_BROWSEINFOW are unknown in this file.
On Windows, dirent.h should not be included in the FLTK code. Even though it is 64 bit, WIN32 must be defined when using the FLTK libraries (https://www.fltk.org/doc-1.3/preface.html). Your problem will probably be solved if you define WIN32 at the beginning of your code or if you add WIN32 in your Visual Studio project properties - C/C++ - Preprocessor - Preprocessor Definitions, in x64 platform.
The way I would create an x64 solution is
Open ide\VisualC2010\fltk.sln
If you are using another version of Visual Studio, let it convert.
Change the solution configuration to Debug (somehow Visual Studio always defaults to Debug Cairo)
Click on solution platforms and select Configuration Manager
When the Configuration Manager appears, under Active solution platforms select New
When the next dialog appears, under type or select new platforms select x64
Click on the OKs etc to close the windows
Now change the solution platform to x64 and start the build.
You shouldn't get any dirent.h errors.

error while building a Hello World wxwidgets app with visual studio 2019

I'm trying build wxwidgets Hello World sample program in visual studio and i'm using prebuilt wxwidgets instead download that and build it myself.
and after configuring visual studio project for wxwidgets i always facing with this error:
Error C1083 Cannot open include file: '../../../lib/vc142_x64_dll/mswud/wx/setup.h': No such file or directory wxwidgets_programming_cpp C:\wxwidgets\include\msvc\wx\setup.h 140
where is the problem. I think i configured visual studio project in a wrong way. can you help me how to configure visual studio project for a regular wxwidgets app?
You need to define wxMSVC_VERSION_ABI_COMPAT in the preprocessor definitions to use these binaries, which will result in using the correct vc14x prefix instead of vc142 used by default. This is already supposed to be done by wxwidgets.props, at least for the DLL configuration which you seem to use, so I am not sure why it doesn't work for you if you do use this file, but at any rate this symbol must be defined and it isn't in your case.

Cannot open include file: 'atlrx.h' in Visual Studio 2019

We are upgrading the compiler from Visual Studio 2013 to Visual Studio 2019.
Getting the below error while building the project which used regex expressions:
Cannot open include file: 'atlrx.h': No such file or directory
After installing the ATL/MFC Components also atlrx.h is not fond in the VS include directory.
Does anyone have any idea like which component should be installed to get rid of this error?
Thanks in advance.
You should download ATL server from Codeplex and install the files.
ATL Server: Visual C++ shared source software
And then copy the include file to a folder on your hard disk, Atlrx.h normally lives in the $(VCInstallDir)VC\atlmfc\include folder.
You should make sure that this path is added in the include directories of visual studio.

Visual Studio 2012 using platform toolset v100. Cannot open source file "atlbase.h"

I am using Visual Studio Ultimate 2012. I have a project that works when i use the default v110 platform toolset.
Now I would like to add the Point Cloud Library (PCL) to this project to further work on it. Unfortunately there are only binaries available for Visual Studio 2010. I first tried to compile the 2012 binaries myself but that turned out to be more trouble than its worth. So i changed my platform toolset to v100 in order to use the PCL prebuilt binaries.
However, when doing so, one of my includes (atlbase.h) is no longer recognized. I have tried to manually include this by adding the Include and Library Directories of ATL in the project properties. This generated a whole lot of new errors, originating from the atl header files, which seems odd. I have also tried changing the option "Use of ATL" to "Dynamic Link to ATL" and "Static Link to ATL" from the default "Not Using ATL" to no avail.
I'm working on a 64 bit Windows 7 Ultimate machine and want to compile in 32 bit.
Edit: Using Process Monitor I have found that Visual Studio is looking for the include file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlbase.h.
This folder (..\atlmfc) does not exist.
My VS2012 is installed at D:\School Programs\Visual Studio 2012
Is there a fix for this?
When you Switch to another different toolset this complete toolset must be available. This includes also the header files.
It should be possible without great Trouble to convert this DLL into VS 2012. Or myabe you can include the complete source without using a separate DLL.
Download and install WDK 7.1 (microsoft.com/en-us/download/confirmation.aspx?id=11800)
Create an environment variable which points to the installation directory, I called mine WINDDK
Go to project Properties -> VC++ Directories
Add $(WINDDK)\inc\atl71 to Include Directories
Add $(WINDDK)\lib\ATL\i386 to Library Directories (this is for 32 bit)
Go to project Properties -> Linker -> Input
Add atl.lib to Additional Dependencies
These steps have solved my problem

missing DLL file when i run my application on another machine?

I am using visual studio 2013 with ISLE 2013 to create a windows form application,
it is the first time i use this style,
I successfully built the application but the problem comes after i setup the application on another PC is says msvcp120.dll is missing!
I have searched the web for this problem and I could not find anything?
any ideas?
I am not a windows guy but I will try to answer, as I did some small research. I found information here. It says:
"This file is the dynamic linking library designed as a Microsoft C Runtime Library, usually comming with Microsoft® Visual Studio®. It is a collection of link libraries that contains instructions for the standard C library functions. It is used by almost all Windows programs compiled from C or C++ source code. This library is used for the applications written under Visual Studio."
So, I am guessing it is a microsoft thing. A runtime library that is required to run c/c++ projects built with visual studios. Download the .dll from a source online (just google) and include it into your project directory. If it helps, include that file in your installation file.
Until anybody who is working with windows and has any idea about that dll answers you question, this answer can help you to get started.
found the solution I should add the Visual C++ runtime library installer
Don't download single DLL's from which you know hardly anything from random sites.
From your Visual Studio 2013 installation directory, check C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033 and you'll see vcredist_x64.exe and vcredist_x86.exe files that need to be run on your target system.
Use the x64 variant for 64 bit apps. It will install MSVCP120.dll for one, and some other DLL's as well.
Msvcp120.dll is the dll for standard c++ library. When you develop an application using standard c++ in VS 2013, the application defaults to Msvcp120.dll(Msvcp110.dll in VS2012). The client computer should install Visual c++ 2013 Redistributable.
Some dependencies that are on your system because you have Visual Studio installed will not be on the target system. You will need to include them in your installer or install a redistributable package on the target machine.
As there are many options and listing them all here would be too much and also redundant, you may want to visit the Microsoft site for this task and read up on all those options before you decide which you chose.
You can download the .dll file from DLL Store and paste that file into the directory where you have installed the setup.
Hope it will help you.