User forums > Help
Compiling...
(1/1)
turdballs:
i am using ms detours 1.5 library. i have included detours.h in the project and setup my linker and compiler directories to the folder where detours.lib and detours.h are. I also added detours.lib to the linker but i get these errors no matter what when i compile...
--- Code: ---||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"detours" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"detours" ' unrecognized|
C:\Users\Alford\Documents\c++\detour\detours.lib(detours.obj)||In function `DetourFunction@8':|
8]+0x9)||undefined reference to `??2@YAPAXI@Z'|
c:\code\detours\sr|10|undefined reference to `??3@YAXPAX@Z'|
C:\Users\Alford\Documents\c++\detour\detours.lib(detours.obj)||In function `DetourEnumerateModules@4':|
4]+0x11)||undefined reference to `_except_list'|
4]+0x19)||undefined reference to `_except_list'|
c:\code\detours\sr|43|undefined reference to `_except_list'|
C:\Users\Alford\Documents\c++\detour\detours.lib(detours.obj)||In function `DetourGetEntryPoint@4':|
4]+0x11)||undefined reference to `_except_list'|
4]+0x19)||undefined reference to `_except_list'|
C:\Users\Alford\Documents\c++\detour\detours.lib(detours.obj):c:\code\detours\sr|29|more undefined references to `_except_list' follow|
||=== Build finished: 8 errors, 2 warnings ===|
--- End code ---
here is my code
--- Code: ---#include "main.h"
#include "detours.h"
void DLL_EXPORT SomeFunction(const LPCSTR sometext)
{
MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION);
}
char __stdcall *getPckt()
{
char *hello = "hithere";
return hello;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if(fdwReason == DLL_PROCESS_ATTACH){
DetourFunction((PBYTE)0x7686C4C8, (PBYTE)getPckt);
}
else if (fdwReason == DLL_PROCESS_DETACH) {
MessageBox(NULL, "ERROR", "wtf?", MB_ICONERROR);
}
return TRUE; // succesful
}
--- End code ---
turdballs:
could anyone tell me why i am getting all these errors?
turdballs:
here's some more error
--- Code: ---\Documents\c++\detour\detours.lib(detours.obj):c:\code\detours\sr:29: more undefined references to `_except_list' follow
collect2: ld returned 1 exit status
Creating library file: bin\Debug\libdetour.dll.a
Process terminated with status 1 (0 minutes, 0 seconds)
8 errors, 2 warnings
--- End code ---
stahta01:
Edit: step 1 decide what compiler you are using! Post it here.
I suggest turning an Full Compiler Logging!
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Then find a site that supports your Compiler; post your questions about how to use your compiler on a site other than this site.
Post your questions about how to use Code::Blocks on this site.
(I suggest reading ALL the FAQs and you might even read some of the CB Manual.)
Edit: I do NOT think that mixing Microsoft Directions and MinGW directions are likely to work.
stahta01:
--- Quote from: turdballs on July 06, 2011, 02:32:07 am ---could anyone tell me why i am getting all these errors?
--- End quote ---
You appeared to be passing Microsoft Compiler options to an MinGW GCC Compiler.
But, this site suggests a different cause and fix.
http://yeohhs.blogspot.com/2005/07/dev-c-and-mingw-warning-drectve.html
Tim S.
Navigation
[0] Message Index
Go to full version