What can specify in executable file name in vc++ Project - visual-c++

I am beginner in VC++. I create a simple VC++ ATL Project.when i will debug the project then it ask for Executable file Name. which file is enterd in the Executable file name.?

You probably created a DLL project. Such DLL can be used by some executable. So, you should provide there a name of the executable that will load and use your DLL. Another option is to create another test project (executable) that will load and use your DLL. That would be just for testing purposes.

Related

Calling .dll in linux environment in c++

I have windows dynamic linked library which I want to access from Linux environment. I don't have the source code of that library, so I cannot build .so file.
Is there a way by using Winelib or any other library or tool for converting library file to .so file, so that I can call functions defined in that library?
There is no easy way to do it, because the DLL cannot run in Linux enviromnemt all by itself. It will probably rely on user32.dll msvcrt.dll and friends at runtime, so you'll have to provide those files as well.
You can use winelib, but it doesn't just convert a .dll to an .so. You'll have to link the whole project that wants to call the DLL against winelib, and include the DLL itself with your app at runtime. If you are trying to port a Windows app to Linux, winelib will be able to convert your makefile for you, but it's far from automatic for complex projects.

compile external library with application

So i am trying to get a C# application that i have developed that uses the Iconic Zip library, when i compile the program into an executable, and run it on another machine i get an error saying
"Could not load file or assembly 'Iconic.Zip...' or one if its dependencies. The system cannot find the file specified."
I realise that this is because the .dll is not in the same directory/expected directory as the exe.
Is there a way to bundle in the .dll to the exe through Visual Studio so that i do not have to provide the library as a seperate entity?

how to manage loading dll's before entering main() function in visual c++

How does the Visual C++ program load dll's before entering the main function in visual studio express 2008? In a project developed by others a dll was loaded by "a.ext:native" but I don't know how is this configured.
There are different ways to instruct the OS to load a DLL. The most common way is to link to a .lib file (through the project's linker settings), where the .lib is a build-time stub associated with the DLL. When the linker finds this .lib file during the linking stage, it knows that the DLL is required, and modifies the EXE internally to tell the operating system that the DLL must exist in order for the program to run.
When the program is later run, the operating system first looks for all required DLL's - even before beginning to execute the code for the program. If any of these DLL's are missing, the operating system throws an error, an error box pops up, and the program will not run.
It's also possible to dynamically load a DLL, but this isn't all that common.

How create a lib file while creating exe file

I have an legacy application which builds into exe.
I am using Visual Studio 6.0 and the application is an c++ application. It used many lib files, built in VS6.0. Now i need to use the api's which in the executable. I want to create a lib file while it is creating an exe. I cannot change the code of the legacy application.
Any help is highly appreciated.
Thanks,
AH
Create a separate library project and add any source files with APIs you want to reuse into it. It's probably cleaner to also remove those files from the exe project and make the exe project depend on the library project, but this isn't strictly necessary.

Creating a static library with the Visual C++ 6 compiler instead of a dynamic library (DLL)

I am able to create a DLL, but I want it to compile into a .lib file using Visual C++ 6 (commmad line).
Any ideas?
Use a 'Win32 Static Library' project for that.
When you create a new project you have the option to create a Win32 Static Library.
Having just created one to check the options I see that the tabs on the project settings dialog are different to those for DLL project.
Your best bet is to create a new project and copy the source files across. If you need the code to compile into both then you'll need to create the projects in the same directory (but with different names) or link the source from one directory to the other.

Resources