0

Here a error i getting when compile:

b-spec/BS_Linux_Dynamic.cpp:57:11: error: expected constructor, destructor, or type conversion before ‘(’ token make[1]: * [Release/b-spec/BS_Linux_Dynamic.o] Error 1 make[1]: Leaving directory `/home/mm/Плот/metamod-1.19/src' make: * [all] Error 2

here is source: http://pastebin.com/rhpPrmHv

Thanks for any replies!

2 Answers 2

3

The problem is here:

__declspec(naked) void CheckProtocol_AsmHelper_LDyn() {

This doesn't compile because __declspec(naked) is a Microsoft extension that is not supported by gcc.

See Equivalent of __declspec( naked ) in gcc/g++

Sign up to request clarification or add additional context in comments.

1 Comment

Ok when i change "_declspec(naked)" to "__attribute__(naked)" i get this pastebin.com/JsDLRnEB
1

Why don't you use asm() instead of __asm{}? Since the linux kernel does it this way as well, why don't you. Also, why are you using c++ to write a kernel module?

Oh! And use __attribute__((naked)).

EDIT:

You need to end each call to asm() with a semicolon. Also, asm() takes a string as an argument, so you need to quote-wrap your assembly code. You also need to use \n and \t to indicate tabs and newlines in those strings.

1 Comment

Ok, here the error log - pastebin.com/tEQcQypn here the edit - pastebin.com/g9s4JRee

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.