Author Topic: Compiling only - is there a bug or it is me ?  (Read 2236 times)

Offline Elena

  • Multiple posting newcomer
  • *
  • Posts: 38
Compiling only - is there a bug or it is me ?
« on: September 15, 2021, 09:04:56 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7187
    • My Best Post
Re: Compiling only - is there a bug or it is me ?
« Reply #1 on: September 15, 2021, 09:29:46 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 824
Re: Compiling only - is there a bug or it is me ?
« Reply #2 on: September 15, 2021, 10:14:52 pm »
Are you really using two backslashes after E:? This can confuse wxFileName, see for example this pull request for wxWidgets.