I use code::blocks as an IDE but now i want to create a .dll file. I have followed this tutorial however it is for VC++.
TUTORIAL:
http://msdn.microsoft.com/en-US/library/vstudio/ms235636
I am strugeling becuase I am used to creating .dlls in C#. They are so easy. You just create a new library project. Write your code eg:
// The .dll version
using System;
namespace SomeName
{
class Class1
{
public int add(int x, int y)
{
return x + y;
}
}
}
// The real "runable" version
using System;
namespace AgainSomeName
{
class Class2
{
public void Main(string[] args)
{
SomeName.Class1.add(5, 3);
}
}
}
Thats it. All you have to do now is right click on your project in your IDE and then say add reference and add the .dll file. Easy usable. Isnt there a way to do it like as easy as that. Without having to use all those #ifdef, #endif, #else and static __declspec(dllexport) words. Easy like you do it in C#?
Oh and also, if i use Visual studio C++ exspress can i then only create programs for the .NET when i use that IDE? or whill the programs work for computers without the .NET alsong as i just dont include .NET header files?