Casper_2211
Casper_2211

Reputation: 1091

Exporting functions in a dll. C and C++

I have an application called ProCharts that could read and access files from a C++ dll. Now if I add something like this and compile the dll in x64 mode.(VS2010->Win32 Console App->DLL)

int __stdcall Testb(int v)
{
    return v;
}

and then define that in a def file .The function gets called from that App with no problems.

However if I have something like this function in the same file (its name is also present in the def file)

int __stdcall AdvancedFunction(int v)
{
          //Calling a library that requires other libraries such as boost
          return ..;
}

then even the first function does not get called and the application calling the dll only states that there is an error with the dll. Could anyone tell me what might be going wrong ?I have placed all the dependencies with the dll file however I am still getting an error. I used dependency checker and it states that two functions are c functions and not C++ any suggestions or hints on how I could resolve this issue would highly be appreciated.

Upvotes: 0

Views: 162

Answers (1)

Casper_2211
Casper_2211

Reputation: 1091

After pasting the dependency and the other dll files in the main folder of ProCharts my library worked.

Upvotes: 1

Related Questions