Visual Studio C++ 2005
Windows XP
I am creating this DLL. The DLL is actually linking to another LIB. I included the headers and the lib path. Everything compiles fine.
Actually, I wrote this code to work on Linux, which works fine. Now I am porting it to work in windows.
However, I noticed that some DLLs from some sample code use this in the header:
static __declspec(dllexport) float some_function(int num1, int num2);
However, I made the following code example below for the * .h header file. However, not sure if I still need higher or not?
#ifdef __cplusplus
extern "C" {
#endif
media_t* get_media(media_description_t* obj);
void* get_item(media_description_list_t *obj, int num);
int get_number_format(media_t *obj);
const char* get_media_value(media_t *obj);
#ifdef __cplusplus
}
#endif
Sample code for implementing * .cpp file
int get_number_format(media_t *obj)
{
Media *med = (Media*)obj;
return med->getNumFormat();
}
So, do I need this static __declspec(dllexport)?
Thanks so much for any advice,
source
share