Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Nightly builds / Re: The 24 March 2024 build (13493) is out.
« Last post by nenin on Yesterday at 02:48:44 pm »
Error detected: when I tried to compile single file, does not matter through menu, tree or hot key, C::B tries to run library instead of compile it.
Win 10 64b.
2
Help / Re: Fresh install of codeblocks seems to have messed up paths in some projects
« Last post by Vigor on March 27, 2024, 03:46:33 pm »
THANK YOU!

That fixed it, somehow the working directory on the projects that are failing to load data files got changed to C:\Program Files\CodeBlocks\MinGW\bin

And the projects that continued working correctly had a working directory of .     Just a single period.
3
Did you try adjusting the working folder for the CB Project?

Edit: Add steps to adjust working folder for target
With project open
Menu: Project -> Properties..
Tab: Build Targets
Select target to be changed
Change "Execution working dir" value

Tim S.
4
Help / Re: Fresh install of codeblocks seems to have messed up paths in some projects
« Last post by Vigor on March 27, 2024, 03:08:20 pm »
I don't think it is either.

As I said in the beginning, it compiles fine and runs fine IF I move the generated executable from the default location to the location of the project/workspace file .cbp

But normally I don't need to move the executable.    If I were to create a new codeblocks project today, and compile it, the executable would be in BASEFOLDER/bin/debug/executable.exe where BASEFOLDER=the origin of the .cbp file.

Then, while launching from codeblocks, the exe would launch as if it were in the same folder as the .cbp

If I wanted to run the exe WITHOUT codeblocks, I would need to move it to the same folder as the .cbp because the relative paths to data and image files would be broken from its compiled location.

In other words, the codeblock environment normally fudges the path to make the executable behave as if it were somewhere else (for convenience) and it isn't currently doing that.

but here is the build log

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

Cleaned "Colonize2 - Debug"

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

g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\316Block.cpp" -o obj\Debug\316Block.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\Cities.cpp" -o obj\Debug\Cities.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\ColBlock.cpp" -o obj\Debug\ColBlock.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\ColBlockView.cpp" -o obj\Debug\ColBlockView.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\helper.cpp" -o obj\Debug\helper.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\main.cpp" -o obj\Debug\main.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\Map.cpp" -o obj\Debug\Map.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\MapView.cpp" -o obj\Debug\MapView.o
C:\Parse Project\Greenville\Colonize2\316Block.cpp: In member function 'std::__cxx11::string Block316::IndexNames(int)':
C:\Parse Project\Greenville\Colonize2\316Block.cpp:344:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
C:\Parse Project\Greenville\Colonize2\Cities.cpp: In member function 'bool Cities::IsCity(int, int)':
C:\Parse Project\Greenville\Colonize2\Cities.cpp:285:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < cities.size(); i++)
                    ~~^~~~~~~~~~~~~~~
C:\Parse Project\Greenville\Colonize2\Map.cpp: In member function 'void CMap::DrawCities()':
C:\Parse Project\Greenville\Colonize2\Map.cpp:352:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < cities->cities.size(); i++)
                    ~~^~~~~~~~~~~~~~~~~~~~~~~
C:\Parse Project\Greenville\Colonize2\Map.cpp: In member function 'void CMap::DrawUnits()':
C:\Parse Project\Greenville\Colonize2\Map.cpp:810:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < punits->units.size(); i++)
                    ~~^~~~~~~~~~~~~~~~~~~~~~
C:\Parse Project\Greenville\Colonize2\Map.cpp: In member function 'bool CMap::IsCity(int, int)':
C:\Parse Project\Greenville\Colonize2\Map.cpp:1004:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < cities->cities.size(); i++)
                    ~~^~~~~~~~~~~~~~~~~~~~~~~
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\NatBlock.cpp" -o obj\Debug\NatBlock.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\NatSetts.cpp" -o obj\Debug\NatSetts.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\Slider.cpp" -o obj\Debug\Slider.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\stb_image.cpp" -o obj\Debug\stb_image.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\TexFont.cpp" -o obj\Debug\TexFont.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\Texture.cpp" -o obj\Debug\Texture.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\Units.cpp" -o obj\Debug\Units.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\UnitView.cpp" -o obj\Debug\UnitView.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\View.cpp" -o obj\Debug\View.o
g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c "C:\Parse Project\Greenville\Colonize2\Views.cpp" -o obj\Debug\Views.o
g++.exe -L"C:\Program Files\CodeBlocks\MinGW\lib" -o bin\Debug\Colonize2.exe obj\Debug\316Block.o obj\Debug\Cities.o obj\Debug\ColBlock.o obj\Debug\ColBlockView.o obj\Debug\helper.o obj\Debug\main.o obj\Debug\Map.o obj\Debug\MapView.o obj\Debug\NatBlock.o obj\Debug\NatSetts.o obj\Debug\Slider.o obj\Debug\stb_image.o obj\Debug\TexFont.o obj\Debug\Texture.o obj\Debug\Units.o obj\Debug\UnitView.o obj\Debug\View.o obj\Debug\Views.o   -lglfw3 -lglfw3dll -lopengl32
C:\Parse Project\Greenville\Colonize2\UnitView.cpp: In member function 'void UnitView::Draw()':
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:42:12: warning: enumeration value 'UV_OLD' not handled in switch [-Wswitch]
     switch (uvt)
            ^
C:\Parse Project\Greenville\Colonize2\UnitView.cpp: In member function 'void UnitView::DrawUnit()':
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:83:15: warning: enumeration value 'DT_OCCUPATION' not handled in switch [-Wswitch]
         switch(dt[z])
               ^
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:83:15: warning: enumeration value 'DT_SPECIALTY' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:83:15: warning: enumeration value 'DT_TIMEINSLOT' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:83:15: warning: enumeration value 'DT_LG4BIT' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\UnitView.cpp: In member function 'int UnitView::GetDTSize(DataType)':
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:155:11: warning: enumeration value 'DT_UNITTYPE' not handled in switch [-Wswitch]
     switch(d)
           ^
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:155:11: warning: enumeration value 'DT_VOID' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\UnitView.cpp: In member function 'void UnitView::Keyboard(int, int, int)':
C:\Parse Project\Greenville\Colonize2\UnitView.cpp:232:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if(active == un1.units.size())
                ~~~~~~~^~~~~~~~~~~~~~~~~~~
C:\Parse Project\Greenville\Colonize2\Views.cpp: In member function 'void Views::Draw()':
C:\Parse Project\Greenville\Colonize2\Views.cpp:15:12: warning: enumeration value 'V_NAT' not handled in switch [-Wswitch]
     switch (cur)
            ^
C:\Parse Project\Greenville\Colonize2\Views.cpp:15:12: warning: enumeration value 'V_CTV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:15:12: warning: enumeration value 'V_B3V' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:15:12: warning: enumeration value 'V_NSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:15:12: warning: enumeration value 'V_MSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp: In member function 'void Views::Keyboard(int, int, int)':
C:\Parse Project\Greenville\Colonize2\Views.cpp:36:15: warning: enumeration value 'V_NAT' not handled in switch [-Wswitch]
         switch(cur)
               ^
C:\Parse Project\Greenville\Colonize2\Views.cpp:36:15: warning: enumeration value 'V_CTV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:36:15: warning: enumeration value 'V_B3V' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:36:15: warning: enumeration value 'V_NSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:36:15: warning: enumeration value 'V_MSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp: In member function 'void Views::Mouse(int, int, int)':
C:\Parse Project\Greenville\Colonize2\Views.cpp:57:11: warning: enumeration value 'V_NAT' not handled in switch [-Wswitch]
     switch(cur)
           ^
C:\Parse Project\Greenville\Colonize2\Views.cpp:57:11: warning: enumeration value 'V_CTV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:57:11: warning: enumeration value 'V_B3V' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:57:11: warning: enumeration value 'V_NSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:57:11: warning: enumeration value 'V_MSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp: In member function 'void Views::MouseMove()':
C:\Parse Project\Greenville\Colonize2\Views.cpp:72:11: warning: enumeration value 'V_NAT' not handled in switch [-Wswitch]
     switch(cur)
           ^
C:\Parse Project\Greenville\Colonize2\Views.cpp:72:11: warning: enumeration value 'V_CTV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:72:11: warning: enumeration value 'V_B3V' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:72:11: warning: enumeration value 'V_NSV' not handled in switch [-Wswitch]
C:\Parse Project\Greenville\Colonize2\Views.cpp:72:11: warning: enumeration value 'V_MSV' not handled in switch [-Wswitch]
Output file is bin\Debug\Colonize2.exe with size 2.11 MB
Process terminated with status 0 (0 minute(s), 3 second(s))
0 error(s), 33 warning(s) (0 minute(s), 3 second(s))
 
5
Profile spammer reported to moderator.
6
Sorry, but can u give me the correct one for it?

Thanks.
7
Is the new problem a build issue or a run-time issue?

If build issues post a full rebuild log.
If run-time post the build log after it fails running.

Edit add link to FAQ https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Tim S.
8
Help / Re: Fresh install of codeblocks seems to have messed up paths in some projects
« Last post by Vigor on March 26, 2024, 11:22:42 pm »
OK, I think I got nightly builds figured out and downloaded.

I think it created a 2nd installation of codeblocks in my downloads folder and I had to move the other files extracted from the 7z files into that folder.

the version of the new installation of codeblocks now shows as
Name                    : Code::Blocks
Version                 : svn-r13493
SDK Version             : 2.25.0
Scintilla Version       : 3.7.5
Author                  : The Code::Blocks Team
E-mail                  : info@codeblocks.org
Website                 : https://www.codeblocks.org
OS                      : Windows 10 (build 19045), 64-bit edition
Scaling factor          : 1.000000
Detected scaling factor : 1.000000
Display PPI             : 96x96
Display count           : 1
Display 0 (\\.\DISPLAY1): XY=[0,0]; Size=[1920,1080]; Primary

wxWidgets Library (wxMSW port)
Version 3.2.4 (Unicode: wchar_t, debug level: 1),
compiled at Dec  9 2023 17:38:11

Runtime version of toolkit used is 10.0.

It loads my most recent workspace/project but running the project still has the same path issue so that none of my images or data files are loading.

When I re-downloaded the 20.03, that was not a nightly build right?   So I effectively installed one version of codeblocks on top of an identical version?

I think that is how i got the path problem.   I actually tried to reinstall twice thinking something went wrong the first time.

The bug i was originally trying to fix was not particularly important.  It was more of a nuisance I usually wasn't bothered by.   The path problem is a bigger problem.   I would be happy to uninstall codeblocks and reinstall if I thought that would fix it but I am afraid it won't.  If I did reinstall I'm afraid I might then need to reinstall opengl files or gcc files too.

I could also maybe work around this by moving my data files to the debug folder or maybe the bin folder.
9
Version          : 20.03-r11983
is 11983 the nightly build?

No, that was the last release and the link you posted was after that release; therefore, it does not have the fix you said you needed.

You need to follow the nightly build directions in link to use the Windows nightly build.

Tim S.
10
Help / Re: Fresh install of codeblocks seems to have messed up paths in some projects
« Last post by Vigor on March 26, 2024, 09:47:17 pm »
btw thank you for codeblocks and your help fixing this
Pages: [1] 2 3 4 5 6 ... 10