using client.connect inside a library

Hello, this is my first post.
I am not a c++ experienced programmer.
I am working on a project building a modbus/tcp client. So far it is working fine. I found a library http://myarduinoprojects.com/download/MgsModbus-v0.1.1.zip
It has a lot of what I am using. However I can not use it as a library. It does not connect to the slave when the client.connect(ip,port) is inside the mgsmodbus.cpp library. when I take this out from the library and move it to the main program, it works fine.
Any clue?
Thanks in advance

Any clue?

Yes. There is something wrong with your code. If you want help fixing it, you need to post it. And links to the libraries you are using.

Hi again,
The link to the library is on the first post. Repeat:
http://myarduinoprojects.com/download/MgsModbus-v0.1.1.zip

I am trying to run the example at this link:
http://myarduinoprojects.com/download/MgsModbus-v0.1.zip

It does connect to the server when I put the library over the code in a single file. It does not when I use it as it should.
Thanks

It does connect to the server when I put the library over the code in a single file. It does not when I use it as it should.

So, you have two libraries that work when used individually. You modified one of them to do something different. You wrote a sketch to use the modified library. You don't intend to share either the modified library or the sketch.

Well, good luck with that approach.

There is something wrong with your code

TKS, you were correct, there were several things to modify in the library to make it work nicely.
Now is up and running.
Tks again

Hello Imanual,

I want to use the same MgsModus sketch and librarie.
But can't get it to work.
Will you share your sketch and librarie with me?

Thanks
Jan Hein

I want to use the same MgsModus sketch and librarie.
But can't get it to work.
Will you share your sketch and librarie with me?

I'll second that. Help with the Mgsmodbus library would be very much appreciated here, too!

Thanks!
Mike

Hello Imanual,

Could you please help us with your sketch and library!!!!

Thanks,
Jan Hein