User forums > Help

How to setup for G++

<< < (2/4) > >>

Miguel Gimenez:
Read this http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F and post the build log.

DanW_58:
Yeah, I wouldn't know how to build from the command line;  I used to do my programming in Windows, using gui's;  I'm new to linux and the command line world.
The build log:

--- Code: ----------------- Build: Debug in DL3D (compiler: GNU GCC Compiler)---------------

Skipping file (no compiler program set): math/num_repr.cpp
gcc  -o bin/Debug/DL3D   
gcc: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---

This is how my two files appear in the cbp file:

--- Code: --- <Unit filename="DL3D.cpp">
<Option compilerVar="CXX" />
</Unit>
<Unit filename="math/num_repr.cpp">
<Option compilerVar="CXX" />
</Unit>

--- End code ---
Is that correct?

DanW_58:
Actually, I replaced "CXX" with "g++" but doesn't seem to help much...


--- Code: ----------------- Clean: Debug in DL3D (compiler: GNU GCC Compiler)---------------

Cleaned "DL3D - Debug"

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

Skipping file (no compiler program set): DL3D.cpp
Skipping file (no compiler program set): math/num_repr.cpp
gcc  -o bin/Debug/DL3D   
gcc: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
--- End code ---

gd_on:
The first thing you should do, is to find a tutorial on codeblocks and try to understand how it works.
You can also have a look on codeblocks site in the "User Manual", how to set a hello program project.

Miguel Gimenez:
Editing the CBP file is not a recommended practice, of course being XML does not help to prevent this.
You don't need the <Option compiler... stuff, just


--- Code: ---<Unit filename="DL3D.cpp" />
<Unit filename="math/num_repr.cpp" />

--- End code ---

I would delete the project, recreate it using thw wizard, add the two files and forget about it being a text file.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version