I have a MS VS 2008 C++ project that was running with "common langage runtime support" as /clrure without problems.
I had to change it to /clr in order to use another library (GDAL), but now my other library (libcsv) is having problems
Can I do something about it? (I can modify the code as I directly use the .cpp and .h from the libcsv)
It is definatly the line when I use the function csv_parse from the libcsv library that gets me this error because when I comment it I can compile and run my code fine.
The call to the csv_parse in FileConvert.cpp is as follow:
You're apparently trying to pass a managed callback function to an (unmanaged) library function that in fact expects an unmanaged callback. As the callback function concatstr() references nothing but the parameters it gets passed and two C standard library functions, turning it from the managed class member function it is now into an unmanaged free function should work as a quick and dirty fix.
In order to do that, remove the concatstr() prototype from the FileConvert class body and the FileConvert:: from the concatstr() function header. Then wrap up the function definition between #pragma managed(push, off) and #pragma managed(pop) directives. You may also need to add a prototype for the callback function or move its definition around in case it gets referenced before it is defined.
HTH
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
I can now use my library =D ! I didn't do pragma definitions and decided to simply remove this class altogether because the function in question were more of a library type than an object anyway.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.