VC++ .NET 2002: How to Create the .lib, .dll and .exe files

G

Guest

Hi all

Please tell me how to use VC++ .NET 2002 -Windows XP Pro to create the .lib, .dll and .exe files from the source code of the following 2 projects

////***Solution 'DllTest' (2 projects)***//
////***DllTest****//// ( First project
////-----DllTest.cpp----///
// DllTest.cpp : Defines the entry point for the DLL application
/

#include "stdafx.h
#include "DllTest.h

BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved

switch (ul_reason_for_call

case DLL_PROCESS_ATTACH
case DLL_THREAD_ATTACH
case DLL_THREAD_DETACH
case DLL_PROCESS_DETACH: break

return TRUE


void CDllTest::SayHello(

printf("Hello C++!")

////---StdAfx.cpp----///
// stdafx.cpp : source file that includes just the standard include
// DllTest.pch will be the pre-compiled heade
// stdafx.obj will contain the pre-compiled type informatio

#include "stdafx.h

// TODO: reference any additional headers you need in STDAFX.
// and not in this fil
////----DllTest.h----//
class __declspec(dllexport) CDllTes

public:
CDllTest(){
~CDllTest(){

public
void SayHello()
}
////----StdAfx.h----////
// stdafx.h : include file for standard system include files
// or project specific include files that are used frequently, bu
// are changed infrequentl
/

#if !defined(AFX_STDAFX_H__548DFEB0_F45C_49C6_A183_A99D163A2114__INCLUDED_
#define AFX_STDAFX_H__548DFEB0_F45C_49C6_A183_A99D163A2114__INCLUDED

#if _MSC_VER > 100
#pragma onc
#endif // _MSC_VER > 100

// Insert your headers her
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows header

#include <windows.h

#include <cstdio

//{{AFX_INSERT_LOCATION}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line

#endif // !defined(AFX_STDAFX_H__548DFEB0_F45C_49C6_A183_A99D163A2114__INCLUDED_
///***DllTestApp***/// (Second project
///----DllTestApp.cpp---//
// DllTestApp.cpp : Defines the entry point for the console application
/

#include "stdafx.h
#include "DllTest.h

int main(int argc, char* argv[]

CDllTest dt

dt.SayHello()

return 0

////----StdAfx.cpp---///
// stdafx.cpp : source file that includes just the standard include
// DllTestApp.pch will be the pre-compiled heade
// stdafx.obj will contain the pre-compiled type informatio

#include "stdafx.h

// TODO: reference any additional headers you need in STDAFX.
// and not in this fil
////----StdAfx.h----///
// stdafx.h : include file for standard system include files
// or project specific include files that are used frequently, bu
// are changed infrequentl
/

#if !defined(AFX_STDAFX_H__5A1F8A5B_8FB2_4C57_BE36_C4C9E0EF415E__INCLUDED_
#define AFX_STDAFX_H__5A1F8A5B_8FB2_4C57_BE36_C4C9E0EF415E__INCLUDED

#if _MSC_VER > 100
#pragma onc
#endif // _MSC_VER > 100

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows header

#include <stdio.h

// TODO: reference additional headers your program requires her

//{{AFX_INSERT_LOCATION}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line

#endif // !defined(AFX_STDAFX_H__5A1F8A5B_8FB2_4C57_BE36_C4C9E0EF415E__INCLUDED_

Thanks in advance
Scott Chan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top