• Advertisement

Archived

This topic is now archived and is closed to further replies.

Can't compile PR version 4

This topic is 6211 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

These are the libraries I include: dplay.lib dxguid.lib dxerr8.lib dinput8.lib pr.lib prgui.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib These are the files I include (copied from examples) devdlg.c devdlg.rc sconline.cpp (that''s my own) Winutil.c devdlh.h This is the error I get -------------------Configuration: scorched earth online - Win32 Debug-------------------- Linking... LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library devdlg.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16 pr.lib(PRGLOBAL.OBJ) : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16 Winutil.obj : error LNK2001: unresolved external symbol _DirectInputCreate Debug/scorched earth online.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. scorched earth online.exe - 4 error(s), 1 warning(s) Please help!

Share this post


Link to post
Share on other sites
Advertisement
Hello,

Did you make sure that you set the DirectX SDK include and library locations in your options directory and that they are listed before the compiler directories?

PigHeaded

Share this post


Link to post
Share on other sites
OK found the problem. Old versions of DirectX. In particular, DirectX8 doesn''t support directplay older than version 7.0.

"The DirectInput object created by this function is implemented in Dinput8d.dll. Versions of interfaces earlier than DirectX 8.0 cannot be obtained in this implementation. To use earlier versions, create the DirectInput object by using DirectInputCreate or DirectInputCreateEx, which are in Dinput.lib."

Including Dinput.lib doesn''t actually work if you include a newer version (as I am for my force feedback routines). Unfortunately, his functions are accessed by globals.

The best solution is to castrate his functions. Put this at the top of Winutil.C and comment out his corresponding functions.

int minit (void) {return 1;}
void mdeinit (void) {}
void msetbounds (int x0, int y0, int x1, int y1) {}
void msetxy (int x0, int y0){}
void noclick (void){}
void PR_ReadMouse (void){}
void PR_MouseSyncAcquire (HWND hwnd){}
int installkbd (void){return 1;}
void PR_ReadKeyboard(void){}
void uninstallkbd (void){}
BOOL PR_KeyboardSyncAcquire (void){return 1;}
long FAR PASCAL MainWndproc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ){return 1L;}
static BOOL initApplication (HANDLE hInstance, int nCmdShow){return 1;}
void UpdateMessages (void){}
char PR_getch (void){return 0;}
int PR_kbhit (void){return 1;}

You''ll need to put in your own winmain and directinput code of course, but that''s something you want to do anyway

Share this post


Link to post
Share on other sites

  • Advertisement