News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Linking a header worked until modified

Started by skr, November 23, 2013, 10:39:15 PM

Previous topic - Next topic

skr

I am attempting to link a simple header file to my main and cpp programs. I transported the project from another machine and was working after I linked the project through build options. HOWEVER when I added another variable and function to the header, the cpp file does not recognize this addition. I rebulit--no luck. I removed the include and readded--no luck.

Obviously, I am making some error in linking. Suggestions?

stahta01

Turn on Full Compile Logging post a full re-build log in this thread and find a basic C programming site that helps newbies learn to program.
This site is NOT to teach programming. http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Learn the difference between linking and Compiling!

Read the CB FAQs http://wiki.codeblocks.org/index.php?title=FAQ

Read the CB Rules http://forums.next.codeblocks.org/index.php/topic,9996.0.html

Make sure you created a CB Project and added the header file you created to the project.
Make sure you do a re-build instead of a build when you have issues like you posted!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

skr

Thanks for your standard response--seen it BEFORE I posted. I have read, and I have rebuilt and I obviously have a header file if it worked BEFORE I modified it. My issue, I fear is not one with programming--done this same link-compile-dance in many different forms in many different environments. The issue I have is CodeBlocks and how IT links and builds. Sorry to have troubled you.

BlueHazzard

#3
Quote from: skr on November 24, 2013, 12:12:55 AM
Thanks for your standard response--seen it BEFORE I posted. I have read, and I have rebuilt and I obviously have a header file if it worked BEFORE I modified it. My issue, I fear is not one with programming--done this same link-compile-dance in many different forms in many different environments. The issue I have is CodeBlocks and how IT links and builds. Sorry to have troubled you.
obviously you can't read:
Quote from: stahta01 on November 23, 2013, 11:13:36 PM
Turn on Full Compile Logging post a full re-build log in this thread and find a basic C programming site that helps newbies learn to program.
also here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

you should also consider to refresh your programming skills, because i don't think you can link a .h file...

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

#5
Quote from: skr on November 24, 2013, 12:12:55 AM
Thanks for your standard response--seen it BEFORE I posted. I have read, and I have rebuilt and I obviously have a header file if it worked BEFORE I modified it. My issue, I fear is not one with programming--done this same link-compile-dance in many different forms in many different environments. The issue I have is CodeBlocks and how IT links and builds. Sorry to have troubled you.

So if you positive you DID everything right; then it must be working!

So goodbye.

FYI: I do ask for a full re-build log almost every time a newbie posts because normally they did something simple wrong that looking at a full build log shows; Why Why Why did you NOT post a full rebuild log in the first post??

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]