User forums > Help

what linker options we must use?

<< < (3/4) > >>

cambalinho:
i found some errors that i didn't notice: the image class, for exemple, is redefinided.
i can fix these ;)

stahta01:
Please try using this way to do static library usage

--- Code: ---$(TARGET_COMPILER_DIR)/i686-w64-mingw32/lib/libmsimg32.a
--- End code ---
Instead of doing this way!

--- Code: ---"..\..\..\..\..\Program Files\CodeBlocks\mingw32\i686-w64-mingw32\lib\libmsimg32.a"
--- End code ---

You need to use *only* a single toolchain!!!!

Tim S.

stahta01:

--- Quote from: cambalinho on November 11, 2023, 03:03:40 pm ---i found some errors that i didn't notice: the image class, for exemple, is redefinided.
i can fix these ;)

--- End quote ---

Yes, fix those errors and then try my prior post suggestion.

Tim S.

cambalinho:
done!!
now lets go to another error:

--- Code: ---a.KeyDown=[](int key, int repeat)
    {
        if(CombinationKeys({'A','S'},{'W'},{'R','T'}, {'O','P'})==true)
        {
            a.Text="hello world";
            MessageBox(NULL,"hi", "hello",MB_OK);
        }

        if(key==VK_ESCAPE)
            End();

    };
--- End code ---
'a' it's from 'form' class:

--- Code: ---//KeyBoard events:
        event(KeyDown, (int *Key, int repeat)) = [](int *Key, int repeat) {;};
--- End code ---
from:

--- Code: ---#define event(EventName, ... ) std::function<void(__VA_ARGS__ )> EventName
--- End code ---
now i get the error here:

--- Code: ---a.KeyDown=[](int key, int repeat)
    {
        if(CombinationKeys({'A','S'},{'W'},{'R','T'}, {'O','P'})==true)
        {
            a.Text="hello world";
            MessageBox(NULL,"hi", "hello",MB_OK);
        }

        if(key==VK_ESCAPE)
            End();

    };
--- End code ---
"C:\Users\Utilizador\Documents\CodeBlocks\classcontrols\main.cpp|73|error: no match for 'operator=' (operand types are 'std::function<void(int*, int)>' and 'WinMain(HINSTANCE, HINSTANCE, LPSTR, int)::<lambda(int, int)>')|"
what i'm doing wrong?

stahta01:

--- Quote from: cambalinho on November 11, 2023, 03:43:36 pm ---"C:\Users\Utilizador\Documents\CodeBlocks\classcontrols\main.cpp|73|error: no match for 'operator=' (operand types are 'std::function<void(int*, int)>' and 'WinMain(HINSTANCE, HINSTANCE, LPSTR, int)::<lambda(int, int)>')|"
what i'm doing wrong?

--- End quote ---

I can not help you with that; I have forgotten more C++ than I remember.

And, that is a C++ type problem, my skill is fixing build issues.

I still have problems with the idea that others can not understand build errors that are simple to me.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version