EXE also exports static library exports

I created both a static lib and an EXE file (which uses the static lib library), but when I open the EXE in IDA pro, the export also appears in the EXE.

I know that they should be exported to .lib itself, but why do they appear as export to exe too?

EDIT: Here is the export / import (they are in separate header files)

Here is the export:

#define NC_LIBEXPORT(a) extern "C" __declspec(dllexport) a __cdecl
NC_LIBEXPORT(VOID) rol8(unsigned char* a, unsigned char b);

and import:

extern "C" VOID rol8(unsigned char* a, unsigned char b);
+3
source share
1 answer

You need to make sure that you are not using when creating a static library __declspec(dllexport).

If you want to use the same lib in the DLL and in your executable file, and you do not want the executable to export characters, you need to use the DEF file, not __declspec(dllexport).

+5
source

All Articles