Calling fprintf from dynamic library (c++)
<p>I'm creating a windows DLL library that contains a logging class, the log function in that class simply calls fprintf like this for testing purposes:</p>

<p>fprintf(stderr, "DEBUG:   %s\n", "Hello");   </p>

<p>Now this call works fine if i use it from any function in any file in my other project (that uses the library) but if i put it anywhere in my library with the logging class it simply wont print anything.<br>
I can see it runs the function correctly (using a simple exit(0); to test).  </p>

<p>Now i'm still kinda new to the whole Library concept in c/c++ so there might be something i just don't understand, but otherwise i don't know why it doesn't work.   </p>

<p>I tried searching here and on google, but i couldn't find anyone else with the same exact problem.<br>
I use VC++ 2010</p>

<p>EDIT: I got the idea of passing the filepointer instead of just using stderr from the library, this causes an exception to be thrown however (the _tmpfname pointer of the file is NULL at the time of the throw, which im not sure is correct)</p>
