oneee
oneee

Reputation: 77

How to write own DLL in Visual Studio, C language (not C++)

I'm trying to create my own DLL... I used wizzard in VS2008 to create template for DLL. This works fine and the dll builds successfully (Test.dll is created).

BUT, when I rename the file from Test.cpp to Test.c (which I guess causes compilation in C-mode), solution rebuilds also successfully, but no .dll is created. The list of all created files follows:

mt.dep
BuildLog.htm
vc90.idb
Test.dll.embed.manifest
Test.dll.intermediate.manifest
Test.obj
MySecondCFile.obj
vc90.pdb
Test.dll.embed.manifest.res

For my purposes it's essential that the dll be in C not C++, while I already have a lot of code written in C, which does not compile as C++.

Do you know, why .dll is not created? What should I do?

Upvotes: 2

Views: 5252

Answers (1)

Charles
Charles

Reputation: 2661

Not sure if this fixes your problem, but you should start with modifying your project to compile as C code and not as C++.

Right click on your project -> properties -> C/C++ -> advanced -> Compile as C code.

Upvotes: 5

Related Questions