User forums > Using Code::Blocks

Using code::blocks w/o a project

<< < (9/12) > >>

dukester:
Thx for the URLs! I've got the 2nd one DLed already. I'll read the C::B users manual for sure. BTW, I still can't get C::B to compile a standalone .c file. It appears that it's not sending the linker the correct info on my system. It worked on your VM - so go figure, right? Whatever - I'll just use the project way! Thx again!

stahta01:

--- Quote from: dukester on January 29, 2024, 04:20:49 am ---Thx for the URLs! I've got the 2nd one DLed already. I'll read the C::B users manual for sure. BTW, I still can't get C::B to compile a standalone .c file. It appears that it's not sending the linker the correct info on my system. It worked on your VM - so go figure, right? Whatever - I'll just use the project way! Thx again!

--- End quote ---

IIRC, the global compiler settings needs the correct compiler to be set as default.
Edit: And, I have no idea if single file option links correctly on Windows; I never tried it.

Tim S.

Pecan:

--- Quote from: stahta01 on January 29, 2024, 04:38:05 am ---
--- Quote from: dukester on January 29, 2024, 04:20:49 am ---Thx for the URLs! I've got the 2nd one DLed already. I'll read the C::B users manual for sure. BTW, I still can't get C::B to compile a standalone .c file. It appears that it's not sending the linker the correct info on my system. It worked on your VM - so go figure, right? Whatever - I'll just use the project way! Thx again!

--- End quote ---

IIRC, the global compiler settings needs the correct compiler to be set as default.
Edit: And, I have no idea if single file option links correctly on Windows; I never tried it.

Tim S.

--- End quote ---

I was able to compile, link and run a single source file with CB 20 and the Nightly (no project) on both Windows and Linux (Mint 21.x).
But others cannot.
I don't see why. Must be above my pay grade.

dukester:
My global compiler setting must be set correctly because it finally compiled the code under the project structure. However, for some reason it refused to crank out an obj file for the linker. Can't be a permissions issue, otherwise it would choke also when building as a project.

stahta01:

--- Quote from: dukester on January 29, 2024, 04:46:36 am ---My global compiler setting must be set correctly because it finally compiled the code under the project structure. However, for some reason it refused to crank out an obj file for the linker. Can't be a permissions issue, otherwise it would choke also when building as a project.

--- End quote ---

When *not* using a project, the single file operations needs to use an Compiler, it either uses "GCC" or the "DEFAULT" Compiler. The global compiler options is where the default compiler is set. There has been many of weird problem traced to the CB user having an different global Compiler than the person trying to help them. I do not think this is your problem; but, it has surprised me how many people over look the set as default option for hours while some tries to help them!

Tim S.
 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version