Recent Posts

Pages: 1 2 3 4 5 [6] 7 8 9 10
51
Using Code::Blocks / Re: Project not building after change in its properties
« Last post by AndrewCot on September 20, 2021, 06:35:59 am »
Looks like you are mixing 32 and 64 bit code and libraries.

The tutorial includes the following paragraph that explains which SDL directory contains the 32 bit library and which contains the 64 bit library:

Open the gzip archive and there should be a tar archive. Open up the tar archive and the should be a folder called SDL2-2.something.something. In side of that folder there should be a bunch of folders and files, most importantly i686-w64-mingw32 which contains the 32bit library and x86_64-w64-mingw32 which contains the 64bit library.

You need to use the same 32bit or 64 bit library to match the 32bit or 64 bit Mingw you installed. If you installed the 32bit MINGW you need to use the 32bit SDL2 library or if you installed the 64 bit MINGW then you need to use the 64bit SDL2 library.
52
Using Code::Blocks / Re: Project not building after change in its properties
« Last post by pion on September 19, 2021, 08:34:51 pm »
Here:

Code

-------------- Clean: Debug in SDL2test (compiler: GNU GCC Compiler)---------------

Cleaned "SDL2test - Debug"

-------------- Build: Debug in SDL2test (compiler: GNU GCC Compiler)---------------

gcc.exe -Wall -g -I..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\include -c C:\Users\lr\Desktop\SDL2\sdl2.c -o obj\Debug\sdl2.o
gcc.exe -L..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib -o bin\Debug\SDL2.exe obj\Debug\sdl2.o  -lmingw32 -lSDL2main -lSDL2 
C:\Users\lr\Desktop\SDL2\sdl2.c: In function 'SDL_main':
C:\Users\lr\Desktop\SDL2\sdl2.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib/libSDL2main.a when searching for -lSDL2main
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib\libSDL2main.a when searching for -lSDL2main
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib/libSDL2main.a when searching for -lSDL2main
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2main
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib/libSDL2.dll.a when searching for -lSDL2
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib/libSDL2.a when searching for -lSDL2
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib\libSDL2.a when searching for -lSDL2
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib/libSDL2.dll.a when searching for -lSDL2
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\..\..\SDL2\SDL2-2.0.16\i686-w64-mingw32\lib/libSDL2.a when searching for -lSDL2
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
3 error(s), 1 warning(s) (0 minute(s), 1 second(s))
 

53
Using Code::Blocks / Re: Project not building after change in its properties
« Last post by Miguel Gimenez on September 19, 2021, 07:50:55 pm »
In brief:
   - Open your project
   - Go to Settings -> Compiler -> Other settings and select "Full command line"
   - Select Build -> Rebuild
   - Select the "Build log" tab in the "Logs and others" window (not the "Build messages" one)
   - Right click in the tab and select "Copy contents to clipboard"
   - Paste the contents here using code tags


54
Development / Re: compile issue with wx 3.1.6
« Last post by kipade on September 19, 2021, 03:33:07 pm »
I think it should be.
I always keep it fresh from https://github.com/obfuscated/codeblocks_sf.git. and from its latest commit log, its equal as svn 12529.
and my OS is ArchLinux, gcc version 11.1.0
thanks
55
Development / Re: compile issue with wx 3.1.6
« Last post by AndrewCot on September 19, 2021, 03:14:39 pm »
Are you using the latest SVN trunc code?
If yes, when did you grab the code?
If not try the very latest CF SVN code as it has changes for 3.1.6 from a few weeks ago.

If the latest truck codes  does not help , then comi9ler are you using? Version and the URL you used to download it from?

When did you grab the 3.1.6 Github sources to do the build?

56
Using Code::Blocks / Re: Project not building after change in its properties
« Last post by pion on September 19, 2021, 02:53:53 pm »
Sorry, no matter how long I try the site doesnt load.
57
Development / compile issue with wx 3.1.6
« Last post by kipade on September 19, 2021, 02:52:24 pm »
When I update my wx into latest 3.1.6 version, codeblocks could not be compiled any more, because a c++ issue:
Code
n file included from /usr/include/wx-3.1/wx/wx.h:24,
                 from /usr/include/wx-3.1/wx/wxprec.h:42,
                 from ../../../src/include/sdk_common.h:24,
                 from ../../../src/include/sdk_precomp.h:13:
/usr/include/wx-3.1/wx/event.h: In instantiation of 'constexpr auto wxPrivate::DoCast(void (C::*)(E&)) [with E = wxHtmlLinkEvent; C = CCManager]':
../../../src/sdk/ccmanager.cpp:290:22:   required from here
/usr/include/wx-3.1/wx/event.h:157:12: error: 'wxEvtHandler' is an inaccessible base of 'CCManager'
  157 |     return static_cast<void (wxEvtHandler::*)(E&)>(pmf);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But, the CCManager DO is the child class of wxEvtHandler. How to fix this compile issue?
/usr/include/wx-3.1/wx/event.h:157:12: note:    in pointer to member function conversion

58
Using Code::Blocks / Re: Project not building after change in its properties
« Last post by Miguel Gimenez on September 19, 2021, 01:30:32 pm »
Post a full rebuild log, see this FAQ (you can get an error from Cloudflare, retry sone times)
59
Using Code::Blocks / Project not building after change in its properties
« Last post by pion on September 19, 2021, 12:35:41 pm »
I'm trying to import the SDL2 library and followed these two tutorials:

https://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/index.php
https://www.youtube.com/watch?v=QV6bOYbT_-I&t=57s

However, after I changed the project's properties accordingly (add search directory, edit linker options, add library directory etc. ), pasted the code and put the .dll file into the project folder, (it gives me no errors when debugging) it repeatedly asks me if I want to build the project, but won't execute the program or build the project. It only happens after changing the properties, the code seems to be alright.

Code (If it has something to do with it,  taken from the second tutorial link):

Code
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>

int main(int argc, char* argv[])
{
    SDL_Init(SDL_INIT_EVERYTHING);
    cout << "Hello" << endl;
    SDL_Window* window;
    window = SDL_CreateWindow("MyWindowTitle", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
    640, 480, SDL_WINDOW_RESIZABLE);
    SDL_Delay(4000);
    SDL_DestroyWindow(window);
    SDL_Quit();
}

I would appreciate your help!

60
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by Daviger on September 18, 2021, 09:59:55 pm »
Hi, I am Daviger.
I am here,
and I am real.
Be glad you are real,
and not here. . .
Ta-Ta.
Pages: 1 2 3 4 5 [6] 7 8 9 10