-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pexports: add pexports/0.47 recipe #7050
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
All green in build 3 (
|
- extern __declspec(dllimport) void __stdcall *GetModuleHandleA(char *name); | ||
- extern __declspec(dllimport) void __stdcall *GetProcAddress(void *module, char *name); | ||
+ extern __declspec(dllimport) void * __stdcall GetModuleHandleA(char *name); | ||
+ extern __declspec(dllimport) void * __stdcall GetProcAddress(void *module, char *name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sure, these functions return pointers (HMODULE/HINSTANCE and a function pointer)
seems like upstream has a bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the C standard says to assume that EAX (=result variable) is clobbered.
message(FATAL_ERROR "pexports only supports Windows") | ||
endif() | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why so complex CMakeLists.txt for test_package?
did you borrow it somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's homebrew.
It's just creating a dll -> running pexports on the dll -> running dlltool/lib to create an import library -> create an exe using the import library.
It's do-able outside cmake by just sequentially executing the commands, but I can re-use some cmake variables here.
@@ -0,0 +1,32 @@ | |||
--- pexports.c | |||
+++ pexports.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems be a feature patch, but doesn't break when missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I added it to be able to test pexports on non-Windows systems.
Specify library name and version: pexports/0.47
conan-center hook activated.