Author Topic: Getting Multisync to work in codeblocks  (Read 4930 times)

Offline Elspin

  • Single posting newcomer
  • *
  • Posts: 3
Getting Multisync to work in codeblocks
« on: December 04, 2008, 02:03:38 am »
Anyone who's used dark GDK will probably know what multisync is, but otherwise nobody really uses it. It's a really simple network library so it's all I really need for now, but I'm having issues getting it to work in code blocks. It'll compile, just won't link. Basically it's just a header file with declarations of all the functions, and a .lib/.exp and a .dll to put it all together. No c or c++ files. My problem is, when I include the header file and try to use the functions I get this

Code
obj\MainS.o:MainS.cpp:(.text+0xd)||undefined reference to `NetPutString(char*)'|
(using gcc compiler that comes packaged with code blocks)

for every function I've used from the header.

I think it may have something to do with this part of the header

Code
#ifndef _MULTISYNC_H_
#define _MULTISYNC_H_

#pragma comment(lib, "MultisyncDLL.lib") << here. pragmas are ignored by compiler?

// Core prototypes
bool           NetHost(int playerAmount);
[[more definitions, nothing else to see really]]

But I'm not sure what would be suitable replacement, because nothing I've tried works. If anyone could try to help me with this or set it up themselves and tell me how they did it I'd really appreciate it - it'd probably only take an experienced user a few minutes. For anyone wondering why it looks like it's in basic, there's also a version for C++ packaged with it in the 'other languages' folder inside the download.

Thanks in advance to anyone who tries to help me :)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Getting Multisync to work in codeblocks
« Reply #1 on: December 04, 2008, 07:15:20 am »
A little less information.

What OS, compiler (version) and C::B version do you use ?

If you use MinGW gcc, it will not work, because #pragma comment(lib, "MultisyncDLL.lib") is M$ syntax.

Offline Elspin

  • Single posting newcomer
  • *
  • Posts: 3
Re: Getting Multisync to work in codeblocks
« Reply #2 on: December 04, 2008, 07:48:43 am »
A little less information.

What OS, compiler (version) and C::B version do you use ?

If you use MinGW gcc, it will not work, because #pragma comment(lib, "MultisyncDLL.lib") is M$ syntax.

Windows XP service pack 3, latest stable download of MinGW GCC packaged with code blocks, and I mentioned that I knew it didn't work in GCC and asked if there was some form of substitute.

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: Getting Multisync to work in codeblocks
« Reply #3 on: December 04, 2008, 09:41:07 am »
Hi,

did you put MultisyncDLL.lib in the linker settings of the project build options ?

Dje

Offline Elspin

  • Single posting newcomer
  • *
  • Posts: 3
Re: Getting Multisync to work in codeblocks
« Reply #4 on: December 04, 2008, 11:00:56 pm »
Hi,

did you put MultisyncDLL.lib in the linker settings of the project build options ?

Dje

I tried, no luck there...