|
What's the exact error message ?
|
|
|
|
|
Since it´s a German installation it´s:
Generieren von Code...
Linker-Vorgang läuft...
Testprogramm.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: int __thiscall CArray::getFw(void)" (?getFw@CArray@@QAEHXZ)
Debug/Testprogramm.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
Browse-Informationsdatei wird erstellt...
Testprogramm.exe - 2 Fehler, 0 Warnung(en)
|
|
|
|
|
Did you include the .cpp file of your CArray in the project ?
If yes, do you have the same error if you remove the inline keyword ?
|
|
|
|
|
Hi Cedric
the .cpp file is included and no, if I remove the inline keyword it works fine.
my main application is called "testprogram" and it´s .cpp file contains
#include <stdafx.h>
#include <conio.h>
#include <string.h>
#include <malloc.h>
#include <windows.h>
#include <wincon.h>
#include <assert.h>
#ifndef _ARRAY
#include "Array.h"
#endif
where array.h is the header file from CArray.cpp
|
|
|
|
|
I found the Problem:
MS Visual C needs inline methods to be defined in the .h file rather than in the .cpp file. I moved the inline method from .cpp to .h and now it works fine.
Odd
This tells the MSDN
Function Inlining
Mixing inline and non-inline compile options on different modules can cause problems. Consider the following example that has:
A library Test.lib with inline functions.
A header file containing the function prototypes for the library (Test.h).
An application App.exe, which is linking with Test.lib using the Test.h header file.
If Test.lib is created with function inlining turned on (/Ob1 or /Ob2), you will get an unresolved external error on any inline functions from Test.lib that are used in App.exe. The function's address is not in the PST for Test.lib because the functions were inlined inside the library. You need to either disable inlining (/Ob0) when building the library or place the inline function code in the header file (Test.h).
Similarly, a project that uses function inlining yet defines the functions in a source file rather than in the header file will also get this error. The header file is included everywhere deemed appropriate, but the functions are only inlined in the source file where they are defined. Therefore, the linker sees the functions as unresolved externals when used in other modules. For example:
-- modified at 7:06 Friday 20th January, 2006
|
|
|
|
|
Kamann wrote: Since it´s a German installation
since everyone here speak english, couldn't you traduce it ?
(ok, it is a LNK2001, so MSDN tells it is an Unresolved external symbol , but please be compliant too...)
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
|
|
Hi Michael,
is this just Microsoft specific or in general ? Do other Compilers require the same ?
-- modified at 16:29 Saturday 21st January, 2006
|
|
|
|
|
|
how to deselect all the previous selected item in listctrl .
Bankey Khandelwal
Software Engineer
Solversa TechnologiesPvt.Ltd.
15,Yeshwant Nagar
Range Hill Road
Ganeshkhind,Pune-03
bankey.khandelwal@solversa.com
Mobile: +91-9850432990
Office : +91-20-25521888
|
|
|
|
|
|
|
|
I have a unicode app with a CEdit where I can display as well as paste japanese characters.
The problem is that the IME does not show Japanese as an option and, therefore, I cannot type japanese characters directly. How does one go about enabling an app to use IME?
I should say that my IME does have Japanese and it works fine with IE or Word.
Thank you all.
|
|
|
|
|
I am working with conversions, I am getting a integer value i want to convert to hexa decimal value.
|
|
|
|
|
Hum I think this is a very strange question because you don't have decimal values or hexadecimal values. The thing that is decimal or hexadecimal is the REPRESENTATION of the number (in a string or something like that). Your number is still stored the same in memory.
So now, what do you want to do exactly ? You have a string representing a number in hexadecimal and you want to convert that string into a string representing the number in decimal ? Or you have a number and you want to convert it into an hexadecimal string ? If yes, then use strtol (as pointed in one of the previous tread)
|
|
|
|
|
Hello Cedric Moonen,
Yes your point is definatly right.
& if so then you can do the thing by just taking CString Object & use mehod Format.
which work same as printf funcion.
|
|
|
|
|
|
I'd use STL like this:
cout << hex << 100;<br />
Or if you want it in a string:
stringstream ss;<br />
ss << hex << 100;<br />
string s = ss.c_str();<br />
Steve
|
|
|
|
|
Is their any function which do the same in C++ just as Convert.ToInt32(string*,int base) does.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
|
I don't know Convert.ToInt32(string*,int base) but I suppose it converts a string into an integer. Maybe you are looking for the atoi[^] function ?
|
|
|
|
|
atoi only converts into integer of base 10 as far I know.I want it to convert to any base like 16(hexa) etc.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Ok sorry. strtol[^] then, as pointed in the FAQ by Michael
|
|
|
|