Board index » cppbuilder » Weird IDE/Linker behaviour

Weird IDE/Linker behaviour

(C++Builder 5.3/QuickReport example project from C++Builder5 User Guide)
Compiled a project and Build it : success.
Removed a .cpp file from it and added it again:

[Linker Error] Unresolved external '_QuickReportViewer' referenced from E:\BORLAND\CBUILDER5\PROJECTS\HF_PLANNING\HF_PLANNING.OBJ

The file originally was in a directory different from all other
project files.
Copying the file to the project directory also gave this error.

The only way I could cure this was:

taking the original project.bpr file and change it with NotePad
to read the "local" version.

Then and only then Linking produced a success.....

But any inclusion of the ReportViewer.cpp file in question into
another project fails with this error.

What is going wrong here?


Re:Weird IDE/Linker behaviour

after a lot of trial and error I found what caused the problem:
ADDING a file agian to a project makes the IDE to create a
line in the MAIN cpp file so as to create the Form associated with the .cpp file if there is any.....
removing this extra line in the main cpp file cured the problem...
sorry to have puzzled anybody with this simple thing!

Other Threads