Recent Posts

Pages: 1 [2] 3 4 5 6 7 ... 10
Using Code::Blocks / Support for Microsoft Visual Studio 2017 Community
« Last post by advertless on March 19, 2023, 11:06:17 pm »
Does Code::Blocks support  Microsoft Visual Studio 2017 Community?   

I will now describe what I have tried and what did and did not work.   In Code::Blocks  IDE I go Settings >> Compiler... >> Global Compiler Settings >> Selected Compiler.  In that dropdown I see,

  • Microsoft Visual C++ Toolkit 2003
  • Microsoft Visual C++ 2005/2008
  • Microsoft Visual C++ 2010

I would be more than happy to install one of these on my computer, but I have tried all 3 and none are possible.  Describing each item at a time,

Microsoft Visual C++ Toolkit 2003  , does not exist anymore.

Microsoft Visual C++ 2005/2008 , does not exist anymore.   

Microsoft Visual C++ 2010 appears to exist at the following page, but this is deception.  The redistributable found  there is really only a 5MB security fix.

(see  "Other Tools, Frameworks, and Redistributables"  )

2015 Express

The final "Express" edition that Microsoft released was the 2015 Express.   Afterwards, they renamed these to "Community Edition".   After browsing and reading this forum for several hours, I noticed some threads suggesting that 2015 Express can interop with Code::Blocks.  I then attempted to install it on my computer. This was flatly refused,  an error message was displayed and I closed it, shown here :

Setup Failed. 
0x80070666 - Another version of this product is already installed.
Installations of this version cannot continue. To configure or remove
the existing versions of this product, use Add/Remove Programs
on the Control Panel.

The reason this failed on my computer is because I have already installed  Visual C++ 2017 Community.  I require this to be on my computer in order to operate a GPU through Pytorch, a library related to python.  So I will not be removing it.

So now that Microsoft disallowed 2015 Community to be installed "alongside"  2017 Community,  my question is thus :  Does Code::Blocks support  Microsoft Visual Studio 2017 Community?   

If it does,  can you provide a  guide/tutorial for how to point the IDE to the relevant cl.exe    ,  linkers, and other resource compilers that it requires for targeting WINAPI application development?   

Help / Re: New to //(* ... //*)
« Last post by BlueHazzard on March 19, 2023, 08:34:11 pm »
What are the errors you are getting from compiling?
Help / Re: Compiler issues
« Last post by BlueHazzard on March 19, 2023, 08:33:01 pm »
Also make sure that you have write permission for the folder your project is into and also check if your anti virus program is disabled for the project folder and/or codeblocks executable.

gcc.exe  -o bin\Debug\Project.exe obj\Debug\main.o   
this path looks quite sus
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by AnkM on March 19, 2023, 06:34:48 pm »
Dear Newcomers,
please make a "I am new, I am here" post by replying to this thread so we know you are a human being.
This will make is easier for us to differ valuable members from SPAM bots whose number is growing, unfortunately.
The Code::Blocks team.
I am new, I am here
Help / Re: Project options ignored, default compiler options used instead
« Last post by gd_on on March 19, 2023, 10:25:53 am »
I have the feeling that your problem does not come from a bug in C::B but from a bad configuration or misundertstanding.
I verified thay on a simple hello program, it worked as it should.
You can set compiler options at 3 different places:
1) in the menu Settings/compiler
2) at the project level
3) at the target level
In 1), you set default options for your differents compilers. It's only there that you can configure their paths. Personaly, I don't set any options there, but you can. It's your choice. Options set here are always applied. It's not a bug, but set by design as suggested stahta01.
For 2) and 3) you can set them via a right click on your project name. In your case you have 2 targets (or sub-projects), Debug and Release.
Example for a simple hello program:
When you click on Hello, you have access to the project options. They are applied or not, depending on "policy" choice.
When you click on Debug or Release, you have access to the targets options.  They are applied or not, depending on "policy" choice.

If you want to use compile options -m32 and -g, you can set -m32 in the project options, but, normally, -g is only for the Debug target. Putting -g in project options is not useful, may be a nonsense, because in that case there are no differences between Release and Debug targets, so no reasons to distinguish them.
You can also set only target options:
   -m32 -g for the Debug target
   only -m32 for the release target
   the global project option is empty in that case.

You can choose in the policy tab how to use your settings. There are 4 choices:
- Use project options only. To my advice, this is not a very useful option (exept for testing or if you have only 1 target), because there are no differences between targets;
- Use target options only;
- Prepend target options to project options;
- Append target options to project options.

Apparently, you have used the first one. So, if it's empty (as I suppose, but I'm not on your PC), it's normal than you see only default options.
You can use the second one, or better the 3rd or 4th one. Difference between both, is the order of the options and how the compiler use them. In some cases, the result may be different, especially if options affect the same kind (for example optimisations -O, -O2, ... or the search libraries options -L if you have more than 1 search path).

Probably, your bug report on ticket 600 is not right and could be deleted. As I said at the top, I can't reproduce it. For me, it works as expected.

Help / Re: Project options ignored, default compiler options used instead
« Last post by stahta01 on March 18, 2023, 09:28:33 pm »
Your problem is not the same as the issue 600, in that one the person wanted the Global Compiler setting to be ignored!

Edit: You do understand the the word "general" does not mean "global" to most people; if you wish the Global Setting to not be used then you are likely out of luck. I suggest trying "use target only" setting and the other options to see if one does what you want.

Ignoring the Global Compiler settings is stupid in my opinion; so, I can understand why it was never changed to that way.

Tim S.
Help / Re: Compiler issues
« Last post by stahta01 on March 18, 2023, 06:22:28 pm »
Then other than making sure to have no spaces or non ASCII characters in the project path I have nothing to suggest other that upgrading to a CB Nightly build.

Tim S.
Help / Re: New to //(* ... //*)
« Last post by gd_on on March 18, 2023, 12:02:30 pm »
For a C++ compiler, lines beginning by // are comments (only this line). But the other lines are not comments. This is different for the bloc of lines between /* and */ which are normal C comments.
C::B mark the other lines in grey and italic, but this is just to tell you that they are lines created by wxSmith, which must be compiled.
Help / Project options ignored, default compiler options used instead
« Last post by giocc on March 18, 2023, 11:31:02 am »
A very simple test program  (main.cpp plus a testClass.cpp and .h) has some compiler options set (e.g. -g and -m32)
in [project]/Properties/Project's build options.../Compiler settings (for both Debug/Release targets);
option "Policy" is "Use project options only" (for both compiler and linker).

However, when compiling, these settings are ignored and the general compiler settings are used regardless:
-------------- Build: Debug in testAssign-MinGW32 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe   -c D:\CTest\testAssign\src\main.cpp -o build\obj\Debug\src\main.o
mingw32-g++.exe   -c D:\CTest\testAssign\src\TermID.cpp -o build\obj\Debug\src\TermID.o
mingw32-g++.exe  -o build\bin\Debug\testAssign.exe build\obj\Debug\src\main.o build\obj\Debug\src\TermID.o   
Output file is build\bin\Debug\testAssign.exe with size 47.12 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

As per the compile log, the compiler matches the setting in Settings/Compiler.../Selected compiler and compilation succeeds; changing compilation options there also works.

How can I set project-specific option overrides?

There is a ticket, #600 ( open basically for this same issue (since 2018!), but it seems to have gone stale. I also updated it with this same report.
Is it possible that nobody noticed this blatant issue since?
Help / Re: Compiler issues
« Last post by ConradBuff1 on March 18, 2023, 01:53:11 am »
Both 'compile file' and 'link file' were already checked when producing the build log.
Pages: 1 [2] 3 4 5 6 7 ... 10