|
Hi Steve,
Steve S wrote:
You probably need to tell gcc (via the command line) to search and link with a particular library file. Someone who knows what library file will probably be along soon.
This is a link-time, rather than a compile-time error. Sorry I can't be more help.
Yes that seams to be the case...
I've tried some (obvious) libraries but no luck
Thanks,
Theofilactos Botaniaths
|
|
|
|
|
Theofilactos Botaniaths wrote:
But trying "gcc test.cpp" fails miserably, because it cannot find some symbols
Try g++ test.cpp instead.
|
|
|
|
|
Hi Nemanja,
Nemanja Trifunovic wrote:
Try g++ test.cpp instead.
Yes it works!
Thanks so much!
Theofilactos Botaniaths
|
|
|
|
|
g++ is basically an alias for gcc --some-magic-c++-library-inclusions
--
Unser Tanz ist so wild! Ein neuer böser Tanz.
Alle gegen Alle!
|
|
|
|
|
Hi Jörgen,
Jörgen Sigvardsson wrote:
g++ is basically an alias for gcc --some-magic-c++-library-inclusions
Well, I was wondering about that as well, but I was too shy to ask...
This seems to be a great list.
Thanks!
Best Regards
Theofilactos Botaniaths
|
|
|
|
|
Hello everyone:
I have a WTL project for GUI and some MFC dlls.
Now there is a problem. In the interface of MFC dlls there are some "CString" data type, If not change these "CString" data types, can I transfer some strings from WTL project to MFS dlls? Is there other ways to relealize it?
Thank you.
-Freehawk
|
|
|
|
|
|
Thank you for the fast reply.
In my WTL project,
CString a = "1234"; // a is WTL string
// call mfc dll function
SendDataToMFCDll(a);
In my MFC dll
void SendDataToMFCDll(CString a)
{
// a is MFC string
...
}
is it right?
-Freehawk
|
|
|
|
|
|
Thank you.
What you said is as the following?
In my WTL project,
CString a = "1234"; // a is WTL string
// call mfc dll function
SendDataToMFCDll((LPCTSTR)a);
In my MFC dll
void SendDataToMFCDll(CString a)
{
// a is MFC string
...
}
-Freehawk
|
|
|
|
|
Please help me I lost my night sleep. Tell in simple code.
From my VB client I am passing simple string "Siddharth", to a win32 dll function GetUserName(DATATYPE)(if DAtatype is BSTR or wstring tell me how to convert it into string in dll function declaration). My program should run in 98 as well as NT. I am trying lot of examples but they all are for long. When I convert it to string nothing works out.
VB client
Dim x as string
x = "String"
GetStringFromVb(wstring *)
end
Win32
GetStringFromVb(wstring*)
{
vector<string> MyString;
MyString.push_back(wstring);
{
//..Lot of string manipulation
}
}
One more issue. in the win32 DLL.h if I declare stl parameter, it is not accepted by the compiler.
|
|
|
|
|
hi sidharth,
when u r passing string in vc++ they are accepted in BSTR format. so u have to first change into CString and then to char* to use it as a string.
function used to perform this is
#include<cstring.h>
CString CString_str = _T("");
if (BSTR_str != NULL) // To be sure that input string is valid...
{
CString s;
LPSTR p = s.GetBuffer(::SysStringLen(BSTR_str) + 1);
BOOL UsedDefaultChar;
::WideCharToMultiByte(CP_ACP, 0, BSTR_str, -1,
p, ::SysStringLen(BSTR_str)+1,
NULL, &UsedDefaultChar);
if (UsedDefaultChar)
// BSTR_str contains an ANSI string
CString_str = (LPCTSTR)BSTR_str;
else
// BSTR_str contains an UNICODE string
CString_str = (LPCWSTR)BSTR_str;
}
char *temp = LPSTR(CString_str);
further if u have to include MFC support at the time of creating new ATL project
I hope it will help u.
Ritu
|
|
|
|
|
Thanx a lot buddy. That was a breather. I will try and get back.But I am not using MFC. and if I include <iostream> it will create conflict. Any way let me try first.
|
|
|
|
|
Can i serialize an object with WTL like doing with MFC
vi
|
|
|
|
|
|
"the value of ESP was not properly saved across a function call." i got this error dialog while compiling a MFC client. the MFC client is empty except for a ATL control added to the UI. the ATL control is empty too. Just as it was 1st created by the wizard.
any idea what's wrong?
|
|
|
|
|
|
apparently the problem is with the compiling computer. it works fine in other computers. i tried installing MS SDK, VC++ SP5, clearing up the registry... and nothing works.. haha.. will be installing a new copy of VC++ today.. thanks for all the help guys. BUnch of great ppl we have here!!!
|
|
|
|
|
Hello everyone.
I am a beginner of WTL and STL.
Could you tell me whether STL can be used in a WTL project?
and I need to read data from file line by line,
is there a way to do it like "CStdioFile" of MFC?
Thank you.
-Freehawk
|
|
|
|
|
Hello,
Usel low level or stdio.h in WTL/ATL for e.g
fopen(....);
fwrite(...);
fread(...);
regards
balkrishna talele
|
|
|
|
|
Thank you for the fast reply.
is there way to read file line by line?
-Freehawk
|
|
|
|
|
Hey come on...
if you use
char *readme;
while(!feof(fp))
{
fscanf(fp,"%s",readme);
}
u will get line by line..
cheers
Balkrishna Talele
|
|
|
|
|
Thank you very much.
I will try it.
-Freehawk.
|
|
|
|
|
No you will not. You will get "token by token". Try fgets instead.
--
So let's just walk from place to place, as long as we don't talk face to face.
|
|
|
|
|