|
yeah i wanna build one prog using those two files and then run the prog so that i wanna run a process fro a client and another for ther server on a same machine (local). but i'am asking what should i write in the terminal (as i said i'm under Linux) !!! I m despered t spent alla the day asking that and looking in the net but no way
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
If you want to build just one application using two (or more) source files, then there should be one (and only one) function main .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
yes you are all right but in socket there are always a C file for the client and another one for the Server but i forgot how we edit the links between the c files and the o files under linux, i know that there is may be soem command like make or a shell comands i forgot it , i used to compile them about 4 years ago :p and now i need to run that app on my computer (and for the Linux Session i posted this message 5 jours ago and no reply till now :'()
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
What about 'man gcc '?
Probably you have to build 2 apps, for instance
gcc -o cliet client.c any_shared_obj.o
gcc -o server server.c any_shared_obj.o
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
but should i type after that sth like
gcc -o Sthing *.o
??? and then run the app Sthing!!!
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Blood_HaZaRd wrote: gcc -o Sthing *.o
*.o it's only a wildcard way to say 'link with all object files you find'. You get the error because the compiler finds both client.o and server.o (and both have a main function inside). I strongly suggest you to issue the man gcc command.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i already did the man gcc but with no hopes it stills abstractiv :p
any way thx for your help i ll try to ask the question to my professor and i ll write you the answer if he ll give it to me of course
Thx again (y)
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Good Night, and Good Luck.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Blood_HaZaRd wrote: yeah i wanna build one prog using those two files and then run the prog so that i wanna run a process fro a client and another for ther server on a same machine (local).
If you want to run two different processes, then you should build two different programs. Yes, it's possible to start two different processes from a single program in Linux using fork() , but that appears to be way beyond your current skill level.
|
|
|
|
|
Hey there, ive got a feeling there wont be an easy answer / solution to this question but if you dont ask you dont get!
I was wondering if there is any way to globally capture mouse overs in windows. Iam not sure if the way ive described this will make much sense to anyone so a quick usecase might help. When a user opens up the start menu and highlights 'my documents', the background colour changes to blue to show you have your mouse hovered over it. Can this event possibly be captured? I imagine capturing mouse overs on the start menu will be different to say catching a highlighted menu option in visual studio. But id really like to know if there is any way of globally detecting when hovering the mouse "highlights" something on the screen in relation.
Any help guys?
Thanks in advance
|
|
|
|
|
Have you thought about getting into the address space of the process that creates the window(s) and subclassing the particular window in order to capture the relevant messages?
|
|
|
|
|
I had looked into this and it doesnt seem to hard to do providing I learn enough about the win32 API. However the part which seems to vary between applications is capturing the relevant messages. Ive used winspector to look at messages being sent back & forth between windows and there does appear to be any pattern to what happens when something under the cursor changes due to a 'mouse over'. I noticed the startbar (dv3controlhost , syslistview32) calls wm_ncpaint followed by wm_erasebackground when I move between items and the mouse overs activate but this doesnt seem consistance with other applications ive looked at like Adobe Audition. But ive notice Adobde Audition uses alot of custom classes in its contruction......
|
|
|
|
|
Hey everybody!
I am looking for a way to get a log-in notification from a service (I found stuff about winlogon notification package, but it doesn't work nowadays... The registry keys just doesn't exist anymore).
Can anyone give a little hint please?
thanks!
|
|
|
|
|
|
Thanks!
does "SERVICE_CONTROL_SESSIONCHANGE" works also in XP ???
|
|
|
|
|
Green Fuze wrote: does "SERVICE_CONTROL_SESSIONCHANGE" works also in XP ???
Yes.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello.
Can someone explain me how to create a C program using Visual Studio 2005?
(I've been trying lots of ways, e.g. creating c++ files, and changing
extension to a c file, but I was getting errors).
Thanks!
|
|
|
|
|
Write your program in VC++ seeing as it's an extension to the C language and just write your C code. You can ignore the C++ additions such as object-orientation etc
(or go with Mike's suggestion.)
[Edit]
If you're looking for a good C compiler, I'd recommend Pelles C. It's free, too.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
modified on Sunday, October 19, 2008 7:15 AM
|
|
|
|
|
New Visual Studio 2005 projects default to 'compile code as C++'. To change this, go to the project's Property Pages dialog and click the C/C++ folder, Advanced, and change Compile As to 'Compile Code As C (/TC)'.
"Multithreading is just one damn thing after, before, or simultaneous with another." - Andrei Alexandrescu
|
|
|
|
|
My project use CDatagrid to show the content of database.
and so each column not the same size, some column the content is long and some it is short so I want to resize each column to show properly content.
How can I do?
|
|
|
|
|
How to save a process's state and resume it later?

|
|
|
|
|
There's no default way to do that (as far as I know). You'll have to handle that yourself...
|
|
|
|
|
I'm trying to verify that a path exists by using either PathFileExists() or GetFileAttributes(), but when a network path like \\SWAP01\slave02\mydirectory doesn't exist because the system isn't on, both functions hang.
In fact, they hang pretty seriously, so much so that I can't kill the process from the debugger OR the task manager. My only option appears to be to log off from the system and log back in.
Any thoughts on how I might better deal with this hang?
|
|
|
|
|
TragicComic wrote: Any thoughts on how I might better deal with this hang?
Have you tried _access() ? It's a wrapper around GetFileAttributes() so it may not be any better.
If you are using MFC, check out CFile::GetStatus() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I've a PE file and I'm going to set the file alignment to '1' in it. It's initially set to '512'. When I change it to '1', an error message says "This is an invalid PE file ...".
Any suggestion PLS?
Thank you masters!
|
|
|
|