Skip to content
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

contains invalid OMF record, type 0x21 (possibly COFF) #312

Open
annenle100lesh opened this issue Mar 16, 2024 · 3 comments
Open

contains invalid OMF record, type 0x21 (possibly COFF) #312

annenle100lesh opened this issue Mar 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@annenle100lesh
Copy link

Describe the bug
[ilink32 Error] Error: 'C:\USERS\USER\DESKTOP\MAIN\LIB\DETOURS.LIB' contains invalid OMF record, type 0x21 (possibly COFF)
I using rad studio 12 version write code from C++ but i cannot using detours library i try coff2omf recorder but its not too work.
if i using converting library
haat1

i have error like this

Command-line test case


#include <iostream>
#include <windows.h>
#include "detours.h"
#include "pch.h"
#pragma comment(lib, "detours.lib")

int main2 (){

DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach((PVOID*)&original_sub, hooked_sub);
DetourTransactionCommit();
}


**Detours version**
All versions i need your helps for rad studio using detours 
@annenle100lesh annenle100lesh added the bug Something isn't working label Mar 16, 2024
@annenle100lesh
Copy link
Author

hata2

@sylveon
Copy link
Contributor

sylveon commented Mar 16, 2024

@QianNangong
Copy link

C++ Builder use OMF for legacy bcc compiler and ELF for legacy clang-based bccx compiler, they are not compatible with COFF used by MSVC and MinGW toolchains by default.
You may switch to RAD Studio 12.1 and enable new clang compiler which does support COFF or recompile Detours using legacy bcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants