|
Then you should either add the lib to the makefile or enter it into the link-lib-dialog of whatever IDE you are using.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
That is exactly the part I'm confused about.
How would I go about linking the file using the command line g++?
|
|
|
|
|
You really call your g++ by command line?
Normally, you use a makefile for anything more complex than "Hello world".
The g++-command line switch for "linklib" is "-l ", i think. but better look it up in the help/man-file, by calling "g++ -? ".
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
It is "-l".
Now tell me if I'm doing it right:
g++ test.cpp -l libws2_32.a -o test
The above line causes the folowing error:
"Cannot find -llibws2_32"
The libws2_32.a file is in the same directory as the test.cpp
|
|
|
|
|
You really should read a decent tutorial about using a makefile!
E.g. http://www.cs.umd.edu/class/spring2002/cmsc214/Tutorial/makefile.html[^]
But running
g++ -c test.cpp<br />
g++ test.o -l libws2_32.a -o test.exe
should work.
Maybe -L adds a directory to seach for libraries? ..;. would be ok to add here.
Sorry, I can't help you more than google can. I am not a g++-specialist and have no g++ here.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Ok, thanks for your help m8.
Though it still says "cannnot find -llibws2_32.a".
Anyone else? This really stumped me.
|
|
|
|
|
Hi All,
My goal is to remove all references to product A from product B executable. When searching for A product name in B product executable I've found the following constructs
ЂР[ .?AV?$Composite@I@@
or in hex
80 D0 5B 00 00 00 00 00 2E 3F 41 56 3F 24 43 6F
6D 70 6F 73 69 74 65 40 49 40 40
in PE executable's .data section. Looks like all the class names from source code are mentioned there. I'm reusing source code from product A so its name heavily mentioned in these "symbols". Note, that I'm looking at release build, with no debug info.
Could someone please suggest what those constructs are and how to avoid them?
WBR O.Z.
|
|
|
|
|
why ?
Are you afraid someone might look at your product B and find that you did nothing but use product A ?
If you bought library A and use in your product B and try to hide that, people who worked on A might be a little pissed off. no ?
|
|
|
|
|
Don't worry both A and B belong to us and no pissed off people around, for now at least . This is just a matter of business decisions. Of course I can use executable compression for obfuscation purposes but I would like to find out what the problem actually is anyway.
|
|
|
|
|
Do you have RTTI enabled ? Do you need to have it enabled ?
|
|
|
|
|
I have some applications(I don't have control on those applications) that need to be update with information that i store in the Environment variables.
And in run-time i update those Environment variables and i need to "say" those applications that the Environment variables are updated.
I try to use this way
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM) _T("Environment"), SMTO_ABORTIFHUNG, 10, &dwRetVal);
But with no success.
Someone can help me ?
Thanks.
|
|
|
|
|
Yanshof wrote: And in run-time i update those Environment variables...
How are you doing this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
what do you mean ?
How do i do what ?
I just sending the message after update the variable through the registry.
|
|
|
|
|
Yanshof wrote: what do you mean ?
How do i do what ?
I was inquiring about your "i update those Environment variables" comment.
Yanshof wrote: ...update the variable through the registry.
This answers my question.
Why is SendMessageTimeout() not working for you?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
My project have a list control and have to add a lot of data to it(more than 1000 item) I use these code for add each item.
void CGraphFrom::AddDataList(CListCtrl *m_list, int row,<br />
CString col0, CString col1, CString col2, <br />
CString col3, CString col4, CString col5)<br />
{<br />
<br />
LVITEM lvi;<br />
lvi.mask = LVIF_TEXT;lvi.iItem=row;<br />
lvi.iSubItem = 0;lvi.pszText = (char*)(LPCTSTR)col0;<br />
m_list->InsertItem(&lvi);<br />
<br />
lvi.iSubItem = 1;lvi.pszText = (char*)(LPCTSTR)col1;<br />
m_list->SetItem(&lvi);<br />
<br />
lvi.iSubItem = 2;lvi.pszText = (char*)(LPCTSTR)col2;<br />
m_list->SetItem(&lvi);<br />
<br />
lvi.iSubItem = 3;lvi.pszText = (char*)(LPCTSTR)col3;<br />
m_list->SetItem(&lvi);<br />
<br />
lvi.iSubItem = 4;lvi.pszText = (char*)(LPCTSTR)col4;<br />
m_list->SetItem(&lvi);<br />
<br />
lvi.iSubItem = 5;lvi.pszText = (char*)(LPCTSTR)col5;<br />
m_list->SetItem(&lvi);<br />
<br />
}<br />
my problem is that
while program is adding the item my program look like hang up,
because the list control is updated every time when it add item.
How can I do if I want to update it only one time when it finish adding item.
|
|
|
|
|
This does not solve your "hang up" problem, but depending on how the control is sorting the items, there is the potential for the SetItem() calls to not match the InsertItem() call. Try this instead:
void CGraphFrom::AddDataList(CListCtrl *m_list, int row,
CString col0, CString col1, CString col2,
CString col3, CString col4, CString col5)
{
int nItem = m_list->InsertItem(row, col0);
m_list->SetItemText(nItem, 1, col1);
m_list->SetItemText(nItem, 2, col2);
m_list->SetItemText(nItem, 3, col3);
m_list->SetItemText(nItem, 4, col4);
m_list->SetItemText(nItem, 5, col5);
} Adding 1,000 items is trivial, but if it is causing the UI to become unresponsive, your only recourse is to do the updating in a secondary thread.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I had similar issue with editing in edit control.
It went away by using ShowWindow(SW_HIDE) before and ShowWindow(SW_SHOW) after the edit/ search / update.
Try that, it may help, but I feel that the "insert" item is the real isssue here.
|
|
|
|
|
first of all... not coding in OnDraw ();
code it in a separated function and in the OnDraw () do an evaluation of a flag. Something like:
if (bListRedraw)
UpdateListCtrl ();
in this UpdateListCtrl () funciont, the last line have to reset the flag (bListRedraw = FALSE).
in your methode of adding item, the last line have to set the flag (bListRedraw = TRUE).
I have sent you an email with some code that I used in one app. It deals with creation, initialitation and update of ListCtrl in a quite complex structure of Objcet derived elements and their datas.
Take a look, try to modify your code and ask if you dont understand something.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I am dynamically loading a second process (via CreateProcess) and would like to automatically set breakpoints in that process. VS2005 doesn't automatically set the breakpoints even though the code I want to break on exists in both projects.
Is there an API I can call to set a breakpoint on a function in another process?
|
|
|
|
|
After it is started via the CreateProcess, fire up another instance of VS2005 and "attach" to the just launched process. You can set breakpoints now. If you need to debug the process's startup code, use DebugBreak and connect VS2005. I've always used a new instance of VS to debug each different process - don't know if you can do multiple processes all in one.
Judy
|
|
|
|
|
Ah, but that's the problem. By the time I can click on Attach To Process and then select the process and press Attach, the program I'm trying to trap has already run the function I want to trap.
I can't modify the source to the program I want to attach to.
I need to find a way to set breakpoints in the launched process via the application I am writing. Something like:
{
CreateProcess("newprogram.exe", ... CREATE_SUSPENDED, ... );
SetBreakpoint(newProcessHandle, "FunctionToDebug");
ResumeProcess(newProcessHandle);
}
|
|
|
|
|
Soundman32.2 wrote: By the time I can click on Attach To Process and then select the process and press Attach, the program I'm trying to trap has already run the function I want to trap.
In your processes code, call DebugBreak(), and the code execution will stop and you will be given the chance to attach a debugger.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
That's a tough one without being able to modify the source of the target. Just to make sure you haven't missed the obvious, have you tried to Attach after the process is created in the suspended state? I don't expect it to work, but I personally don't know what else to try. You're down to the point of having to do something to modify the target. If you can't touch the source, the only thing left is modifying the asm code in the .exe file. Can't help there.
Sorry,
Judy
|
|
|
|
|
Hi Experts,
Plz tell me how to check the registry for a prticular version of MS-Outlook?
and how to make changes in Registry.
|
|
|
|
|
Look at the HKLM\SOFTWARE\Microsoft\Office key.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|