News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Compiling only - is there a bug or it is me ?

Started by Elena, September 15, 2021, 09:04:56 PM

Previous topic - Next topic

Elena

Hi, I am trying to set up a project for compiling only without linking (with GCC, winLibs). I am using the latest Nighlty Build of CB. After some trials and errors I *think* I found that I must specify Type = Commands Only in project properties, and in fact it issues g++ with the -c option which sould indeed mean compile only without linking. I would therefore expect all my .o files created in the usual objs dir inside my project dir.
Not instead. If my cb  project is say E://myprojects/NewProject/NewProject.cbp the .o files are placed in E:// directly !!!
Is it a bug which I should report or I did something wrong ?
If you can reply soon I would be grateful. Thx.

stahta01

It sounds like you did something very wrong or you are not using an Code::Blocks project.

If using an Code::Blocks project, all you need to do is:
Right click on file, select option, un-check "link file".

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Miguel Gimenez

Are you really using two backslashes after E:? This can confuse wxFileName, see for example this pull request for wxWidgets.