N
n33470
I admit I'm a newbie to C++, so this is probably just a basic problem.
I'm trying to create a standard, simple, win32 DLL with external
functions.
I'm using VisualStudio.NET 2005. I create a new project in VS using
the Visual C++ Win32 project template, and call it "MyComponentWin32".
In the Win32 Application Wizard that appears next, I choose
Application Type of "DLL" and click Finish.
At the bottom of the MyComponentWin32.cpp file, I put the following
function definition:
extern "C" _declspec(dllexport) int OpenDevice()
{
return(5);
}
Now, I rebuild the project. There is no DLL file built in the Debug
directory of the project. I expected to find a file named
"MyComponentWin32.dll" in the Debug directory, but there isn't any.
Is there some other settting, or something, that I need? My suspicion
is that the link step might be failing, but I'm not sure how to figure
it out.
Any ideas?
Here is the output window from the rebuild project step:
1>------ Rebuild All started: Project: MyComponentWin32, Configuration:
Debug Win32 ------
1>Deleting intermediate and output files for project
'MyComponentWin32', configuration 'Debug|Win32'
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>MyComponentWin32.cpp
1>Compiling manifest to resources...
1>Linking...
1>LINK : C:\dmdotcom\Solution
2005\dev\ComponentSample\Debug\MyComponentWin32.dll not found or not
built by the last incremental link; performing full link
1> Creating library C:\dmdotcom\Solution
2005\dev\ComponentSample\Debug\MyComponentWin32.lib and object
C:\dmdotcom\Solution
2005\dev\ComponentSample\Debug\MyComponentWin32.exp
1>Embedding manifest...
1>Build log was saved at "file://c:\dmdotcom\Solution
2005\dev\ComponentSample\MyComponentWin32\Debug\BuildLog.htm"
1>MyComponentWin32 - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I'm trying to create a standard, simple, win32 DLL with external
functions.
I'm using VisualStudio.NET 2005. I create a new project in VS using
the Visual C++ Win32 project template, and call it "MyComponentWin32".
In the Win32 Application Wizard that appears next, I choose
Application Type of "DLL" and click Finish.
At the bottom of the MyComponentWin32.cpp file, I put the following
function definition:
extern "C" _declspec(dllexport) int OpenDevice()
{
return(5);
}
Now, I rebuild the project. There is no DLL file built in the Debug
directory of the project. I expected to find a file named
"MyComponentWin32.dll" in the Debug directory, but there isn't any.
Is there some other settting, or something, that I need? My suspicion
is that the link step might be failing, but I'm not sure how to figure
it out.
Any ideas?
Here is the output window from the rebuild project step:
1>------ Rebuild All started: Project: MyComponentWin32, Configuration:
Debug Win32 ------
1>Deleting intermediate and output files for project
'MyComponentWin32', configuration 'Debug|Win32'
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>MyComponentWin32.cpp
1>Compiling manifest to resources...
1>Linking...
1>LINK : C:\dmdotcom\Solution
2005\dev\ComponentSample\Debug\MyComponentWin32.dll not found or not
built by the last incremental link; performing full link
1> Creating library C:\dmdotcom\Solution
2005\dev\ComponentSample\Debug\MyComponentWin32.lib and object
C:\dmdotcom\Solution
2005\dev\ComponentSample\Debug\MyComponentWin32.exp
1>Embedding manifest...
1>Build log was saved at "file://c:\dmdotcom\Solution
2005\dev\ComponentSample\MyComponentWin32\Debug\BuildLog.htm"
1>MyComponentWin32 - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========