   Lib problem
  Hi,I made a small engine and exported it to a .lib file. It works perfectly when the code using it is built in Release mode, otherwise I get a runtime error.Anyone had a similar problem/has an idea why this happens?Thank you,Rosália   
  Please, post the error. There are thousands of errors and I'm too lazy to guess.   ;  Sorry, hihi, here it goes:Unhandled exception at 0x5ce07b3f (msvcp90d.dll) in Metaballsd.exe: 0xC0000005: Access violation writing location 0x0000000f.I also took a look as where exactly the problem happens, and I have a function like this:   // Initialize profiles   void Shader::initialize(string vertexFile, string geometryFile,   string fragmentFile)where the strings I pass are changed to something else like "#", "¢".. If I try to change them manually after I pass them, likevertexFile = "data/metaballsV.cg";fragmentFile = "data/metaballsF.cg";geometryFile = "";I get a runtime error "dst != null" at fragmentFile = "data/metaballsF.cg"Thank you,Rosália   ;  well, I guess there is a problem with you shaders. Disable them and then find out what's causing the problem.Good luck!   ;  Sorry, but this doesn't make any sense. If the problem were my shaders, why would they work on release mode? I get a runtime error when I copy a string to another one, I really can't see how this could be related to my shaders.Anyone experienced problems when using a lib in Debug mode? Is there anything special I should pay attention? Should I export different libs for Debug and Release, just like some big libraries (Qt, for example )do?Thank you,Rosália   ;  Help yourself. Try to get a clue about what you're talking about.   ;  The error it's giving you states you're trying to write to an address at 0x0000000f, which is basically saying you've got an integer with the value of 15, which you're using as a pointer, and you're trying to write something to that. The exact code you're using before during and after the problem might help solve it...   ;  Hi,I didn't mean to be rude, I'm sorry. I just didn't (and still don't) see the connection between my .cg files and my parameters getting corrupted when I pass them to a library function.I commented out the shaders (also the #include <cgGL.h> and #include <cg.h>, just to make sure) and still have the same problem. I reduced my class to one function which receives 3 strings and write something on them, and the problem is still there.Any other idea why such behaviour could happen? In the Release Mode, everything works fine.Thank you,Rosália   ;  First of all, I'm sorry to support the previous statements, you should get a little bit more knowledgable about what you are doing here in order to understand the problem better.Debug and Release modes are obviously different, otherwise there would be no need for those two different modes, right? You are stating that your code is alright and try to argue that this is the case by stating that it works in release mode, when what you are really saying is that your program works if and only if certain conditions are met, something which is obviously not the case when you switch modes.Usually, code that breaks when switching from release to debug mode or vice versa is not very robust (read: buggy) code, so please do not assume your code is correct - most likely, it is not.Unfortunately, the information you gave us to help you fix your problem are somewhat scarce. For example, I do not understand what you are trying to say byQuote:I also took a look as where exactly the problem happens, and I have a function like this:// Initialize profilesvoid Shader::initialize(string vertexFile, string geometryFile, string fragmentFile)where the strings I pass are changed to something else like "#", "¢".. Is this change intentional? Do you expect the changes to persist even though you passed those strings by value?Psychic debugging: Those string values don't seem all too meaningful to me, so I expect the change is not intentional, but instead is a result of some memory getting overwritten, which would also explain why further assignments cause your program to crash.At this point, it would make sense to post some actual code that could be responsible for the problem, so maybe you should be doing that.   ;  Hi,I made the code as simple as possible such that it still has the problem.// MAIN CODE#include <RX/Test.h>RX::Test shaderReflection;int main(){shaderReflection.initialize("lalala", "lalala", "lalala");return 0;}the Test class is as follows// TEST HEADERclass Test{public:// Initialize profilesvoid initialize(std::string vertexFile, std::string geometryFile, std::string fragmentFile);};// TEST CPPvoid RX::Test::initialize(string vertexFile, string geometryFile, string fragmentFile){vertexFile = "data/metaballsV.cg";fragmentFile = "data/metaballsF.cg";geometryFile = "";}At the line fragmentFile = "data/metaballsF.cg"; I get a "dst != null" exception.Thank you,   