markolino Inserito: 9 novembre 2019 Segnala Inserito: 9 novembre 2019 Ciao a tutti, ho la necessità di usare la mitica libreria snap7 con Qt Creator. Ora, sul sito di snap7 c'è scritto come fare il rebuild della libreria: fatto, ho snap7.lib e snap7.dll nella relativa cartella. Qualcuno può guidarmi su come andare avanti lato Qt ? Non capisco cosa fare e come aggiungere/usare questi reference nel mio progetto. Grazie a tutti.
markolino Inserita: 11 novembre 2019 Autore Segnala Inserita: 11 novembre 2019 (modificato) Riporto quanto ho condiviso sul forum ufficiale di Qt Creator. Questa soluzione va bene se utilizzate come SO Windows e volete creare una nuova Widget Application. So this are the steps to get it works fine: 1-Compile the library with file .bat to obtain .lib and .dll file. Follow the instruction on snap7 site, section "rebuild". 2-Copy this 2 file in your folder, where found the exe file of the application 3-Copy the snap7.h and the snap7.cpp file of the library (can you found them in the example folder) in the same folder of your .pro file 3-Add an include snap7.h in your widget.h file and declare a TS7Client object. 4-Add in your .pro file LIBS +="path\to\your\file.dll" and run qmake Remember that if you write or read some data you must swap the byte of the word/longword before you send the request. Spero possa essere di aiuto a qualcuno ! Modificato: 11 novembre 2019 da markolino
Messaggi consigliati
Crea un account o accedi per commentare
Devi essere un utente per poter lasciare un commento
Crea un account
Registrati per un nuovo account nella nostra comunità. è facile!
Registra un nuovo accountAccedi
Hai già un account? Accedi qui.
Accedi ora