User forums > Using Code::Blocks

Traditional 'C'

(1/5) > >>

KenWhight:
I am having to migrate from "Microsoft Visual C++ 2008" due to Windows 11 incompatibility. I have legacy software and only write text driven console programs in traditional 'C' (I thought ANSI 'C' was a bad move!).
When I try to compile these programs using CodeBlocks I get a whole load of errors that I do not understand (my programming skill are firmly stuck in the 1980's) is there a 'C' compiler or settings within the GNU 'default' compiler that will make my problem go away?

stahta01:
If you post the first 3 errors; I am willing to try to figure out how to fix some of them.
Please post the GCC version info.

Please read https://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Most important part from above link

--- Quote ---Look at the "Build Log" NOT the "Build Message" tab
--- End quote ---

KenWhight:
Hello, Thanks for your offer of help, I have made progress since I made the post. Most errors were caused by my use of an ancient way of declaring a function. When I replaced for example:-

double myfunction(par1, par2)
char par1;
double par2;

by:-

double myfunction(char par1, double par2);

most of my problems went away except for one. As you can see from the attached screenshot all the functions defined in linalg.c are not recognised in profile.c and I don't know why. it all worked in visual c++.
Regards
Ken

stahta01:
Code::Blocks and GCC neither one has the linking magic that MSVC does.
You need to link to the libraries needed or add the missing source files.

Please read the FAQs

Tim S.

stahta01:
Make sure "linalg.c" is part of the CB Project.

Please read and follow https://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Navigation

[0] Message Index

[#] Next page

Go to full version