Skip to main content
gamedev.net
🔒 Locked

Linking problem

Started by Yanny 6 replies 550+ views
Original Post
Yanny
Yanny
Hi, I am a new beginner for game development. I would like to implement a multiplayer game using DirectPlay. After the client success in connect to the server, it will start the Direct3D program. The 3D program will handle the key input, and the key input will be sent to the server for handle some coordination. In the client program, I hv declare a peer object of IDirectPlay8Client for connection to server In the 3D program, I also delcare anothe peer object of IDirectPlay8Client for sending msg. After compile, some problem arise: progressivemesh.obj : error LNK2005: "struct _GUID g_guidApp" (?g_guidApp@@3U_GUID@@A) already defined in SimpleClient.obj is such declaration wrong?
Dire.Wolf
Dire.Wolf
Make sure you've only defined g_guidApp once. The other alternative is to do a complete rebuild. Sometimes I've noticed that the MSVC++ compiler doesn't remove old symbols from an object file. It rarely happens and is easily fixed by a complete recompile. If you can't find a double-declaraction try a full rebuild.

My guess is that you've defined struct _GUID g_guidApp twice (via a precompiled header or a typo)

Dire Wolf
www.digitalfiends.com

Edited by - Dire.Wolf on January 6, 2002 5:05:52 PM
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
Yanny
Yanny
Hi,

Thank you very much.

I want to ask if clientA connected to server, clientA start running the 3D graphics, then I made another connection to server for handle other msg.

Is it possible that for each client hv more than one connection to the server?

Yanny
anjee
anjee
After reading another post of you, I assume you use DirectPlay8. You can simply create another "DirectPlayClient" object, and connect it to the server, (using a different port!) I''m not sureif the GUID should be different as well. In my game, I have changed the GUID for the second connection as well.
anjee
anjee
After reading another post of you, I assume you use DirectPlay8. You can simply create another "DirectPlayClient" object, and connect it to the server, (using a different port!) I''m not sureif the GUID should be different as well. In my game, I have changed the GUID for the second connection as well.
anjee
anjee
After reading another post of you, I assume you use DirectPlay8. You can simply create another "DirectPlayClient" object, and connect it to the server, (using a different port!) I''m not sureif the GUID should be different as well. In my game, I have changed the GUID for the second connection as well.
anjee
anjee
Excuse me for posting this so many times... I got an time-out everytime... so I thought it didn''t post it.
Yanny
Yanny
Hi,

i hv 3 .cpp files, it seems that i hv the coordination problem.
(client.cpp / server.cpp / graphic.cpp)

in client.cpp, there is IDirectPlay8Client object to connect to server, if success, it will run the class in graphic.cpp (the handle will then be by the object in graphic.cpp)

therefore, i define another IDirectPlay8Client object in graphic.cpp for sending msg to server, but the server will only send msg to object in client.cpp, how can the object in graphic.cpp know the reply from server?

(i just learn the sample of DirectPlay, it seems that many problem i encounter)

Yanny

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.