Click here to Skip to main content
11,412,833 members (72,439 online)
Click here to Skip to main content
Add your own
alternative version

Microsoft Visual C++ Static and Dynamic Libraries

, 26 Jul 2010 CPOL
A simple introduction to static and dynamic libraries with Microsoft Visual C++.
#include <stdio.h>
#include "add.h"
//extern int __declspec(dllimport) add(int a, int b);

int main() {

	int a = 2;
	int b = 1;
	
	printf("a=%d, b=%d\n", a,b);
	printf("add: %d\n", add(a,b));

	getchar();
	return 0;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ShaneMcDonald
Software Developer
Canada Canada
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150427.1 | Last Updated 26 Jul 2010
Article Copyright 2010 by ShaneMcDonald
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid