User forums > Using Code::Blocks
compiles fine in command prompt, but code blocks complains
killerbot:
note that in the header and cpp you don't put 100% the same : the void param, remove it from the header file. Always best to have 100% match.
Still have problems ??
darkwalk:
<Please: Create a project, add all 3 files to the project, press compile. Works fine for me>
Unfortunately, that does not work for me... I know this is the simplest code ever, and it should work. It must work. However, my installation does not compile.
These are the steps I took to verify my new installation of code blocks:
1. downloaded latest nightly build
2. downloaded wxmsw28u_gcc_cb.dll
3. deleted previous version and unzipped everything
4. made sure "toolchain executables" settings point to the correct compilers, linkers, debugger, etc...
I am using MingW btw.
<Also if you get more errors can you post the exact error message and not some reformulation of your own?>
The error message is:
undefined reference to 'print_hello()'
here is a screen shot of it not working:
http://peter-shih.com/images/sd.JPG
This is very strange.
killerbot:
could you attach your entire project (cbp file and sources)
by the way please take a screenshot of your compiler toolchain tab in compiler and debugger settings for gcc compiler
Extra remark : you main.cpp doesn't need iostream and the using namespace std ;-)
darkwalk:
<could you attach your entire project (cbp file and sources)>
http://peter-shih.com/temp/asdf2.7z
<screenshot of your compiler toolchain tab in compiler and debugger settings for gcc compiler>
http://peter-shih.com/temp/tool_chain_sd.JPG
http://peter-shih.com/temp/compiler_settings_sd.JPG
Note: nothing is in the "other options" and "#defines" tab in compiler settings.
Biplab:
--- Quote ----------------- Build: Debug in Test ---------------
mingw32-g++.exe -Wall -fexceptions -g -IC:\MinGW\include -c C:\Projects\Test\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -Wall -fexceptions -g -IC:\MinGW\include -c C:\Projects\Test\PrintStuff.cpp -o obj\Debug\PrintStuff.o
mingw32-g++.exe -LC:\MinGW\lib -o bin\Debug\Test.exe obj\Debug\main.o obj\Debug\PrintStuff.o
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version