Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » libnodave dll/lib include
libnodave dll/lib include [message #29718] Wed, 10 November 2010 09:30 Go to next message
Daniel_Sun is currently offline  Daniel_Sun
Messages: 5
Registered: November 2010
Location: Hamburg, GER
Promising Member
Hey,

I'm trying to use libnodave, a free library for connection to Siemens PLC's, with ultimate++.
I've used it with Visual C++ before.

But right now I have no idea how to include this library to u++.

I have got a libnodave.dll and a libnodave.lib.

In VC++ I've just added the .lib and .dll to the Resourcefiles in my Project and also put them where the .exe would be. Also I've added the path to .lib in the Linkersettings.

In my programmcode I just added the following lines:
#define BCCWIN

#include "nodavesimple.h"
#include "openSocket.h"

Of course I've put these header files in the Projectfolder.

After this I could use all functions from libnodave.

And now my Question. How do I accomplish the same thing in U++?
Re: libnodave dll/lib include [message #29722 is a reply to message #29718] Wed, 10 November 2010 11:01 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Daniel,

Welcome to the forum Wink

In U++ it is maybe even simpler. All you have to do is to open package organizer (Project > Package organizer) choose your package, right click in the (probably still empty) and from the contex menu select new libraries. Fill in the name of libraray, in your case "nodave" (the lib prefix and extension are filled in by compiler). The when field can be used to specify more restrictions based on flags, e.g. WIN32 to use this library on windows only (read this part of manual to find out more).

Now if you add the includes to your code just as with Visual c++. You can also add the headers into your project, so that Assist++ parser can parse them and offer you the functions defined inside in code completition, navigator etc.

Best regards,
Honza

PS: If the linker complains that it can't find the library you will have to move it somewhere else, or add the path to search to your build method or in package organizer (using New linker options from the context menu).
Re: libnodave dll/lib include [message #29724 is a reply to message #29722] Wed, 10 November 2010 13:26 Go to previous messageGo to next message
Daniel_Sun is currently offline  Daniel_Sun
Messages: 5
Registered: November 2010
Location: Hamburg, GER
Promising Member
Well...

what can I say?

Thanks a lot, it works just fine.

Although I had to use "libnodave" as a name for the library instead of your suggested "nodave".
Re: libnodave dll/lib include [message #29728 is a reply to message #29724] Wed, 10 November 2010 22:14 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Daniel_Sun wrote on Wed, 10 November 2010 13:26

Although I had to use "libnodave" as a name for the library instead of your suggested "nodave".

Ooups, sorry for misleading you Embarassed The prepending of "lib" is common for non-windows compilers, I forgot that on windows the situation is bit different.
Re: libnodave dll/lib include [message #29736 is a reply to message #29728] Thu, 11 November 2010 09:07 Go to previous messageGo to next message
koldo is currently online  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
dolik.rce wrote on Wed, 10 November 2010 22:14

Daniel_Sun wrote on Wed, 10 November 2010 13:26

Although I had to use "libnodave" as a name for the library instead of your suggested "nodave".

Ooups, sorry for misleading you Embarassed The prepending of "lib" is common for non-windows compilers, I forgot that on windows the situation is bit different.


Well, more than in windows, in MSC. MinGW could add the "lib". However this is not very important Smile.


Best regards
IƱaki
Re: libnodave dll/lib include [message #33295 is a reply to message #29736] Sat, 23 July 2011 01:39 Go to previous message
be04062 is currently offline  be04062
Messages: 1
Registered: July 2011
Junior Member
Hi all,

Me too want to estalish a connection with libnodave...

I've acquired a Siemens S7-226 for my home automation system and I want to write my own .NET application using libnodave. I am using Visual Studio Express 2010 and Windows 7 together with an PPI USB cable to interface. Using the testing tools (simplePPI.exe) I do not succed in making a connection. Some information is being showed, and suddenly I get "Program not responding anymore".

I tried to recompile libnodave.net, in order to compile the simpleppi.exe, but no luck (I've added the reference). Is this related to Windows 7 or .NET4 or libnodave?? Using the built-in tools, I get the same results followed with "testppi does not respond anymore"

Unfortunately, I don't succeed either in making a connection towards my PLC. Both in VB.NET and C#, it jumps over the command to establish a connection : " dc = new libnodave.net.libnodave.daveConnection(di, plcPPI, 0, 0);".

Can somebody help me out please? I really want to start programming Wink Kind Regards, Dominique
Previous Topic: Grid Ctrl..How to find minimum and maximum element
Next Topic: best method of saving users settings?
Goto Forum:
  


Current Time: Sun Apr 28 19:16:15 CEST 2024

Total time taken to generate the page: 0.06337 seconds