User forums > Using Code::Blocks

Linking problem with CLANG & Code::Blocks, linking works with GCC & Code::Blocks

<< < (2/3) > >>

OMG OMG OMG I fixed it!

add this to main.cpp:

--- Code: ---#undef main
int main(int argc, char *argv[]){ // Do not remove arguments or it will show a SDL_main error.

--- End code ---

and linking options go like this:

--- Code: ----lSDL2main -lSDL2 -lSDL2_mixer -lSDL2_ttf -lSDL2_image -Xlinker /subsystem:console

--- End code ---

And you must download SDL, SDL ttf, SDL image, etc... for developers Visual Studio version, and extract the .lib to the chocolatey installation folder where MingW64 is located.


Ah! delete the .a links, it just looks like this:

Ah, don't forget to tick this:

Now how I do use the famous CLANG static code analyzer?


[0] Message Index

[#] Next page

[*] Previous page

Go to full version