Alex
Alex

Reputation: 10126

gcc '-rdynamic' flag equivalent for MSVC

I have a cross-platform project that requires to compile .so files with -rdynamic in gcc (about -rdynamic).

Does such an option for MSVC exist?

Upvotes: 1

Views: 1020

Answers (1)

MSalters
MSalters

Reputation: 179991

The flag is not needed, because the Windows/MSVC linker model is different. On Windows, the linker uses .LIB files to figure out dependencies, while the OS uses Import Address Tables and Export Address Tables.

The key to getting a a LIB file and an for your Export Address Table exe is __declspec(dllexport). Yes, the name is misleading, but in the end an EXE is a PE-format file just like a DLL.

Upvotes: 2

Related Questions