Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
In my notes from a month ago, I narrowed it down to this:

CodeBlocks SVN r12991
- Building with MinGW 8.4.0 fails.
  g++.exe dislikes option -stc++11 here, especially together with -mthreads. Silent fail, no error code or message.
- Building with MinGW 10.3 (PThread version) Succeeds.

2
Help / Re: Set relative path to compiler
« Last post by stahta01 on Yesterday at 09:46:18 pm »
3
Help / Set relative path to compiler
« Last post by gtafan on Yesterday at 05:09:32 pm »
I would like to use codeblocks as portable, but to do that need to set relative compiler path instead of absolute one. I tried to set the path just to MinGW, but that not working. Have I done something wrong?
4
It's been some time since I used Code::Blocks, because I was developing exclusively for Linux. But now I'm returning to Windows and I see there are some nice changes. Thanks for the ongoing development. So far I'm pleased with the latest version.

Here are some results from building the SDL2 example. The first shows the wrong way. The second shows the right way. But as I mention below, it does require hand-copying sdl2.dll to the same directory as the exe file (bin/debug).

This may be informative for people who are struggling with this example. I spent several hours on this, but after getting a few hours of sleep it turned out to be easy to solve.

I did a clean install of Code::Blocks 20.03. I'm using the default setup, without any fiddling with the Code::Blocks settings. Before installing Code::Blocks, I deleted my existing mingw32 and mingw64 installations and let Code::Blocks do its default mingw installation. Code::Blocks has a feature to autodetect the compiler path. I verified the setup by building the example console and Windows GUI programs. No problems.

I also did a clean install of sdl2. The link is https://github.com/libsdl-org/SDL/releases/tag/release-2.26.0. Scroll down to Assets. I selected SDL2-devel-2.26.0-mingw.tar.gz. I downloaded, then extracted to c:\sdl2.

First, just a small comment on the source file for the SDL2 example. I changed $include <SDL.h> to #include <SDL2/SDL.h>. Otherwise, I'm not modifying the example source code.

Next I tried building the sdl2 example. In the dialog box, it asks for the sdl2 path,which I set to c:\sdl2\sdl2-2.26.0\i686_w64-mingw32. In this example, it is not correct to use the i686 option (32-bit). I've seen some old tutorials where this is the way they do it. People still refer to old tutorials. Here is the Build Log from that attempt.


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

g++.exe -Wall -g -IC:\sdl2\SDL2-2.26.0\i686-w64-mingw32\include -c C:\Users\David\winprogs\sdl_tests\sdlx1\main.cpp -o obj\Debug\main.o
g++.exe -LC:\sdl2\SDL2-2.26.0\i686-w64-mingw32\lib -o bin\Debug\sdlx1.exe obj\Debug\main.o   -lmingw32 -lSDL2main -lSDL2.dll -luser32 -lgdi32 -lwinmm -ldxguid
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\sdl2\SDL2-2.26.0\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 C:\sdl2\SDL2-2.26.0\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 C:\sdl2\SDL2-2.26.0\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 C:\sdl2\SDL2-2.26.0\i686-w64-mingw32\lib/libSDL2.dll.a when searching for -lSDL2.dll
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\sdl2\SDL2-2.26.0\i686-w64-mingw32\lib\libSDL2.dll.a when searching for -lSDL2.dll
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\sdl2\SDL2-2.26.0\i686-w64-mingw32\lib/libSDL2.dll.a when searching for -lSDL2.dll
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.dll
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 3 second(s))
3 error(s), 0 warning(s) (0 minute(s), 3 second(s))
 

When I try building another SDL2 project using the wizard, and set the path to x86_64-w64-mingw32 (64-bit), I get the following Build Log messages.


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

Cleaned "sdlz - Debug"

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

g++.exe -Wall -g -IC:\sdl2\SDL2-2.26.0\x86_64-w64-mingw32\include -c C:\Users\David\winprogs\sdl_tests\sdlz\main.cpp -o obj\Debug\main.o
g++.exe -LC:\sdl2\SDL2-2.26.0\x86_64-w64-mingw32\lib -o bin\Debug\sdlz.exe obj\Debug\main.o   -lmingw32 -lSDL2main -lSDL2.dll -luser32 -lgdi32 -lwinmm -ldxguid
Output file is bin\Debug\sdlz.exe with size 147.95 KB
Running project post-build steps
XCOPY (invalid)\bin\*.dll bin\Debug\ /D /Y
File not found - *.dll
0 File(s) copied
Process terminated with status 4 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
 
I needed to copy sdl2.dll to the projects \bin\debug. Otherwise I get the system error that the program can't run because it can't find sdl2.dll.
 
Done this way, I think the only issue some people may have is if they want to do static linking. I think I've explained thoroughly how I got it to work, but feel free to ask questions.






5
Development / Re: error translation in 'ccdebuginfo.cpp'
« Last post by Miguel Gimenez on Yesterday at 02:15:41 pm »
If I understand correctly your question, open ccdenbuginfo.wxs from within C::B, change anything and revert the change. This will force rewriting of the cpp file.
6
Development / Re: error translation in 'ccdebuginfo.cpp'
« Last post by LETARTARE on Yesterday at 12:39:10 pm »
How to regenerate the code of  "...\cb-13071\src\plugins\codecompletion\parser\ccdebuginfo.cpp" and "*.h" ?


7
Development / Re: error translation in 'ccdebuginfo.cpp'
« Last post by LETARTARE on Yesterday at 11:53:50 am »
@Miguel Gimenez
The question has hardly been asked and the answer has arrived !!
I thank you for your permanent availability and your speed in solving problems.
I'm going back to the keyboard to test your solution with 'cb13071-wx321'
8
Development / Re: error translation in 'ccdebuginfo.cpp'
« Last post by Miguel Gimenez on Yesterday at 10:04:38 am »
r13070 removes _() in wxSmith-generated code if the string contains only non-alpha characters.
9
Help / Re: Problem with codeblocks-20.03 portable
« Last post by stahta01 on November 25, 2022, 09:06:38 pm »
We do not make a portable version. You can use the nightlies without installing, but they are not portable.
I am tallking about codeblocks-20.03mingw-32bit-nosetup.zip. Could you posibly explain the diference between without installing and portable?

cblauncher is part of the portable version; I have no idea how else the portable version varies.
Edit: The portable version is designed to be used on a USB flash drive; cblauncher is part of the changes done to support that.

Tim S. 
10
Development / Re: error translation in 'ccdebuginfo.cpp'
« Last post by Miguel Gimenez on November 25, 2022, 07:23:26 pm »
That file is not part of any project. Anyway, I have removed _() from most strings (and added it to others) in r13069.
Pages: [1] 2 3 4 5 6 ... 10