dll

hello, i have a project with two classes "list" and "element", i want to transform this projet to a dll . what should i change?
I'm not really sure which operating system you use. you should be more precise. Anyhow, I will use the command line and the compiler g++ in windows.
Let's say you have main.cpp print.cpp print.h. OK

From the command line
First: you need to create the .obj for print.cpp as the following
>> g++ -c print.cpp -o print.obj
Then you need to create .dll for print.cpp as the following
>> g++ -shared -o print.dll print.obj
Now you need to create the .obj for main.cpp as the following
>> g++ -c main.cpp -o main.obj
Last step
>> g++ -o main.exe main.cpp print.dll

Now apply this concept for your case
Last edited on
Well, DLL does suggest Windows

For Windows:

(GCC)

HOWTO Create and Deploy a Sample DLL using MinGW
http://www.mingw.org/wiki/sampleDLL

(Visual Studio)

Walkthrough: Creating and Using a Dynamic Link Library (C++)
http://msdn.microsoft.com/en-us/library/ms235636%28v=vs.100%29.aspx

For Linux:

(GCC)

Creating and Using C++ shared libraries using g++
http://peon-developments.blogspot.co.uk/2011/07/creating-and-using-c-shared-libraries.html

Building and Using Shared Libraries
http://www.linux-mag.com/id/1028/

And then there's Apple's dylibs...

(Clang)

Creating Dynamic Libraries
https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/CreatingDynamicLibraries.html

Andy
Last edited on
Topic archived. No new replies allowed.