Start New Discussion within our Software Development Community

Hi guys, I am trying to load a Haptik.hpp to control a Novint Falcon.

I receive error C2144 syntax error and C4430 in the next line

//---FUNCTION
//	Desc: C-based entrypoint to retrieve IHaptikLibrary interfaces
//------------------------------------------------------------------------------------------------------------->
extern "C" HAPTIK_DLL_IMPORT_EXPORT PVOID GetHaptikLibraryInterface(IN UINT32 interfaceId = HAPTIK_IHAPTIKLIBRARY);

So I pasted one

;

right there to reduce it to just one error (C4430)

//---FUNCTION
//	Desc: C-based entrypoint to retrieve IHaptikLibrary interfaces
//------------------------------------------------------------------------------------------------------------->
extern "C" HAPTIK_DLL_IMPORT_EXPORT; PVOID GetHaptikLibraryInterface(IN UINT32 interfaceId = HAPTIK_IHAPTIKLIBRARY);

I am kind of new to C++, I know how to load a header but not really what is asking here, I tried defining with some types, but no

Anyone has an idea
Thanks in advance

You need to find out what PVOID is defined to be. If it's not defined to be anything, such as define PVOID then the compiler will produce C4430. If you don't know what C4430 error is then look it up with google.

>>HAPTIK_DLL_IMPORT_EXPORT
Your program need to define that symble to be either dllspec(__import) or dllspec(__export) depending on whethere you are declaring it in a DLL or the application program that uses the DLL. Just putting a semicolon after it like you did is not the correct solution.

Comments
Awesome response
This question has already been answered. Start a new discussion instead.