|
Hi,
I had the same link error.
I feel the problem is inclusion of your header files(#include "Libr.h") in side the Doc.h.
Try to include the header files inside the .cpp files, not inside the .h files.
If you want exactly inside the .h file, then include inside of #define.
otherwise system will produce runtime error because of multiple inclution.
in your case you included "#include "Libr.h" inside your doc.h and doc.h is included inside view.h and etc.. try to avoid this and "#include "Libr.h" should be inside your doc.cpp
Dont include .cpp file. .h file will take care everythings of .cpp
best of luck,,
regards
Vallikumar A
|
|
|
|
|
Sorry, but I prefere the simple use of #include .
I have good news:
In libr.h/.cpp there was a lot of inline functions,
well... I modify the files cutting that word and now everything is running.
But I want to use inline: I need it!!
So, do you know if it is possible that the linker doesn't like the keyword inline or if the use of 'inline' could give this error??
Thaks
Have a nice code day
|
|
|
|
|
_Russell_ wrote: Sorry, but I prefere the simple use of #include.
linking the library to your project is also a simple way of doing.
-Prakash
|
|
|
|
|
btw, is the doc-view app a MFC project?
-Prakash
|
|
|
|
|
Yes
Have a nice code day
|
|
|
|
|
Add the .cpp file to the project and #include the .h file whereever you need.
It should compile and link properly.
-Prakash
|
|
|
|
|
Iam a beginer in testing and i need help in writing unit test cases. I have a Software specification document, use cases , my problem is how can i write unit test cases?
bigbluff
|
|
|
|
|
what software do you write your tests with ?
to get started, you have to consider for each part tested (in general, functions one by one) the purpose of it. then you initializes the context of which the function is called, the you know exactly what it is supposed to do, so, what would be either the result and the context left.
you must test this...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
Before start writing the test cases, you should know your software well. You should proficient and Should have step by step knowledge of your project. what are the previous step, next step, input and output etc.
try to go through some existing test cases of your project. I think this will helps you..
best of luck.
regards
Vallikumar A
|
|
|
|
|
I would like to do a Dependency/sequential build on the files in .NET.
For example, I have 2 files x.c and y.c.
Compiling and Linking of x.c needs y.z( the output of y.c).
But since .NET builds in alphabetical order, I cannot aceheve this.
I have seen similar behaviour in VC++ 6.0 as well.
Is there a way to do this?
kvprasad
your future is what you think
|
|
|
|
|
I use MSVC6 - Select "Project->Dependencies...". I'm sure VS.NET has a similar option.
Steve
|
|
|
|
|
I have a dialog with about 5 CEdit fields,
CEdit1, CEdit2,..... CEdit5.
Currently, when I clicked the TAB key,
the cursor will jump from CEdit1 to
CEdit3 instead of CEdit2.
Can someone tell how to fix it?
Thanks,
Kevin
|
|
|
|
|
|
open dialog in resouce editor for which you want to change tab order. Then in the menu you will see format, there is taborder option in it, click it and you will be able to change tab order by clicking controls in the order we you them to be selected when pressing tab.
-Saurabh
|
|
|
|
|
Great! I fixed it.
Thanks for your help!
Kevin
|
|
|
|
|
|
I've seen in many source codes, some statements written in #if 0 block something like:
#if 0
printf("Blah Blah");
#endif
Please tell me what is the meaning of #if 0 in the code above.
|
|
|
|
|
Imtiaz Murtaza wrote: I've seen in many source codes, some statements written in #if 0 block something like:
#if 0
printf("Blah Blah");
#endif
Please tell me what is the meaning of #if 0 in the code above
it simply means the code in side the block is ignore for compilation and will not appear in the final build.
it is similar to saying
#if !defined(SOME_BUILD_FLAG) or<br />
#if FALSE<br />
<br />
#endif
since the dev wanted the code to be explicitly removed from compilation he used
#if 0<br />
#endif
directive
-Prakash
|
|
|
|
|
Mr.Prakash wrote:
it simply means the code in side the block is ignore for compilation and will not appear in the final build.
Then what is the purpose of the code inside that block ?
For example, if the code is written in #ifdef DEBUG block, it is skipped in the release builds but its purpose is clear and that is: it will be compiled in debug builds. So what is the purpose of writing code in #if 0 when i'll never be present in the executable.
|
|
|
|
|
There are many reasons to use
#if 0
Actually, I do it all the time.
Here is my reason.
Let say I re-write some code/method/function
and I think it should work.
But I would like to keep the old code
around. Just in case......
I know I can retrieve the old code
from the source control. However, it's
more convinence if I have the old
code right next to the new code.
Kevin
|
|
|
|
|
I hate #if 0 . It's not so bad if the code commented out is small, but when large pieces of code are bracketed with these you can find yourself analyzing code only to find, when you get to the top, that you've been wasting your time and the code isn't even part of the product. This has happened to me many times. If the programmer simply commented it out the syntax highlighting will stop such problems from ever occurring.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I hate #if 0
me too.
i use this purpose instead...
#ifdef DEBUG
#define DPRINT printf
#else
void DPRINT(...) {}
#endif
this way, in debug mode, we could DPRINT() something, which will not been took in account in release mode (and more, the compiler will optimize a call to DPRINT() in release).
for instance :
int Foo() {
DPRINT("Foo()\n");
int i = 654;
DPRINT("Foo output : %d\n", i);
return i;
}
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
you can #if 0 the code which needs to be ignored in both debug and release build, i.e. older logic to solve a problem, etc.
-Prakash
|
|
|
|
|
Yes steve u r definetly correct. But this is not supposed to be used to large chunks of code. it is more of an debugging approach than just saving old code.
Tip: Always it is a good option to try to put a breakpoint to know if this code is compiled or not. a breakpoint cannot be inserted in any code that is not compiled.
Hope this helps.
kvprasad
your future is what you think
|
|
|
|
|
Stephen Hewitt wrote: If the programmer simply commented it out...
But nested comments are not allowed. That's where #if 0 is of use.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|