User forums > Help

Code::Blocks doesn't seem to find .cpp files corresponding to .h files

(1/3) > >>

Hi everyone,

I have a minor problem with Code::Blocks. I want to include a library (pure code, no .lib or dlls), but Code::Blocks gives me Linker errors of unresolved external symbols. When I just copy all the code from the .cpp files in the .h files, everything works fine, so I guess Code::Blocks has a problem finding the .cpp files that correspond to the .h files, even though the names are the same, so test.cpp would correspond to test.h.

Any idea what I missed or what I have to do to make Code::Blocks find the .cpp files?

Best regards

Read this please:

Also read the other entries in the FAQ section of the wiki.

Thanks for the fast answer. Of course I did this before I was asking the question. None of those entries is related to my problem. I added all relevant paths, otherwise the library would not work when I copy the contents of the .cpp files in the .h files, because without the propper path in the compiler search directories, Code::Blocks does not find the header files at all. My question is rather like "How can I tell Code::Blocks that the functions corresponding to the prototypes in xyz.h are written in xyz.cpp, because it does not seem to figure that out by itself".

Have you added all cpp files to the project?

If you have read and understood this faq entry: you would have fixed you problem.

Of course I did not add the .cpp files of the library I want to use to my project....this would kind of defeat the whole purpose of a simple include of the header files.

And regarding your latter comment...look, if you have some kind of problem with people who have few posts or ask for help for the first time, let me give you a tip....nobody forces you to answer us ;)
Besides, I do understand the entry as well as the compiler output generated by my project, however I can't come up with an answer to my original question....if I could (by reading some FAQs or something else) I wouldn't be asking, because, frankly, I really dislike posting in forums....maybe because instead of getting an answer, one is just treated like an people who probably doesn't have a clue either  ;D


[0] Message Index

[#] Next page

Go to full version